mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Take care of a tilde on cookie file path
This handles cookie file path like "~/.gitcookies". Change-Id: I87ba120a940fff38073d520f83b70654e6a239ba
This commit is contained in:
parent
685320b000
commit
ce7e02601c
@ -534,7 +534,7 @@ def GetUrlCookieFile(url, quiet):
|
||||
for line in p.stdout:
|
||||
line = line.strip()
|
||||
if line.startswith(cookieprefix):
|
||||
cookiefile = line[len(cookieprefix):]
|
||||
cookiefile = os.path.expanduser(line[len(cookieprefix):])
|
||||
if line.startswith(proxyprefix):
|
||||
proxy = line[len(proxyprefix):]
|
||||
# Leave subprocess open, as cookie file may be transient.
|
||||
@ -553,7 +553,10 @@ def GetUrlCookieFile(url, quiet):
|
||||
if e.errno == errno.ENOENT:
|
||||
pass # No persistent proxy.
|
||||
raise
|
||||
yield GitConfig.ForUser().GetString('http.cookiefile'), None
|
||||
cookiefile = GitConfig.ForUser().GetString('http.cookiefile')
|
||||
if cookiefile:
|
||||
cookiefile = os.path.expanduser(cookiefile)
|
||||
yield cookiefile, None
|
||||
|
||||
def _preconnect(url):
|
||||
m = URI_ALL.match(url)
|
||||
|
Loading…
Reference in New Issue
Block a user