| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f1cc1fe commit e133018
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -404,9 +404,7 @@ def _cygexpath(drive: Optional[str], path: str) -> str: | |||
| 404 | 404 | ) | |
| 405 | 405 | ||
| 406 | 406 | ||
| 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. | ||
| 407 | + def _cygpath(path: str) -> str: | ||
| 410 | 408 | # Fix to use Paths when 3.5 dropped. Or to be just str if only for URLs? | |
| 411 | 409 | if not path.startswith(("/cygdrive", "//", "/proc/cygdrive")): | |
| 412 | 410 | for regex, parser, recurse in _cygpath_parsers: | |
@@ -422,6 +420,11 @@ def cygpath(path: str) -> str: | |||
| 422 | 420 | return path | |
| 423 | 421 | ||
| 424 | 422 | ||
| 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 | + | ||
| 425 | 428 | _decygpath_regex = re.compile(r"(?:/proc)?/cygdrive/(\w)(/.*)?") | |
| 426 | 429 | ||
| 427 | 430 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments