Skip to content

Commit 5d874dd

Browse files
authored
BUG: Convert to native path before checking if absolute
1 parent d57a513 commit 5d874dd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

git/repo/base.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from git.util import (
3030
Actor,
3131
finalize_process,
32+
cygpath,
3233
decygpath,
3334
hex_to_bin,
3435
expand_path,
@@ -175,7 +176,10 @@ def __init__(
175176
if not epath:
176177
epath = os.getcwd()
177178
if Git.is_cygwin():
178-
epath = decygpath(epath)
179+
# Given how the tests are written, this seems more likely to catch
180+
# Cygwin git used from Windows than Windows git used from Cygwin.
181+
# Therefore changing to Cygwin-style paths is the relevant operation.
182+
epath = cygpath(epath)
179183

180184
epath = epath or path or os.getcwd()
181185
if not isinstance(epath, str):

0 commit comments

Comments
 (0)