aboutsummaryrefslogtreecommitdiff
path: root/git-codereview/api.go
diff options
context:
space:
mode:
authorDaniel Lublin <daniel@lublin.se>2019-11-12 08:54:55 +0100
committerJosh Bleecher Snyder <josharian@gmail.com>2019-11-12 15:45:06 +0000
commitbe34946817dcf706c2f9448ebd50102472c552f6 (patch)
treee1ff91a0d1832a4547dec273884578a32771a6ce /git-codereview/api.go
parent44454f6a837226d68c264174b72b85084f01c1a7 (diff)
downloadgo-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/api.go')
-rw-r--r--git-codereview/api.go2
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)) {