summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorLibravatar Sebastian Schuberth <sschuberth@gmail.com>2010-10-05 11:12:00 +0200
committerLibravatar Pat Thoyts <patthoyts@users.sourceforge.net>2010-10-05 10:58:14 +0100
commitff9db6c79d57c9f8921db39a73772e70ab76a1e3 (patch)
treedb1a3fca2274cd8c3799ca58c62dd4a4730abc81 /git-gui.sh
parentgit-gui 0.13 (diff)
downloadtgif-ff9db6c79d57c9f8921db39a73772e70ab76a1e3.tar.xz
On Windows, avoid git-gui to call Cygwin's nice utility
It's a common case for Windows developers to have both Cygwin and msysGit installed. Unfortunately, some scenarios also require to have Cygwin in PATH. By default, Cygwin comes with nice.exe, while msysGit does not. Since git-gui calls nice if it is in PATH, this results in Cygwin's nice.exe being called from msysGit's git-gui. Mixing Cygwin and msysGit generally is not a good idea, and in this particular case it causes differences not being correctly detected. So we only call nice.exe on Windows if it is in the same directory as git.exe. This way, this work-around does neither affect a pure Cygwin environment, or the case when nice.exe will be shipped with msysGit at some point in time. This fixes msysGit issue 394. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 4617f29c26..422d4ff5bd 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -444,6 +444,8 @@ proc _lappend_nice {cmd_var} {
set _nice [_which nice]
if {[catch {exec $_nice git version}]} {
set _nice {}
+ } elseif {[is_Windows] && [file dirname $_nice] ne [file dirname $::_git]} {
+ set _nice {}
}
}
if {$_nice ne {}} {