aboutsummaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2011-10-19 13:35:30 +0100
committerPat Thoyts <patthoyts@users.sourceforge.net>2011-10-19 13:35:30 +0100
commitae6ec6124bb96157ca96bc90831b4874e8ad6789 (patch)
treea4ff88a6f13c3b100f3e366e410847b73e11a0b3 /git-gui.sh
parent99665fc58269cfd608558cc0afbc53824703fc6b (diff)
parent8eaf24b93bdb49d5adfb2f52f0f14dd01735db37 (diff)
downloadgit-3297e79271c53d99b8f62b99f91a2c6135da5f05.tar.gz
git-3297e79271c53d99b8f62b99f91a2c6135da5f05.tar.xz
Merge branch 'bw/searching'gitgui-0.15.0
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 7eeec5228..21033cb0b 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -299,7 +299,9 @@ proc is_config_true {name} {
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
@@ -310,7 +312,9 @@ proc is_config_false {name} {
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
@@ -1061,6 +1065,10 @@ git-version proc _parse_config {arr_name args} {
} 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) {}
}
}
}
@@ -1076,6 +1084,10 @@ git-version proc _parse_config {arr_name args} {
} 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