From: Alejandro Colomar <alx@kernel.org>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: git-rebase-walk
Date: Thu, 1 Oct 2026 17:51:58 +0200 [thread overview]
Message-ID: <ar5-7ZtM6C23H-8m@debian> (raw)
In-Reply-To: <ar5eereSq91xldo-@pks.im>
[-- Attachment #1: Type: text/plain, Size: 2230 bytes --]
Hi Patrick,
> Date: 2026-10-01 15:22:02+0200
> From: Patrick Steinhardt <ps@pks.im>
>
> Hi,
>
> On Thu, Oct 01, 2026 at 01:58:42PM +0200, Alejandro Colomar wrote:
> > Hi!
> >
> > I use this little command to apply iterative rebases, which are easier
> > to handle when there are large conflicts. Are you interested in it?
> >
> > $ cat $(which git-rebase-walk)
> > #!/bin/bash
> >
> > set -Eeufo pipefail;
> >
> > git merge-base HEAD "$1" \
> > | xargs -I{} git log --oneline {}.."$1" \
> > | cut -f1 -d' ' \
> > | tac \
> > | while read -r c; do
> > git rebase "$c";
> > done;
> >
> > The source code is trivial, so I guess I don't need to explain much.
> > It behaves quite nicely, IME.
> >
> > You may of course want to adapt it a little bit for merging in git(1).
> > I could help improve it a little bit.
>
> this reminds me a bit of git-imerge [1]. What this tool does is to
> basically perform a merge between two branches incrementally using a
> matrix. The tool tries to address exactly your use case, which is to
> "present the user with one pairwise conflict at a time for resolution".
Yup, from the description, it seems to do the same thing. Thanks!
I've also seen at least one other tool that does the same thing.
> Maybe that tool is interesting to you.
Not much, because I prefer a 9-line shell script that's robust as a rock
vs. a 4k+ LoC python script for the same functionality. :-)
> But it's certainly fallen a bit
> out of date, as it hasn't received any updates for more than 6 years by
> now. Chances are it stll works alright though.
My script I use it in shadow-utils and in the Linux man-pages project,
and is in use today. I was wondering if there was interest in
integrating it to git(1). If not, I will likely provide it in the
man-pages repository as a help tool (which might end up packed by
distros as part of manpages-utils). Is that okay to you? (I ask mainly
because it's using the git- namespace for commands, so you should at
lease be aware of it.)
Have a lovely day!
Alex
>
> Thanks!
>
> Patrick
>
> [1]: https://github.com/mhagger/git-imerge
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-10-01 15:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 11:58 git-rebase-walk Alejandro Colomar
2026-10-01 13:22 ` git-rebase-walk Patrick Steinhardt
2026-10-01 15:51 ` Alejandro Colomar [this message]
2026-10-02 6:46 ` git-rebase-walk Patrick Steinhardt
2026-10-02 7:19 ` git-rebase-walk Alejandro Colomar
2026-10-03 19:37 ` git-rebase-walk Nico Williams
2026-10-04 10:03 ` git-rebase-walk Phillip Wood
2026-10-05 13:28 ` git-rebase-walk Alejandro Colomar
2026-10-05 13:37 ` git-rebase-walk Alejandro Colomar
2026-10-06 14:01 ` git-rebase-walk Phillip Wood
2026-10-06 14:58 ` git-rebase-walk Nico Williams
2026-10-06 16:45 ` git-rebase-walk Alejandro Colomar
2026-10-08 22:05 ` git-rebase-walk Alejandro Colomar
2026-10-08 22:07 ` git-rebase-walk Alejandro Colomar
2026-10-01 17:31 ` git-rebase-walk Junio C Hamano
2026-10-01 16:10 ` git-rebase-walk Nico Williams
2026-10-01 16:50 ` git-rebase-walk Alejandro Colomar
2026-10-01 17:40 ` git-rebase-walk Nico Williams
2026-10-01 20:29 ` git-rebase-walk Alejandro Colomar
2026-10-01 21:01 ` git-rebase-walk Nico Williams
2026-10-01 21:35 ` git-rebase-walk Nico Williams
2026-10-02 2:49 ` git-rebase-walk Simon Richter
2026-10-02 3:19 ` git-rebase-walk Nico Williams
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=ar5-7ZtM6C23H-8m@debian \
--to=alx@kernel.org \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
/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