]> git.ipfire.org Git - thirdparty/git.git/commit
sequencer: beautify subject of reverts of reverts
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>
Sat, 2 Sep 2023 07:20:35 +0000 (09:20 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 2 Sep 2023 22:20:43 +0000 (15:20 -0700)
commit883cb1b8f86d437a9d664ec046fa66e5e24f4a19
treea7b411dc0b721e5e9d2950149b5596fe4ef8e885
parentfac96dfbb1c24369ba7d37a5affd8adfe6c650fd
sequencer: beautify subject of reverts of reverts

Instead of generating a silly-looking `Revert "Revert "foo""`, make it
a more humane `Reapply "foo"`.

This is done for two reasons:
- To cover the actually common case of just a double revert.
- To encourage people to rewrite summaries of recursive reverts by
  setting an example (a subsequent commit will also do this explicitly
  in the documentation).

To achieve these goals, the mechanism does not need to be particularly
sophisticated. Therefore, more complicated alternatives which would
"compress more efficiently" have not been implemented.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
t/t3501-revert-cherry-pick.sh