Skip to content

Commit

Permalink
git-gui: reinstate support for Tcl 8.4
Browse files Browse the repository at this point in the history
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
b3f0c5c (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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
Signed-off-by: Pat Thoyts <[email protected]>
  • Loading branch information
mackyle authored and patthoyts committed Jan 13, 2015
1 parent a117fa2 commit ce3e848
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ load_config 0
apply_config
# v1.7.0 introduced --show-toplevel to return the canonical work-tree
if {[package vsatisfies $_git_version 1.7.0-]} {
if {[package vcompare $_git_version 1.7.0] >= 0} {
if { [is_Cygwin] } {
catch {set _gitworktree [exec cygpath --windows [git rev-parse --show-toplevel]]}
} else {
Expand Down Expand Up @@ -1542,7 +1542,7 @@ proc rescan_stage2 {fd after} {
close $fd
}
if {[package vsatisfies $::_git_version 1.6.3-]} {
if {[package vcompare $::_git_version 1.6.3] >= 0} {
set ls_others [list --exclude-standard]
} else {
set ls_others [list --exclude-per-directory=.gitignore]
Expand Down

0 comments on commit ce3e848

Please sign in to comment.