From 5d874ddc5a6cab35812e1ef395c18216f9399425 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 10 Jun 2022 21:35:40 -0400 Subject: BUG: Convert to native path before checking if absolute --- git/repo/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'git/repo/base.py') 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): -- cgit v1.2.1 From 21113a81560dfea6f2eea5f50ceb5e87e9097c82 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Sat, 11 Jun 2022 10:01:53 -0400 Subject: STY: Remove import of now-unused function --- git/repo/base.py | 1 - 1 file changed, 1 deletion(-) (limited to 'git/repo/base.py') diff --git a/git/repo/base.py b/git/repo/base.py index 440cfaef..5a85cc4e 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -30,7 +30,6 @@ from git.util import ( Actor, finalize_process, cygpath, - decygpath, hex_to_bin, expand_path, remove_password_if_present, -- cgit v1.2.1