diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2017-09-28 14:43:25 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2017-09-28 14:49:51 +0200 |
commit | fb43244026643e540a2fac35b2997c6aa0e139c4 (patch) | |
tree | 38c31cbb563849c63eab4f94571edeed6c05cfb8 /git/util.py | |
parent | f6cf7a7bd864fe1fb64d7bea0c231c6254f171e7 (diff) | |
parent | 67291f0ab9b8aa24f7eb6032091c29106de818ab (diff) | |
download | gitpython-fb43244026643e540a2fac35b2997c6aa0e139c4.tar.gz |
Merge branch 'master' of https://github.com/Plazmaz/GitPython into Plazmaz-master
Diffstat (limited to 'git/util.py')
-rw-r--r-- | git/util.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/git/util.py b/git/util.py index 39efdb1a..5baeee91 100644 --- a/git/util.py +++ b/git/util.py @@ -341,9 +341,12 @@ def finalize_process(proc, **kwargs): proc.wait(**kwargs) -def expand_path(p): +def expand_path(p, expand_vars=True): try: - return osp.normpath(osp.abspath(osp.expandvars(osp.expanduser(p)))) + p = osp.expanduser(p) + if expand_vars: + p = osp.expandvars(p) + return osp.normpath(osp.abspath(p)) except: return None |