Hi Elijah, On Mon, 10 Dec 2018, Elijah Newren wrote: > On Mon, Dec 10, 2018 at 1:18 PM Johannes Schindelin via GitGitGadget > <gitgitgadget@xxxxxxxxx> 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