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

Re: [PATCH v3] apply: --intent-to-add should imply --index

From
Raymond E. Pasco <ray@ameretat.dev>
Date
May 3, 2025, 08:22 UTC
Message-ID
<5xsywkqp5nctahl26yb6hrhv5sytbzwvhxqvs5y74e46xepmxq@j7o5kxivw24x>
In-Reply-To
<4e2szrowd43w6lrzawqtddamdxvp6ke65jkzmdoru4gjin7xhn@kaqe7skrktgt>
On 25/05/02 11:51PM, Raymond E. Pasco wrote:
Show 9 quoted lines
> However, the code appears entirely correct. The combination of --cached
> with -N doesn't work, despite the message claiming it does, but it can't
> possibly work because it includes the file in the index, so it can't
> include it as an intent to add in the index. So this just merits a note
> that --intent-to-add is mutually exclusive with both --index and
> --cached.
> 
> If the original author (Johannes Altmanninger) isn't around or doesn't
> want to, I can clean this patch up for resubmission.

In fact, I've just discovered an additional issue that remains even post-patch (it tries to apply the whole diff, even parts that are not new file additions, with ita_only on), so it needs slightly more work than implied above to be complete.

Previous: Raymond E. PascoNext: Raymond E. Pasco
Message 6 of 14 in “RE: [PATCH v3] apply: --intent-to-add should imply --index”
  1. Jason ChoMay 1, 2025
  2. Kristoffer HaugsbakkMay 1, 2025
  3. Junio C HamanoMay 1, 2025
  4. Ryan HodgesMay 2, 2025
  5. Raymond E. PascoMay 3, 2025
  6. Raymond E. PascoMay 3, 2025
  7. 0/5 apply: fix apply --intent-to-addRaymond E. Pasco, May 11, 2025
  8. 1/5 apply: error on --intent-to-add outside gitdirRaymond E. Pasco, May 11, 2025
  9. 2/5 apply: read in the index in --intent-to-add modeRaymond E. Pasco, May 11, 2025
  10. Raymond E. PascoMay 12, 2025
  11. Jason ChoMay 13, 2025
  12. 3/5 apply: only write intents to add for new filesRaymond E. Pasco, May 11, 2025
  13. 4/5 t4140: test apply --intent-to-add interactionsRaymond E. Pasco, May 11, 2025
  14. 5/5 apply docs: clarify wording for --intent-to-addRaymond E. Pasco, May 11, 2025

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.