git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Jeff King
Message 8 of 8 in “[Bug?] "git diff --no-rename A B"”
  1. Junio C HamanoJan 18, 2024
  2. Dragan SimicJan 18, 2024
  3. Jeff KingJan 20, 2024
  4. René ScharfeJan 20, 2024
  5. Junio C HamanoJan 20, 2024
  6. René ScharfeJan 21, 2024
  7. Jeff KingJan 22, 2024
  8. Jeff KingJan 23, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.