aboutsummaryrefslogtreecommitdiff
path: root/git-codereview/review.go
diff options
context:
space:
mode:
authorsiddharth ravikumar <s@ricketyspace.net>2023-09-11 22:34:15 -0400
committerGopher Robot <gobot@golang.org>2023-10-18 12:53:42 +0000
commit8be3abfe097ddf04b28eec2783249d29b3a48dae (patch)
tree7839249866fdd7da93221eaf0ef9ee2b82e44ba4 /git-codereview/review.go
parent406355a4df8af4b140e43c56c0c4c9869471edca (diff)
downloadgo-x-review-1.8.0.tar.xz
git-codereview: make hooks command report conflicting hooksv1.8.0
Display warning message when a hook is already installed and is different from the one installed by git-codereview. Improves upon CL 184417. Fixes golang/go#16777 Change-Id: I7579a3e86572e8b74f92317973e7cc7094b3942d Reviewed-on: https://go-review.googlesource.com/c/review/+/377034 Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'git-codereview/review.go')
-rw-r--r--git-codereview/review.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-codereview/review.go b/git-codereview/review.go
index 1e79114..fe5bf12 100644
--- a/git-codereview/review.go
+++ b/git-codereview/review.go
@@ -94,7 +94,7 @@ func main() {
fmt.Fprintf(stdout(), help, progName)
return // avoid installing hooks.
case "hooks": // in case hooks weren't installed.
- installHook(args)
+ installHook(args, false)
return // avoid invoking installHook twice.
case "branchpoint":
@@ -135,7 +135,7 @@ func main() {
hookArgs = append(hookArgs, arg)
}
}
- installHook(hookArgs)
+ installHook(hookArgs, true)
}
cmd(args)