◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
10 changes: 9 additions & 1 deletion git/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,12 @@ def _is_cygwin_git(git_executable: str) -> bool:

# Just a name given, not a real path.
uname_cmd = osp.join(git_dir, "uname")
process = subprocess.Popen([uname_cmd], stdout=subprocess.PIPE, universal_newlines=True)
uname_out, _ = process.communicate()
# retcode = process.poll()
Expand All @@ -484,7 +490,9 @@ def is_cygwin_git(git_executable: PathLike) -> bool: ...


def is_cygwin_git(git_executable: Union[None, PathLike]) -> bool:
if sys.platform == "win32": # TODO: See if we can use `sys.platform != "cygwin"`.
return False
elif git_executable is None:
return False
Expand Down
19 changes: 19 additions & 0 deletions test/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
LockFile,
cygpath,
decygpath,
get_user_id,
remove_password_if_present,
rmtree,
Expand Down Expand Up @@ -349,6 +350,24 @@ def test_decygpath(self, wpath, cpath):
assert wcpath == wpath.replace("/", "\\"), cpath


class _Member:
"""A member of an IterableList."""

Expand Down
Loading
Toggle all file notes Toggle all file annotations