git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rebase: clarify conditionals in todo_list_to_strbuf()
@ 2023-03-23 16:22 Oswald Buddenhagen
  2023-03-23 20:32 ` Taylor Blau
  2023-04-28 12:56 ` [PATCH v2] " Oswald Buddenhagen
  0 siblings, 2 replies; 14+ messages in thread
From: Oswald Buddenhagen @ 2023-03-23 16:22 UTC (permalink / raw)
  To: git

Make it obvious that the two conditional branches are mutually
exclusive.

As a drive-by, remove a pair of unnecessary braces.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
---
 sequencer.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/sequencer.c b/sequencer.c
index 3be23d7ca2..9169876441 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -5868,12 +5868,9 @@ static void todo_list_to_strbuf(struct repository *r, struct todo_list *todo_lis
 			if (item->command == TODO_FIXUP) {
 				if (item->flags & TODO_EDIT_FIXUP_MSG)
 					strbuf_addstr(buf, " -c");
-				else if (item->flags & TODO_REPLACE_FIXUP_MSG) {
+				else if (item->flags & TODO_REPLACE_FIXUP_MSG)
 					strbuf_addstr(buf, " -C");
-				}
-			}
-
-			if (item->command == TODO_MERGE) {
+			} else if (item->command == TODO_MERGE) {
 				if (item->flags & TODO_EDIT_MERGE_MSG)
 					strbuf_addstr(buf, " -c");
 				else
-- 
2.40.0.152.g15d061e6df


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

end of thread, other threads:[~2023-08-11 11:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 16:22 [PATCH] rebase: clarify conditionals in todo_list_to_strbuf() Oswald Buddenhagen
2023-03-23 20:32 ` Taylor Blau
2023-03-24  8:59   ` Oswald Buddenhagen
2023-03-24 14:39   ` Phillip Wood
2023-04-28 12:56 ` [PATCH v2] " Oswald Buddenhagen
2023-05-02 18:51   ` Felipe Contreras
2023-08-07 17:09   ` [PATCH v3] " Oswald Buddenhagen
2023-08-07 20:28     ` Junio C Hamano
2023-08-09 16:13       ` Oswald Buddenhagen
2023-08-09 19:39         ` Junio C Hamano
2023-08-10 12:08           ` Oswald Buddenhagen
2023-08-10 16:03             ` Junio C Hamano
2023-08-11 10:33               ` Oswald Buddenhagen
2023-08-11 11:41                 ` Richard Kerry

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).