diff options
author | DWesl <22566757+DWesl@users.noreply.github.com> | 2022-06-10 21:35:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 21:35:40 -0400 |
commit | 5d874ddc5a6cab35812e1ef395c18216f9399425 (patch) | |
tree | 3571cfc1714d86f49821c91eb442ab76f4fb79c1 /git/repo/base.py | |
parent | d57a513791cd3a673b5bd7621809dd29bfc54321 (diff) | |
download | gitpython-5d874ddc5a6cab35812e1ef395c18216f9399425.tar.gz |
BUG: Convert to native path before checking if absolute
Diffstat (limited to 'git/repo/base.py')
-rw-r--r-- | git/repo/base.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index 111a350e..440cfaef 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -29,6 +29,7 @@ from git.remote import Remote, add_progress, to_progress_instance from git.util import ( Actor, finalize_process, + cygpath, decygpath, hex_to_bin, expand_path, @@ -175,7 +176,10 @@ class Repo(object): if not epath: epath = os.getcwd() if Git.is_cygwin(): - epath = decygpath(epath) + # Given how the tests are written, this seems more likely to catch + # Cygwin git used from Windows than Windows git used from Cygwin. + # Therefore changing to Cygwin-style paths is the relevant operation. + epath = cygpath(epath) epath = epath or path or os.getcwd() if not isinstance(epath, str): |