Skip to content

Commit 43564d2

Browse files
toanantByron
authored andcommitted
Update cmd.py
1 parent 2ba39bd commit 43564d2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎git/cmd.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,7 @@ def polish_url(cls, url, is_cygwin=None):
330330
but git stops liking them as it will escape the backslashes.
331331
Hence we undo the escaping just to be sure.
332332
"""
333-
ifurl.startswith('$HOME/'):
334-
url=url.replace('$HOME/', '~/')
333+
url=os.path.expandvars(url)
335334
ifurl.startswith('~'):
336335
url=os.path.expanduser(url)
337336
url=url.replace("\\\\", "\\").replace("\\", "/")

0 commit comments

Comments
(0)