aboutsummaryrefslogtreecommitdiff
path: root/git-codereview
diff options
context:
space:
mode:
authorKatie Hockman <katie@golang.org>2021-05-14 17:12:03 -0400
committerKatie Hockman <katie@golang.org>2021-05-18 20:24:57 +0000
commit59af8024e2991b2377085f37062acf68ece50ced (patch)
treeacc614059c9e0cd88392f82263e0b527e7233ffd /git-codereview
parent2465c8e799238385f42c2e82d9f37a301cb066d0 (diff)
downloadgo-x-review-59af8024e2991b2377085f37062acf68ece50ced.tar.xz
git-codereview: set GIT_GOFMT_HOOK=off for sync-branch
When doing a merge, it's unlikely that someone would want to run gofmt for files they didn't edit, so turn that off by default. Change-Id: I6c95b866740d5deda575feda256eee35dba3d9d1 Reviewed-on: https://go-review.googlesource.com/c/review/+/320269 Trust: Katie Hockman <katie@golang.org> Run-TryBot: Katie Hockman <katie@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'git-codereview')
-rw-r--r--git-codereview/sync.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-codereview/sync.go b/git-codereview/sync.go
index b079c84..2d93bcb 100644
--- a/git-codereview/sync.go
+++ b/git-codereview/sync.go
@@ -125,7 +125,8 @@ func writeSyncBranchStatus(status *syncBranchStatus) {
}
func cmdSyncBranch(args []string) {
- os.Setenv("GIT_EDITOR", ":") // do not bring up editor during merge, commit
+ os.Setenv("GIT_EDITOR", ":") // do not bring up editor during merge, commit
+ os.Setenv("GIT_GOFMT_HOOK", "off") // do not require gofmt during merge
var cont, mergeBackToParent bool
flags.BoolVar(&cont, "continue", false, "continue after merge conflicts")