git-gui: reinstate support for Tcl 8.4
Tcl 8.5 introduced an extended vsatisfies syntax that is not supported by Tcl 8.4. Since only Tcl 8.4 is required this presents a problem. The extended syntax was used starting with Git 2.0.0 in commit b3f0c5c0 (git-gui: tolerate major version changes when comparing the git version, 2014-05-17), so that a major version change would still satisfy the condition. However, what we really want is just a basic version compare, so use vcompare instead to restore compatibility with Tcl 8.4. Signed-off-by: Kyle J. McKay <mackyle@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Kyle J. McKay committed
Jan 6, 2015 at 02:41 UTC
ce3e848b409a6ba30fe9e12354f309424ac247cd
1 file changed
+2
-2
git-gui.sh
+2
-2
@@ -1286,7 +1286,7 @@ load_config 0
1286
apply_config
1287
1288
# v1.7.0 introduced --show-toplevel to return the canonical work-tree
1289
-if {[package vsatisfies $_git_version 1.7.0-]} {
1289
+if {[package vcompare $_git_version 1.7.0] >= 0} {
1290
if { [is_Cygwin] } {
1291
catch {set _gitworktree [exec cygpath --windows [git rev-parse --show-toplevel]]}
1292
} else {
@@ -1542,7 +1542,7 @@ proc rescan_stage2 {fd after} {
1542
close $fd
1543
}
1544
1545
- if {[package vsatisfies $::_git_version 1.6.3-]} {
1545
+ if {[package vcompare $::_git_version 1.6.3] >= 0} {
1546
set ls_others [list --exclude-standard]
1547
} else {
1548
set ls_others [list --exclude-per-directory=.gitignore]