Skip to content

Commit

Permalink
git-gui: corrected setup of git worktree under cygwin.
Browse files Browse the repository at this point in the history
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 <jesse.welch@baml.com>
Signed-off-by: John Patrick Murphy <john.murphy@baml.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
  • Loading branch information
John Murphy authored and Pat Thoyts committed Sep 6, 2013
1 parent 918dbf5 commit 4394faf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4394faf

Please sign in to comment.