Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cfa3782

Browse filesBrowse files
committed
revert util.expand_path() due to regression
1 parent 96c4365 commit cfa3782
Copy full SHA for cfa3782

1 file changed

+4-7Lines changed: 4 additions & 7 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎git/util.py‎

Copy file name to clipboardExpand all lines: git/util.py
+4-7Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -382,13 +382,10 @@ def expand_path(p: PathLike, expand_vars: bool = ...) -> str:
382382

383383
def expand_path(p: Union[None, PathLike], expand_vars: bool = True) -> Optional[str]:
384384
try:
385-
if p is not None:
386-
p_out = osp.expanduser(p)
387-
if expand_vars:
388-
p_out = osp.expandvars(p_out)
389-
return osp.normpath(osp.abspath(p_out))
390-
else:
391-
return None
385+
p = osp.expanduser(p) # type: ignore
386+
if expand_vars:
387+
p = osp.expandvars(p) # type: ignore
388+
return osp.normpath(osp.abspath(p)) # type: ignore
392389
except Exception:
393390
return None
394391

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.