From: Junio C Hamano Date: Mon, 10 Mar 2025 20:54:20 GMT Subject: Re: [PATCH 2/4] rev-list: refactor early option parsing Message-ID: In-Reply-To: <20250310192829.661692-3-jltobler@gmail.com> Justin Tobler writes: > @@ -639,19 +640,15 @@ int cmd_rev_list(int argc, > if (!strcmp(arg, "--exclude-promisor-objects")) { > fetch_if_missing = 0; > revs.exclude_promisor_objects = 1; > - break; > - } > - } > - for (i = 1; i < argc; i++) { > - const char *arg = argv[i]; > - if (skip_prefix(arg, "--missing=", &arg)) { > - if (revs.exclude_promisor_objects) > - die(_("options '%s' and '%s' cannot be used together"), "--exclude-promisor-objects", "--missing"); > - if (parse_missing_action_value(arg)) > - break; > + } else if (skip_prefix(arg, "--missing=", &arg)) { > + parse_missing_action_value(arg); > } > } There is a huge NEEDSWORK comment that essentially says that the above two loops that this patch combines into one is fundamentally broken. I suspect that the remaining two patches in this series would punt and not improve them, but offhand I am not sure if this change is making it harder to fix them properly easier or harder.