From: Harald Nordgren Date: Tue, 14 Jul 2026 08:38:34 GMT Subject: Re: [PATCH v8 0/5] history: add squash subcommand to fold a range Message-ID: In-Reply-To: > This feature looks like it's coming together pretty well imo. I just have > one observation I want to comment on: > > I noticed that 'git history squash ', when --reedit-message is > omitted, will ignore any amend! message in the range that targets the > first folded commit. > > On the surface, this makes sense. The feature is pretty explicit that > it will faithfully stick with the first commit's message, unless > modified by use of --reedit-message. > > However, this edge case is a little surprising, given that > 'git history squash' seems to be aware of the semantics of fixup!, amend!, > and squash! messages whether --reedit-message was given or not. For instance, > the default command notices when the range contains a squash! commit whose > target is elsewhere (a useful feature). It seems consistent then, that the > default command would incorporate an amend! it is aware of when placing the > "first commit's" message in the resulting squash. This seems useful to me > as well. > > At the same time, I can understand why the current implementation does > what it does. So I'm not entirely sure what the correct answer is here. > > 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! Thanks! That's an interesting observation, I'll see what I can do about it. Harald