Re: [Bug?] "git diff --no-rename A B"
- From
Jeff King <peff@peff.net>
- Date
- Jan 23, 2024, 00:28 UTC
- Message-ID
- <20240123002824.GA827890@coredump.intra.peff.net>
- In-Reply-To
- <20240122230051.GB814674@coredump.intra.peff.net>
On Mon, Jan 22, 2024 at 06:00:51PM -0500, Jeff King wrote:
Show 8 quoted lines
> then running: > > t/helper/test-tool parse-options --do > > correctly complains about the ambiguity (though amusingly it mentions > "--no-no-doubt" in the error message). And if I add KEEP_UNKNOWN_OPT, > then it gives the wrong behavior. But curiously it does so even with > your patch applied. So I think there may be further fixes needed.
Oh sorry, I'm stupid. Of course it does not complain with KEEP_UNKNOWN_OPT. It treats it as unknown and keeps it!
So with the patch I showed (and adding in KEEP_UNKNOWN_OPT), even without your patch "--do" is handled correctly (it is unknown and left in argv[0]). It is only "--no-do" which is broken, and your patch fixes that.
Sorry for the noise. :)
-Peff