Re: Git crashed on `git apply --check`
- From
- Tanga 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 @@
+helloWas 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