◐ Shell
reader mode source ↗
Skip to content
Merged
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
11 changes: 4 additions & 7 deletions 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
except Exception:
return None

Expand Down
Toggle all file notes Toggle all file annotations