git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sequencer: beautify subject of reverts of reverts
@ 2023-03-23 16:22 Oswald Buddenhagen
  2023-03-25 10:39 ` Kristoffer Haugsbakk
  2023-03-28 14:02 ` Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: Oswald Buddenhagen @ 2023-03-23 16:22 UTC (permalink / raw)
  To: git

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

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-28 14:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23 16:22 [PATCH] sequencer: beautify subject of reverts of reverts Oswald Buddenhagen
2023-03-25 10:39 ` Kristoffer Haugsbakk
2023-03-27 22:25   ` Junio C Hamano
2023-03-28  6:04     ` Kristoffer Haugsbakk
2023-03-28 13:23       ` Oswald Buddenhagen
2023-03-28 13:43         ` Kristoffer Haugsbakk
2023-03-28 14:00         ` Junio C Hamano
2023-03-28 14:02 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).