git-codereview: add mail --no-verify option This adds a flag to set git push --no-verify, disabling pre-push hooks. Change-Id: I9ef686bd3ec742901d0138fc9028d65efde83e87 Reviewed-on: https://go-review.googlesource.com/c/review/+/222922 Trust: Damien Neil <dneil@google.com> Run-TryBot: Damien Neil <dneil@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Trust: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/git-codereview/mail.go b/git-codereview/mail.go index 2e6c6a6..44d83d6 100644 --- a/git-codereview/mail.go +++ b/git-codereview/mail.go
@@ -27,6 +27,7 @@ trust = flags.Bool("trust", false, "add a Trust+1 vote to the CL") trybot = flags.Bool("trybot", false, "run trybots on the uploaded CLs") wip = flags.Bool("wip", false, "set the status of a change to Work-in-Progress") + noverify = flags.Bool("no-verify", false, "disable presubmits") ) flags.Var(rList, "r", "comma-separated list of reviewers") flags.Var(ccList, "cc", "comma-separated list of people to CC:") @@ -155,6 +156,9 @@ if *noKeyCheck { args = append(args, "-o", "nokeycheck") } + if *noverify { + args = append(args, "--no-verify") + } args = append(args, "origin", refSpec) run("git", args...)