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

Re: Git crashed on `git apply --check`

From
TJTanga Joris <tangajoris@gmail.com>
Date
Oct 24, 2026, 06:10 UTC
Message-ID
<20261024061017.100191-1-tangajoris@gmail.com>
In-Reply-To
<CALdwsC1cMKZgRPZA+pBaJe4PPs9q9W0K9CQLmM2bgUCyysTB-w@mail.gmail.com>
Hi,

Thanks for the report. I was unable to reproduce it with the patch as quoted (the "diff --git" line is wrapped in your mail), but I can trigger the same assertion on current master, and on 2.43, when the "--- /dev/null" line comes before "new file mode" in the header:

    diff --git a/n.txt b/n.txt
    --- /dev/null
    +++ b/n.txt
    new file mode 100644
    @@ -0,0 +1 @@
    +hello

Was your patch handwritten or generated by a tool, and could you please check whether its header lines are in that order? If you can, please attach the exact file so that we can confirm it is the same problem.

Thanks, Tanga

Previous: GingrspacecadetNext: Tanga Joris
Message 2 of 3 in “Git crashed on `git apply --check`”
  1. GingrspacecadetOct 17, 2026
  2. Tanga JorisOct 24, 2026
  3. Tanga JorisOct 25, 2026

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.