cmd/releasebot: remove EDITOR=true hack in favor of --no-edit
The EDITOR env var is set to true to prevent git commit --amend
from pulling up an editor. Use the --no-edit command instead since
the desired behavior is the same only without the hack.
Change-Id: I29df9a566669ce56605169014b9e534b15811368
Reviewed-on: https://go-review.googlesource.com/83335
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/cmd/releasebot/git.go b/cmd/releasebot/git.go
index 5445d26..3b33b26 100644
--- a/cmd/releasebot/git.go
+++ b/cmd/releasebot/git.go
@@ -221,7 +221,7 @@
w.run("git", "cherry-pick", "--abort")
continue
}
- w.run("git", "commit", "--amend") // commit hook puts [release-branch] prefix in
+ w.run("git", "commit", "--amend", "--no-edit") // commit hook puts [release-branch] prefix in
// Search Gerrit to find any pre-existing CL we'd be updating by doing a git mail.
// If one exists and it has the same parent, tree, and commit message as our local
diff --git a/cmd/releasebot/main.go b/cmd/releasebot/main.go
index 5f72e56..01cf1c8 100644
--- a/cmd/releasebot/main.go
+++ b/cmd/releasebot/main.go
@@ -71,8 +71,6 @@
if flag.NArg() == 0 {
usage()
}
- // Make git editor a no-op to allow commands like "git commit --amend".
- os.Setenv("EDITOR", "true")
http.DefaultTransport = newLogger(http.DefaultTransport)