From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Elijah Newren <newren@gmail.com>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/3] rebase: introduce --reschedule-failed-exec
Date: Tue, 11 Dec 2018 11:14:39 +0100 (STD) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.1812111104561.43@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <CABPp-BGoJxKFFu+JE9n52t8Fygzf0+mpPSOo8rftR2v0_i+eZw@mail.gmail.com>
Hi Elijah,
On Mon, 10 Dec 2018, Elijah Newren wrote:
> On Mon, Dec 10, 2018 at 1:18 PM Johannes Schindelin via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
> >
> > @@ -1195,6 +1201,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
> > break;
> > }
> >
> > + if (options.reschedule_failed_exec && !is_interactive(&options))
> > + die(_("--reschedule-failed-exec requires an interactive rebase"));
> > +
>
> I was surprised at first that you checked is_interactive() rather than
> checking for --exec being specified. But I guess this is because users
> can manually specify 'exec' lines.
Indeed, that is exactly the reason.
> What if the user specifies an implicitly interactive rebase (i.e. no
> editing of the todo list, such as with --rebase-merges or
> --keep-empty, or soon --strategy or --strategy-option) and also
> doesn't specify --exec?
Then the todo list won't have any `exec` lines, and the flag is irrelevant
(but does not do any harm).
... except in the case that the rebase fails at some stage, the user edits
the todo list with `git rebase --edit-todo` and inserts an `exec` line.
So I would contend that it still makes sense to allow that flag in those
cases, i.e. whenever the user asked for the interactive backend.
> > @@ -534,6 +545,9 @@ then
> > # git-rebase.txt caveats with "unless you know what you are doing"
> > test -n "$rebase_merges" &&
> > die "$(gettext "error: cannot combine '--preserve-merges' with '--rebase-merges'")"
> > +
> > + test -n "$reschedule_failed_exec" &&
> > + die "$(gettext "error: cannot combine '--preserve-merges' with '--reschedule-failed-exec'")"
> > fi
> >
> > if test -n "$rebase_merges"
>
> In the builtin rebase, you checked that --reschedule-failed-exec had
> to be used with an interactive rebase. Here in the legacy rebase you
> have no such check at all.
>
> Not sure if that's an oversight, or if we're at the point where we
> just start intentionally allowing legacy rebase to lag and soon throw
> it out. (When do we get to that point?)
Good point. My thinking was that the legacy rebase does not matter all
that much anymore, I would expect that we get rid of it in v2.21.0.
But you're right, I should not intentionally diverge the functionality out
of sheer laziness.
Will fix.
> The rest of the patch looks good to me.
Thanks!
Dscho
next prev parent reply other threads:[~2018-12-11 10:14 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-10 19:04 [PATCH 0/3] rebase: offer to reschedule failed exec commands automatically Johannes Schindelin via GitGitGadget
2018-12-10 19:04 ` [PATCH 1/3] rebase: introduce --reschedule-failed-exec Johannes Schindelin via GitGitGadget
2018-12-10 23:18 ` Elijah Newren
2018-12-11 10:14 ` Johannes Schindelin [this message]
2018-12-11 16:16 ` Elijah Newren
2018-12-10 19:04 ` [PATCH 2/3] rebase: add a config option to default to --reschedule-failed-exec Johannes Schindelin via GitGitGadget
2021-03-22 11:48 ` [PATCH 0/3] rebase: don't override --no-reschedule-failed-exec with config Ævar Arnfjörð Bjarmason
2021-03-22 11:48 ` [PATCH 1/3] rebase tests: camel-case rebase.rescheduleFailedExec consistently Ævar Arnfjörð Bjarmason
2021-03-22 11:48 ` [PATCH 2/3] rebase tests: use test_unconfig after test_config Ævar Arnfjörð Bjarmason
2021-03-30 13:53 ` Phillip Wood
2021-03-22 11:48 ` [PATCH 3/3] rebase: don't override --no-reschedule-failed-exec with config Ævar Arnfjörð Bjarmason
2021-03-29 14:49 ` Phillip Wood
2021-03-29 16:12 ` Ævar Arnfjörð Bjarmason
2021-03-29 17:15 ` Phillip Wood
2021-03-24 11:50 ` [PATCH 0/3] " Johannes Schindelin
2021-03-30 13:40 ` Phillip Wood
2021-04-09 8:01 ` [PATCH v2 0/2] " Ævar Arnfjörð Bjarmason
2021-04-09 8:01 ` [PATCH v2 1/2] rebase tests: camel-case rebase.rescheduleFailedExec consistently Ævar Arnfjörð Bjarmason
2021-04-09 8:01 ` [PATCH v2 2/2] rebase: don't override --no-reschedule-failed-exec with config Ævar Arnfjörð Bjarmason
2021-04-15 15:24 ` [PATCH v2 0/2] " Phillip Wood
2018-12-10 19:05 ` [PATCH 3/3] rebase: introduce a shortcut for --reschedule-failed-exec Johannes Schindelin via GitGitGadget
2018-12-10 22:08 ` [PATCH 0/3] rebase: offer to reschedule failed exec commands automatically Johannes Sixt
2018-12-10 22:56 ` Stefan Beller
2018-12-11 3:28 ` Junio C Hamano
2018-12-11 10:31 ` Johannes Schindelin
2018-12-11 17:36 ` Stefan Beller
2018-12-10 23:20 ` Elijah Newren
2018-12-11 10:19 ` email lags, was " Johannes Schindelin
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nycvar.QRO.7.76.6.1812111104561.43@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=newren@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).