Content-Length: 2617 | pFad | http://github.com/gitpython-developers/GitPython/pull/1890.patch
thub.com
From 83bed19f360b69dad26b7d9b00ffd837c8075b7a Mon Sep 17 00:00:00 2001
From: Eliah Kagan
Date: Sun, 31 Mar 2024 14:57:52 -0400
Subject: [PATCH 1/2] Fix wording of comment about the /cygdrive prefix
---
git/repo/fun.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git/repo/fun.py b/git/repo/fun.py
index e44d9c644..182cf82ed 100644
--- a/git/repo/fun.py
+++ b/git/repo/fun.py
@@ -112,7 +112,7 @@ def find_submodule_git_dir(d: PathLike) -> Optional[PathLike]:
path = content[8:]
if Git.is_cygwin():
- # Cygwin creates submodules prefixed with `/cygdrive/...` suffixes.
+ # Cygwin creates submodules prefixed with `/cygdrive/...`.
# Cygwin git understands Cygwin paths much better than Windows ones.
# Also the Cygwin tests are assuming Cygwin paths.
path = cygpath(path)
From 988d97bf12c5b15ff4693a5893134271dd8d8a28 Mon Sep 17 00:00:00 2001
From: Eliah Kagan
Date: Sun, 31 Mar 2024 15:40:47 -0400
Subject: [PATCH 2/2] Fix typo in _get_exe_extensions PATHEXT fallback
PATHEXT lists file extensions with the ".". In the fallback given
in _get_exe_extensions, the other extensions had this, but ".COM"
was listed without the ".". This fixes that.
This is very minor because _get_exe_extensions is nonpublic and not
currently used on native Windows, which is the platform where the
PATHEXT fallback code would be used.
Specifically, _get_exe_extensions is called only in py_where, which
while named with no leading underscore is nonpublic do not being
(and never having been) listed in __all__. As its docstring states,
it is an implementation detail of is_cygwin_git and not intended
for any other use. More specifically, is_cygwin_git currently
immediately returns False on *native* Windows (even if the git
executable GitPython is using is a Cygwin git executable). Only on
Cygwin, or other systems that are not native Windows, does it try
to check the git executable (by calling its _is_cygwin_git helper,
which uses py_where).
---
git/util.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git/util.py b/git/util.py
index 8c1c26012..11f963e02 100644
--- a/git/util.py
+++ b/git/util.py
@@ -339,7 +339,7 @@ def _get_exe_extensions() -> Sequence[str]:
if PATHEXT:
return tuple(p.upper() for p in PATHEXT.split(os.pathsep))
elif sys.platform == "win32":
- return (".BAT", "COM", ".EXE")
+ return (".BAT", ".COM", ".EXE")
else:
return ()
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/gitpython-developers/GitPython/pull/1890.patch
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy