]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-gui.sh
git-gui: corrected setup of git worktree under cygwin.
[thirdparty/git.git] / git-gui.sh
index b62ae4a94995cc3dc7c6b7d5ab8273ffeb4b9555..66db995ed0edffcdc1e71fa2de354d59527c0c64 100755 (executable)
@@ -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