From: John Murphy Date: Wed, 4 Sep 2013 15:03:48 +0000 (-0400) Subject: git-gui: corrected setup of git worktree under cygwin. X-Git-Tag: gitgui-0.19.0~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4394faf6e53e8b91c82332aa4f2b77616350a81b;p=git git-gui: corrected setup of git worktree under cygwin. Under cygwin the _gitworktree variable needs to contain the Windows style path string so the output provided by git rev-parse must be converted from cygwin path style to native. Reviewed-by: Jesse Welch Signed-off-by: John Patrick Murphy Signed-off-by: Pat Thoyts --- diff --git a/git-gui.sh b/git-gui.sh index b62ae4a949..66db995ed0 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -1284,7 +1284,11 @@ apply_config # v1.7.0 introduced --show-toplevel to return the canonical work-tree if {[package vsatisfies $_git_version 1.7.0]} { - set _gitworktree [git rev-parse --show-toplevel] + if { [is_Cygwin] } { + catch {set _gitworktree [exec cygpath --windows [git rev-parse --show-toplevel]]} + } else { + set _gitworktree [git rev-parse --show-toplevel] + } } else { # try to set work tree from environment, core.worktree or use # cdup to obtain a relative path to the top of the worktree. If