diff options
Diffstat (limited to 'git_config.py')
-rw-r--r-- | git_config.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/git_config.py b/git_config.py index 3ba9dbd1..854b2387 100644 --- a/git_config.py +++ b/git_config.py | |||
@@ -534,7 +534,7 @@ def GetUrlCookieFile(url, quiet): | |||
534 | for line in p.stdout: | 534 | for line in p.stdout: |
535 | line = line.strip() | 535 | line = line.strip() |
536 | if line.startswith(cookieprefix): | 536 | if line.startswith(cookieprefix): |
537 | cookiefile = line[len(cookieprefix):] | 537 | cookiefile = os.path.expanduser(line[len(cookieprefix):]) |
538 | if line.startswith(proxyprefix): | 538 | if line.startswith(proxyprefix): |
539 | proxy = line[len(proxyprefix):] | 539 | proxy = line[len(proxyprefix):] |
540 | # Leave subprocess open, as cookie file may be transient. | 540 | # Leave subprocess open, as cookie file may be transient. |
@@ -553,7 +553,10 @@ def GetUrlCookieFile(url, quiet): | |||
553 | if e.errno == errno.ENOENT: | 553 | if e.errno == errno.ENOENT: |
554 | pass # No persistent proxy. | 554 | pass # No persistent proxy. |
555 | raise | 555 | raise |
556 | yield GitConfig.ForUser().GetString('http.cookiefile'), None | 556 | cookiefile = GitConfig.ForUser().GetString('http.cookiefile') |
557 | if cookiefile: | ||
558 | cookiefile = os.path.expanduser(cookiefile) | ||
559 | yield cookiefile, None | ||
557 | 560 | ||
558 | def _preconnect(url): | 561 | def _preconnect(url): |
559 | m = URI_ALL.match(url) | 562 | m = URI_ALL.match(url) |