git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/3] rebase: introduce --reschedule-failed-exec

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 11, 2018, 10:14 UTC
Message-ID
<nycvar.QRO.7.76.6.1812111104561.43@tvgsbejvaqbjf.bet>
In-Reply-To
<CABPp-BGoJxKFFu+JE9n52t8Fygzf0+mpPSOo8rftR2v0_i+eZw@mail.gmail.com>
Hi Elijah,
On Mon, 10 Dec 2018, Elijah Newren wrote:
Show 14 quoted lines
> 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.

Show 18 quoted lines
> > @@ -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

Previous: Elijah NewrenNext: Elijah Newren
Message 19 of 28 in “rebase: offer to reschedule failed exec commands automatically”
  1. 0/3 rebase: offer to reschedule failed exec commands automaticallyJohannes Schindelin via GitGitGadget, Dec 10, 2018
  2. 2/3 rebase: add a config option to default to --reschedule-failed-execJohannes Schindelin via GitGitGadget, Dec 10, 2018
  3. 0/3 rebase: don't override --no-reschedule-failed-exec with configÆvar Arnfjörð Bjarmason, Mar 22, 2021
  4. 1/3 rebase tests: camel-case rebase.rescheduleFailedExec consistentlyÆvar Arnfjörð Bjarmason, Mar 22, 2021
  5. 2/3 rebase tests: use test_unconfig after test_configÆvar Arnfjörð Bjarmason, Mar 22, 2021
  6. Phillip WoodMar 30, 2021
  7. 3/3 rebase: don't override --no-reschedule-failed-exec with configÆvar Arnfjörð Bjarmason, Mar 22, 2021
  8. Phillip WoodMar 29, 2021
  9. Ævar Arnfjörð BjarmasonMar 29, 2021
  10. Phillip WoodMar 29, 2021
  11. Johannes SchindelinMar 24, 2021
  12. Phillip WoodMar 30, 2021
  13. 0/2 rebase: don't override --no-reschedule-failed-exec with configÆvar Arnfjörð Bjarmason, Apr 9, 2021
  14. 1/2 rebase tests: camel-case rebase.rescheduleFailedExec consistentlyÆvar Arnfjörð Bjarmason, Apr 9, 2021
  15. 2/2 rebase: don't override --no-reschedule-failed-exec with configÆvar Arnfjörð Bjarmason, Apr 9, 2021
  16. Phillip WoodApr 15, 2021
  17. 1/3 rebase: introduce --reschedule-failed-execJohannes Schindelin via GitGitGadget, Dec 10, 2018
  18. Elijah NewrenDec 10, 2018
  19. Johannes SchindelinDec 11, 2018
  20. Elijah NewrenDec 11, 2018
  21. 3/3 rebase: introduce a shortcut for --reschedule-failed-execJohannes Schindelin via GitGitGadget, Dec 10, 2018
  22. Johannes SixtDec 10, 2018
  23. Stefan BellerDec 10, 2018
  24. Junio C HamanoDec 11, 2018
  25. Johannes SchindelinDec 11, 2018
  26. Stefan BellerDec 11, 2018
  27. Elijah NewrenDec 10, 2018
  28. email lags, was Re: [PATCH 0/3] rebase: offer to reschedule failed exec commands automaticallyJohannes Schindelin, Dec 11, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.