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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions 11 git/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,10 @@ def expand_path(p: PathLike, expand_vars: bool = ...) -> str:

def expand_path(p: Union[None, PathLike], expand_vars: bool = True) -> Optional[str]:
try:
if p is not None:
p_out = osp.expanduser(p)
if expand_vars:
p_out = osp.expandvars(p_out)
return osp.normpath(osp.abspath(p_out))
else:
return None
p = osp.expanduser(p) # type: ignore
if expand_vars:
p = osp.expandvars(p) # type: ignore
return osp.normpath(osp.abspath(p)) # type: ignore
except Exception:
return None

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.