From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood@talktalk.net>
Cc: Git Mailing List <git@vger.kernel.org>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH] implicit interactive rebase: don't run sequence editor
Date: Mon, 28 Jan 2019 10:25:14 -0800 [thread overview]
Message-ID: <xmqq8sz4bpx1.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190128102756.19152-1-phillip.wood@talktalk.net> (Phillip Wood's message of "Mon, 28 Jan 2019 10:27:56 +0000")
Phillip Wood <phillip.wood@talktalk.net> writes:
> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>
> 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 <phillip.wood@dunelm.org.uk>
> ---
Good eyes, and an excellent execution to override the more specific
one ;-)
> builtin/rebase.c | 5 +++--
> git-legacy-rebase.sh | 4 ++--
> t/t3404-rebase-interactive.sh | 5 +++++
> t/t3430-rebase-merges.sh | 2 +-
> t/t7505-prepare-commit-msg-hook.sh | 10 +++++-----
> 5 files changed, 16 insertions(+), 10 deletions(-)
>
> diff --git a/builtin/rebase.c b/builtin/rebase.c
> index 00de70365e..7c11b4ac7f 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;
> }
prev parent reply other threads:[~2019-01-28 18:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 10:27 [PATCH] implicit interactive rebase: don't run sequence editor Phillip Wood
2019-01-28 18:25 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq8sz4bpx1.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=phillip.wood@dunelm.org.uk \
--cc=phillip.wood@talktalk.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).