Re: "git bisect run" strips "--log" from the list of arguments
- From
Jeff King <peff@peff.net>
- Date
- Nov 4, 2022, 12:51 UTC
- Message-ID
- <Y2UKzV7ptjMdHcfh@coredump.intra.peff.net>
- In-Reply-To
- <Y2Ty6KZT8iACqHf+@danh.dev>
On Fri, Nov 04, 2022 at 06:10:02PM +0700, Đoàn Trần Công Danh wrote:
> I think we should use OPT_SUBCOMMAND to parse bisect--helper > subcommand instead, which would pave ways for easier converting to > built-int git-bisect. This huge patch, which could be splited into > 2 patches can fix the problem:
Yeah, I haven't really dug into the subcommand stuff before, but I noticed while poking at the low-level callback code that it may stop the parsing.
If so, then yes, I think that fixes the problem. But does it break other modes, that want to be parsing "--log"? It sounds from other responses in the thread that no, nobody actually cares about the "--log" flag (and that matches my reading of the code; nobody looks at the nolog variable we set).
The other obvious problem with switching to subcommands is that it changes the caller-visible name (to drop the "--"). But that should be OK here, as we make no promises about what's in helper command like bisect--helper.
So yeah, that does seem like a better path forward.
-Peff