On Fri, Jul 28, 2023 at 08:10:42AM -0700, Junio C Hamano wrote:
And from the above discussion, I wonder if the following would be a
good place to stop:
- The first revert is as before: Revert "original title"
- A revert of a revert becomes: Reapply "original title"
- A revert of a reapply becomes: Revert Reapply "original title"
- A revert of "Revert Reapply" becomes: Reapply Reapply "original title"
- A revert of "Reapply Reapply" becomes: Revert Reapply "original title"
In other words, we accept the fact that we do not need exact number
of times reversions were done, and use that to simplify the output
to make sure we will not spend more than two words in the front of
the title. That would help to keep the original title visible,
while still allowing us to distinguish the ones that was reverted up
to four times (and "Revert Reapply" and "Reapply Reapply" only tell
us "final state is to (discard|accept) the original but it took us
_many_ times", without saying exactly how many).
i would not bother automating it, because it falls into the "you should
get creative when that happens" category (which is codified in the
manual by my reworked patches).
also, the "no more than two words" is sort of arbitrary - one can make a
pretty convincing argument for just one word as well.
finally, just dropping that info would typically result in multiple
(non-trivial) commits with the same summary, which i don't really like.
leaving the uglier long variant (and the user hopefully amending it)
avoids it.
i think i'll steal some of the text i didn't quote for the commit
message, though. ^^
regards