From: Phillip Wood Date: Tue, 30 Jun 2026 13:48:20 GMT Subject: Re: [PATCH v5 0/4] history: add squash subcommand to fold a range Message-ID: <4b505228-4846-4a48-9255-e249f4e70a1f@gmail.com> In-Reply-To: On 29/06/2026 22:13, Harald Nordgren wrote: >> You've trimmed the line where I said >> >> >> Possibly with a comment before each message saying where it came >> >> from. > > Sorry about that! Can you show me the example of what it would look > like? It's much easier for me to reason about it then. For the commits 123 Commit one 456 Commit two 789 fixup! Commit one abc squash! Commit two def amend! Commit one It would look something like # This is the combination of the following commits: # 123 Commit one # 789 fixup! Commit one # def amend! Commit one # 456 Commit two # abc squash! Commit two A better commit one subject A better commit one body # ------------------------------------ Commit two Commit two body # squash! Commit two More text for commit two I've rearranged the commits in the summary to keep fixup commits with their targets instead of listing them in the same order of "git log --reverse". As we're dropping uninteresting messages I not sure there is much point in numbering them[1] so I've just used a plain separator to show where a message ends. For squash! commits commenting out the subject shows where the original message ends and the message from the squash! commit begins. I'm on the fence as to whether it is worth having # amend! Commit one above the first message Thanks Phillip [1] If we really want to number things we could number each commit in the summary and then use that to label it in the message template with separators like # This is the message from commit instead of separating them with # ----------------------------