| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e133018 commit c34a466
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -218,7 +218,7 @@ def __init__( | |||
| 218 | 218 | # Given how the tests are written, this seems more likely to catch Cygwin | |
| 219 | 219 | # git used from Windows than Windows git used from Cygwin. Therefore | |
| 220 | 220 | # changing to Cygwin-style paths is the relevant operation. | |
| 221 | - epath = cygpath(epath) | ||
| 221 | + epath = cygpath(str(epath)) | ||
| 222 | 222 | ||
| 223 | 223 | epath = epath or path or os.getcwd() | |
| 224 | 224 | if not isinstance(epath, str): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -404,7 +404,9 @@ def _cygexpath(drive: Optional[str], path: str) -> str: | |||
| 404 | 404 | ) | |
| 405 | 405 | ||
| 406 | 406 | ||
| 407 | - def _cygpath(path: str) -> str: | ||
| 407 | + def cygpath(path: str) -> str: | ||
| 408 | + """Use :meth:`git.cmd.Git.polish_url` instead, that works on any environment.""" | ||
| 409 | + path = str(path) # Ensure is str and not AnyPath. | ||
| 408 | 410 | # Fix to use Paths when 3.5 dropped. Or to be just str if only for URLs? | |
| 409 | 411 | if not path.startswith(("/cygdrive", "//", "/proc/cygdrive")): | |
| 410 | 412 | for regex, parser, recurse in _cygpath_parsers: | |
@@ -420,11 +422,6 @@ def _cygpath(path: str) -> str: | |||
| 420 | 422 | return path | |
| 421 | 423 | ||
| 422 | 424 | ||
| 423 | - def cygpath(path: PathLike) -> str: | ||
| 424 | - """Use :meth:`git.cmd.Git.polish_url` instead, that works on any environment.""" | ||
| 425 | - return _cygpath(str(path)) # Ensure is str and not AnyPath. | ||
| 426 | - | ||
| 427 | - | ||
| 428 | 425 | _decygpath_regex = re.compile(r"(?:/proc)?/cygdrive/(\w)(/.*)?") | |
| 429 | 426 | ||
| 430 | 427 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments