Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 4394faf

Browse files
John Murphypatthoyts
authored andcommitted
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 <[email protected]> Signed-off-by: John Patrick Murphy <[email protected]> Signed-off-by: Pat Thoyts <[email protected]>
1 parent 918dbf5 commit 4394faf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

git-gui.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,11 @@ apply_config
12841284
12851285
# v1.7.0 introduced --show-toplevel to return the canonical work-tree
12861286
if {[package vsatisfies $_git_version 1.7.0]} {
1287-
set _gitworktree [git rev-parse --show-toplevel]
1287+
if { [is_Cygwin] } {
1288+
catch {set _gitworktree [exec cygpath --windows [git rev-parse --show-toplevel]]}
1289+
} else {
1290+
set _gitworktree [git rev-parse --show-toplevel]
1291+
}
12881292
} else {
12891293
# try to set work tree from environment, core.worktree or use
12901294
# cdup to obtain a relative path to the top of the worktree. If

0 commit comments

Comments
 (0)