From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Drew DeVault <firstname.lastname@example.org>
Subject: Re: Generating a todo file for non-interactive rebasing
Date: Wed, 17 Apr 2019 18:11:21 +0200 (CEST) [thread overview]
Message-ID: <nycvar.QRO.email@example.com> (raw)
On Tue, 16 Apr 2019, Drew DeVault wrote:
> Whenever I do a particularly long rebase on a branch, sorting out
> conflicts from upstream, I find that it's often useful to have the
> additional context that you get during an interactive rebase, such as
> recent commands run, commands planned to run, and so on, to get a better
> idea of where I'm at during the rebase. These show when you run `git
> status` during an interactive rebase.
> However, the code that generates this report relies on a todo list being
> generated in the rebase state directory. A todo list which consists only
> of "pick" commands is functionally equivalent to a non-interactive
> rebase, the only difference being that the editor isn't shown to the
> Is there any reason not to refactor the rebase command to always
> generate a todo list? This would simplify the internals and provide more
> context to the user during hairy rebases. It might also be useful to run
> --edit-todo if you realize your rebase strategy needs to change partway
> through a rebase which was initially non-interactive.
The default mode of the rebase command is actually not based on picks, but
internally generates mails, puts them into an mbox, and then pretends to
apply those patches from a mailing list.
That mode is obviously very different from the interactive rebase, so
there is not quite the simplification in store that you hoped for.
However, we recently changed the way the --merge backend works, and it is
now indeed backed by the same machinery as the interactive rebase.
Meaning: if you call `git rebase -m <options>...`, you have what you
wished for. This change is part of v2.21.0.
To my surprise, Elijah Newren (who authored that change) then demonstrated
that in most cases, the `--merge` backend is actually *faster* than the
default (`--am`) backend. There were patches floating around to make it
the default rebase backend for that reason, but those patches were not
picked up yet.
Short version: if you add `--merge` or `-m` to your `git rebase`
invocations, you already get what you want.
next prev parent reply other threads:[~2019-04-17 16:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-16 15:37 Drew DeVault
2019-04-17 14:59 ` Phillip Wood
2019-04-17 16:11 ` Johannes Schindelin [this message]
2019-04-17 17:11 ` Drew DeVault
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:
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 \
* 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 inbox:
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).