diff options
| author | Daniel Lublin <daniel@lublin.se> | 2019-11-12 08:54:55 +0100 |
|---|---|---|
| committer | Josh Bleecher Snyder <josharian@gmail.com> | 2019-11-12 15:45:06 +0000 |
| commit | be34946817dcf706c2f9448ebd50102472c552f6 (patch) | |
| tree | e1ff91a0d1832a4547dec273884578a32771a6ce /git-codereview | |
| parent | 44454f6a837226d68c264174b72b85084f01c1a7 (diff) | |
| download | go-x-review-be34946817dcf706c2f9448ebd50102472c552f6.tar.xz | |
git-codereview: pick up URL-specific cookieFile config
Example config:
[http "https://go.googlesource.com"]
cookiefile = ~/.gitcookies-googlesource
The --get-urlmatch option falls back to non-URL-specific config.
Fixes golang/go#35496
Change-Id: I2410ff5b55e2bf9214fcc2cad16095facec78434
Reviewed-on: https://go-review.googlesource.com/c/review/+/206697
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'git-codereview')
| -rw-r--r-- | git-codereview/api.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-codereview/api.go b/git-codereview/api.go index 8440cb5..a3375ea 100644 --- a/git-codereview/api.go +++ b/git-codereview/api.go @@ -145,7 +145,7 @@ func loadAuth() { // First look in Git's http.cookiefile, which is where Gerrit // now tells users to store this information. - if cookieFile, _ := trimErr(cmdOutputErr("git", "config", "--path", "http.cookiefile")); cookieFile != "" { + if cookieFile, _ := trimErr(cmdOutputErr("git", "config", "--path", "--get-urlmatch", "http.cookiefile", auth.url)); cookieFile != "" { data, _ := ioutil.ReadFile(cookieFile) maxMatch := -1 for _, line := range lines(string(data)) { |
