From: Patrick Steinhardt Date: Mon, 16 Nov 2026 07:46:56 GMT Subject: Re: [PATCH v4 00/12] builtin/rerere: convert to use subcommands Message-ID: In-Reply-To: <20261114072240.DBIRJ%taahol@utu.fi> On Sat, Nov 14, 2026 at 09:22:40AM +0200, Tuomas Ahola wrote: > Junio C Hamano wrote: > > > Phillip Wood writes: > > > > > On 13/11/2026 18:09, Junio C Hamano wrote: > > >> > > >> $ git checkout ps/rerere-subcommands > > >> $ edit rerere.h > > >> $ git log --oneline --first-parent master.. > > >> $ git commit -a --fixup HEAD~10 > > >> $ git rebase --autosquash HEAD~11 > > >> > > >> By the way, I wonder if we can simplify the last three steps in any > > >> way? > > >> > > >> * We can use 'HEAD^{/^rerere: convert flags}' instead of counting. > > >> > > >> * The last "rebase" does not have to be on HEAD~11; as long as it > > >> covers HEAD~10 it is OK, but we cannot use 'master' as I am *not* > > >> interested in taking any new development from there, and I do not > > >> want to worry about what the command would do on the merges the > > >> topic has as synthetic base. > > > > > > So long as you've set an upstream branch, you can use "--keep-base" and > > > omit the upstream commit. > > > > I do not think I want to set upstream for ~600 topic branches (among > > ~100 are still in flight) I keep around. I was hoping that after > > making fixup changes in my editor and adding them to the index > > > > $ edit rerere.h > > $ git add -u > > > > A single command that names the target of the added change > > > > $ git fixup HEAD~10 > > > > would automatically do the two "commit && rebase" commands. > > > > Which is exactly what 'git history fixup HEAD~10' strives to do, isn't it? Yup. The only part still missing there to help Junio's case is to replay merge commits. Once it supports that you can say `git history fixup "HEAD^{/^rerere: convert flags}"`. Patrick