From 59af8024e2991b2377085f37062acf68ece50ced Mon Sep 17 00:00:00 2001 From: Katie Hockman Date: Fri, 14 May 2021 17:12:03 -0400 Subject: 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 Run-TryBot: Katie Hockman TryBot-Result: Go Bot Reviewed-by: Russ Cox --- git-codereview/sync.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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") -- cgit v1.3