Skip to content
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
3 changes: 3 additions & 0 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ 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.
"""
url = os.path.expandvars(url)
if url.startswith('~'):
url = os.path.expanduser(url)
url = url.replace("\\\\", "\\").replace("\\", "/")

return url
Expand Down