summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git/cmd.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/git/cmd.py b/git/cmd.py
index a06daaaf..78319c75 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -330,8 +330,7 @@ class Git(LazyMixin):
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/', '~/')
+ url = os.path.expandvars(url)
if url.startswith('~'):
url = os.path.expanduser(url)
url = url.replace("\\\\", "\\").replace("\\", "/")