From 891d4a0313edc03f7e2ecb96edec5d30dc182294 Mon Sep 17 00:00:00 2001 From: Phillip Wood Date: Mon, 28 Jan 2019 10:27:56 +0000 Subject: implicit interactive rebase: don't run sequence editor If GIT_SEQUENCE_EDITOR is set then rebase runs it when executing implicit interactive rebases which are supposed to appear non-interactive to the user. Fix this by setting GIT_SEQUENCE_EDITOR=: rather than GIT_EDITOR=:. A couple of tests relied on the old behavior so they are updated to work with the new regime. Signed-off-by: Phillip Wood Signed-off-by: Junio C Hamano --- builtin/rebase.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'builtin') diff --git a/builtin/rebase.c b/builtin/rebase.c index b5c99ec10c..2cb3f4a6a9 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -354,7 +354,8 @@ static int run_specific_rebase(struct rebase_options *opts) argv_array_pushf(&child.env_array, "GIT_CHERRY_PICK_HELP=%s", resolvemsg); if (!(opts->flags & REBASE_INTERACTIVE_EXPLICIT)) { - argv_array_push(&child.env_array, "GIT_EDITOR=:"); + argv_array_push(&child.env_array, + "GIT_SEQUENCE_EDITOR=:"); opts->autosquash = 0; } @@ -475,7 +476,7 @@ static int run_specific_rebase(struct rebase_options *opts) if (is_interactive(opts) && !(opts->flags & REBASE_INTERACTIVE_EXPLICIT)) { strbuf_addstr(&script_snippet, - "GIT_EDITOR=:; export GIT_EDITOR; "); + "GIT_SEQUENCE_EDITOR=:; export GIT_SEQUENCE_EDITOR; "); opts->autosquash = 0; } -- cgit v1.2.3