summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a8ca786)
raw | patch | inline | side by side (parent: a8ca786)
author | Bert Wesarg <bert.wesarg@googlemail.com> | |
Fri, 14 Oct 2011 08:14:49 +0000 (10:14 +0200) | ||
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Tue, 18 Oct 2011 08:27:28 +0000 (09:27 +0100) |
When git interprets a config variable without a value as bool it is considered
as true. But git-gui doesn't so until yet.
The value for boolean configs are also case-insensitive.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
as true. But git-gui doesn't so until yet.
The value for boolean configs are also case-insensitive.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index e5dd8bc1f2ffb489f4b41470c3cbda5ff7ca4656..33ab5dc3d61d67cc25fc702a62e2f998c3d71d28 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
global repo_config
if {[catch {set v $repo_config($name)}]} {
return 0
- } elseif {$v eq {true} || $v eq {1} || $v eq {yes}} {
+ }
+ set v [string tolower $v]
+ if {$v eq {} || $v eq {true} || $v eq {1} || $v eq {yes} || $v eq {on}} {
return 1
} else {
return 0
global repo_config
if {[catch {set v $repo_config($name)}]} {
return 0
- } elseif {$v eq {false} || $v eq {0} || $v eq {no}} {
+ }
+ set v [string tolower $v]
+ if {$v eq {false} || $v eq {0} || $v eq {no} || $v eq {off}} {
return 1
} else {
return 0
} else {
set arr($name) $value
}
+ } elseif {[regexp {^([^\n]+)$} $line line name]} {
+ # no value given, but interpreting them as
+ # boolean will be handled as true
+ set arr($name) {}
}
}
}
} else {
set arr($name) $value
}
+ } elseif {[regexp {^([^=]+)$} $line line name]} {
+ # no value given, but interpreting them as
+ # boolean will be handled as true
+ set arr($name) {}
}
}
close $fd_rc