On Thu, Jan 02, 2025 at 06:42:30AM -0800, Junio C Hamano wrote: > > I wonder if revert should have a "squash" mode that reverts all of the > > commits (perhaps in reverse order of application in case they depend on > > each other textually), and then gives you a commit message template > > similar to git-fmt-merge-msg, where we list all of the commits, one per > > line (though probably with their commit ids in this case). > > I am not sure if I follow. Should "revert HEAD~3..HEAD" give such > concatenation of messages, something similar to what "rebase -i" > gives us when seeing multiple "squash"es in a row? I don't think we need to concatenate all of the individual revert messages. I was thinking of producing something more like: <SUBJECT: DESCRIBE YOUR REVERT HERE> Revert the following commits: - 7a8d9efc26 (grep: work around LSan threading race with barrier, 2024-12-29) - 526c0a851b (index-pack: work around LSan threading race with barrier, 2024-12-29) - 7d0037b59a (thread-utils: introduce optional barrier type, 2024-12-29) You could perhaps even auto-populate the subject with: Revert jk/lsan-race-with-barrier~3..jk/lsan-race-with-barrier similar to how git-merge uses "Merge branch ...". But it's a little clunky to read, and unlike merge, it's a lot easier to use names that are not very meaningful (e.g., I checked out a new branch based on that one and then used HEAD~3..HEAD, which is worthless to mention). -Peff