diff options
author | Jens Lehmann <Jens.Lehmann@web.de> | 2014-05-13 23:24:00 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-05-14 15:05:28 -0700 |
commit | 7c3715b79969a7386442986ee914bef08ecc35ca (patch) | |
tree | aa9340b5f88ae40de0bdd3a7e5b6c7378ad6eff0 | |
parent | 1b2c79e63e5afa3cecb3ab4a40cb414dbe6511ce (diff) | |
download | git-jl/vcompare-makes-2.0-satisify-1.7-or-later.tar.gz |
git-gui: use vcompare when comparing the git versionjl/vcompare-makes-2.0-satisify-1.7-or-later
Since git 2.0.0 starting git gui in a submodule using a gitfile fails with
the following error:
No working directory ../../../<path>
couldn't change working directory
to "../../../<path>": no such file or
directory
This is because "git rev-parse --show-toplevel" is only run when git gui
sees a git version of at least 1.7.0 (which is the version in which the
--show-toplevel option was introduced). But it uses vsatisfies to check
that, which is documented to return false when the major version changes,
which is not what we want here.
Change vsatisfies to vcompare when testing for a git version to avoid the
problem when the major version changes (but still use vsatisfies in those
places where the Tk version is checked). This is done for both the place
that caused the reported bug and another spot where the git version is
tested for another feature.
Reported-by: Chris Packham <judge.packham@gmail.com>
Reported-by: Yann Dirson <ydirson@free.fr>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | git-gui.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-gui.sh b/git-gui.sh index cf2209b4f2..ed2418bcca 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -1283,7 +1283,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]} { if { [is_Cygwin] } { catch {set _gitworktree [exec cygpath --windows [git rev-parse --show-toplevel]]} } else { @@ -1539,7 +1539,7 @@ proc rescan_stage2 {fd after} { close $fd } - if {[package vsatisfies $::_git_version 1.6.3]} { + if {[package vcompare $::_git_version 1.6.3]} { set ls_others [list --exclude-standard] } else { set ls_others [list --exclude-per-directory=.gitignore] |