Thread (115 messages) 115 messages, 7 authors, 2d ago

Re: [PATCH v8 0/5] history: add squash subcommand to fold a range

From: Ben Knoble <hidden>
Date: 2026-07-14 12:36:21

Le 14 juil. 2026 à 00:45, Matt Hunter [off-list ref] a écrit :

On Fri Jul 10, 2026 at 5:06 AM EDT, Harald Nordgren via GitGitGadget wrote:
quoted
Adds git history squash <revision-range> to fold a range of commits.
[snip]
I'll mention as well that I really like the decisions made for how this
command handles squashing a bunch of related fixups.  This "fixup
consolidation" is a use-case that this command may steal away from rebase
for me.  And the way a final amend! is handled in this case is what got me
thinking about it in the general case.

Thanks for the work on this topic!
Ditto! I suspect that using a combination of « git history squash » and « git replay » to emulate « git rebase » in non-interactive autosquash mode will be much faster, too, due to the differences in implementation. If that proves to be the case and we can safely do so with feature compatibility, I wonder if it will be worth making the non-interactive autosquash rebase actually delegate through a history squash + replay.

I’m sure there’s a few instances that couldn’t be done (for example when the special! commits cross the current range and upstream; that is, a fixup! for an upstream commit or some such oddity;; there are also conflicts to consider), but in the cases it can be it ought to be a performance win.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help