summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-04-08 20:23:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-04-08 20:23:26 (GMT)
commit82fd285e4606b941bd2bf79be700fb0371599c18 (patch)
treea2cd3d05f5bff362fee7cb380065e801ddfb02bf /builtin
parent22eee7f4554e777de93134c0ae06ee611bd570a4 (diff)
parent39edfd5cbc4d168db19ec1bc867d78ec7211ec39 (diff)
downloadgit-82fd285e4606b941bd2bf79be700fb0371599c18.zip
git-82fd285e4606b941bd2bf79be700fb0371599c18.tar.gz
git-82fd285e4606b941bd2bf79be700fb0371599c18.tar.bz2
Merge branch 'en/sequencer-edit-upon-conflict-fix'
"git cherry-pick/revert" with or without "--[no-]edit" did not spawn the editor as expected (e.g. "revert --no-edit" after a conflict still asked to edit the message), which has been corrected. * en/sequencer-edit-upon-conflict-fix: sequencer: fix edit handling for cherry-pick and revert messages
Diffstat (limited to 'builtin')
-rw-r--r--builtin/revert.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/revert.c b/builtin/revert.c
index 314a86c..237f2f1 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -182,7 +182,7 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts)
"--signoff", opts->signoff,
"--no-commit", opts->no_commit,
"-x", opts->record_origin,
- "--edit", opts->edit,
+ "--edit", opts->edit > 0,
NULL);
if (cmd) {
@@ -230,8 +230,6 @@ int cmd_revert(int argc, const char **argv, const char *prefix)
struct replay_opts opts = REPLAY_OPTS_INIT;
int res;
- if (isatty(0))
- opts.edit = 1;
opts.action = REPLAY_REVERT;
sequencer_init_config(&opts);
res = run_sequencer(argc, argv, &opts);