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 <jesse.welch@baml.com> Signed-off-by: John Patrick Murphy <john.murphy@baml.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
This commit is contained in:
parent
918dbf5887
commit
4394faf6e5
@ -1284,7 +1284,11 @@ apply_config
|
|||||||
|
|
||||||
# v1.7.0 introduced --show-toplevel to return the canonical work-tree
|
# v1.7.0 introduced --show-toplevel to return the canonical work-tree
|
||||||
if {[package vsatisfies $_git_version 1.7.0]} {
|
if {[package vsatisfies $_git_version 1.7.0]} {
|
||||||
|
if { [is_Cygwin] } {
|
||||||
|
catch {set _gitworktree [exec cygpath --windows [git rev-parse --show-toplevel]]}
|
||||||
|
} else {
|
||||||
set _gitworktree [git rev-parse --show-toplevel]
|
set _gitworktree [git rev-parse --show-toplevel]
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
# try to set work tree from environment, core.worktree or use
|
# try to set work tree from environment, core.worktree or use
|
||||||
# cdup to obtain a relative path to the top of the worktree. If
|
# cdup to obtain a relative path to the top of the worktree. If
|
||||||
|
Loading…
Reference in New Issue
Block a user