[PATCH] sequencer: beautify subject of reverts of reverts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@xxxxxx>
---
 sequencer.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sequencer.c b/sequencer.c
index 3be23d7ca2..853b4ed334 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2234,6 +2234,9 @@ static int do_pick_commit(struct repository *r,
 		if (opts->commit_use_reference) {
 			strbuf_addstr(&msgbuf,
 				"# *** SAY WHY WE ARE REVERTING ON THE TITLE LINE ***");
+		} else if (starts_with(msg.subject, "Revert \"")) {
+			strbuf_addstr(&msgbuf, "Reapply ");
+			strbuf_addstr(&msgbuf, msg.subject + 7);
 		} else {
 			strbuf_addstr(&msgbuf, "Revert \"");
 			strbuf_addstr(&msgbuf, msg.subject);
-- 
2.40.0.152.g15d061e6df




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux