Re: [PATCH v5 0/4] history: add squash subcommand to fold a range
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Jul 1, 2026, 15:14 UTC
- Message-ID
- <c517bce2-9f39-46ec-8509-bb0893e26ae2@gmail.com>
- In-Reply-To
- <xmqq8q7urfe1.fsf@gitster.g>
On 01/07/2026 14:47, Junio C Hamano wrote:
Show 11 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> writes: > >> The reason we're introducing the history command is to experiment with >> providing a better user interface for rewriting history without being >> bound by the limitations of "git rebase". So I think it would entirely >> appropriate to try a different format for the squash message here. If it >> turns out to be a success then we can see if we want to use it in "git >> rebase" as well. > > Do we know concretely things that are bad in the current way "rebase > -i" works, so that we can experiment deviation from?
Yes - if you apply the way "rebase -i" works to multiple commits you can end up with a message template that has a screen full of commented lines between uncommitted parts of the message. See the example below from earlier in the thread. It is not so much of a problem in "rebase -i" because it only fixes up a single commit at a time so all the commented messages end up at the top of the buffer and at worst you have a few "# fixup! ..." or "# squash! ..." lines mixed in with the uncommitted text.
# This is the combination of 4 commits
# This is the first commit message
Base subjectBase body
# This is the second commit message
# Another subject# Another body
# This is the third commit message
# fixup! Base subject # This is the fourth commit message
# amend! Another subject
A better subjectA better body
Thanks
Phillip