Skip to content
Merged
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ def polish_url(cls, url, is_cygwin=None):
but git stops liking them as it will escape the backslashes.
Hence we undo the escaping just to be sure.
"""
if url.startswith('$HOME/'):
url = url.replace('$HOME/', '~/')
if url.startswith('~'):
url = os.path.expanduser(url)
url = url.replace("\\\\", "\\").replace("\\", "/")

return url
Expand Down