From: kristofferhaugsbakk@fastmail.com Date: Mon, 08 Sep 2025 15:36:13 GMT Subject: [PATCH v3 2/8] git: make the two loops look more symmetric Message-ID: <183dd68d09d7785b449f0c5295094690f7f35509.1757345711.git.code@khaugsbakk.name> In-Reply-To: From: Kristoffer Haugsbakk Rewrite the original conditional here to match the new sibling loop in structure. Signed-off-by: Kristoffer Haugsbakk --- Notes (series): v3 (new): This is just a refactor commit to avoid having to add a “while at it” for such small tweaks for the new context. git.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/git.c b/git.c index 87d61f12594..39dc9f8ec0f 100644 --- a/git.c +++ b/git.c @@ -686,11 +686,9 @@ static void list_builtins(struct string_list *out, unsigned int include_option, if (commands[i].option & include_option) string_list_append(out, commands[i].cmd); } else { - for (size_t i = 0; i < ARRAY_SIZE(commands); i++) { - if (commands[i].option & exclude_option) - continue; - string_list_append(out, commands[i].cmd); - } + for (size_t i = 0; i < ARRAY_SIZE(commands); i++) + if (!(commands[i].option & exclude_option)) + string_list_append(out, commands[i].cmd); } } -- 2.51.0.16.gcd94ab5bf81