diff options
author | DWesl <22566757+DWesl@users.noreply.github.com> | 2022-06-11 11:21:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-11 11:21:54 -0400 |
commit | 9be148c65e9e6c7ed6706c12adc785187918da88 (patch) | |
tree | cf2836edb4193b200ad85dd1cae7ba65f5e41337 /git/repo/fun.py | |
parent | f99085263d959ef39830901734f232fa774dd5e0 (diff) | |
download | gitpython-9be148c65e9e6c7ed6706c12adc785187918da88.tar.gz |
BUG: Use Cygwin paths for Cygwin git
Diffstat (limited to 'git/repo/fun.py')
-rw-r--r-- | git/repo/fun.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git/repo/fun.py b/git/repo/fun.py index 8a07c2ab..2ca2e3d6 100644 --- a/git/repo/fun.py +++ b/git/repo/fun.py @@ -7,7 +7,7 @@ from string import digits from git.exc import WorkTreeRepositoryUnsupported from git.objects import Object from git.refs import SymbolicReference -from git.util import hex_to_bin, bin_to_hex, decygpath +from git.util import hex_to_bin, bin_to_hex, cygpath from gitdb.exc import ( BadObject, BadName, @@ -109,7 +109,9 @@ def find_submodule_git_dir(d: "PathLike") -> Optional["PathLike"]: if Git.is_cygwin(): ## Cygwin creates submodules prefixed with `/cygdrive/...` suffixes. - path = decygpath(path) + # Cygwin git understands Cygwin paths much better than Windows ones + # Also the Cygwin tests are assuming Cygwin paths. + path = cygpath(path) if not osp.isabs(path): path = osp.normpath(osp.join(osp.dirname(d), path)) return find_submodule_git_dir(path) |