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

[PATCH] git-apply(1): document --unidiff-zero

From
Jonas Fonseca <fonseca@diku.dk>
Date
Sep 17, 2006, 10:55 UTC
Message-ID
<20060917105538.GA1497@diku.dk>
In-Reply-To
<7v64fm6cuj.fsf@assigned-by-dhcp.cox.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 Documentation/git-apply.txt |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index c76cfff..ee136c1 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -95,6 +95,16 @@ OPTIONS
 	context exist they all must match.  By default no context is
 	ever ignored.
 
+--unidiff-zero::
+	By default, gitlink:git-apply[1] expects that the patch being
+	applied is a unified diff with at least one line of context.
+	This provides good safety measures, but breaks down when
+	applying a diff generated with --unified=0. To bypass these
+	checks use '--unidiff-zero'.
++
+Note, for the reasons stated above usage of context-free patches are
+discouraged.
+
 --apply::
 	If you use any of the options marked "Turns off
 	'apply'" above, gitlink:git-apply[1] reads and outputs the
-- 
1.4.2.g39f1

-- 
Jonas Fonseca
Previous: Junio C Hamano
Message 8 of 8 in “git-apply fails to apply some patches”
  1. Gerrit PapeSep 15, 2006
  2. Junio C HamanoSep 17, 2006
  3. apply --unidiff-zero: loosen sanity checks for --unidiff=0 patchesJunio C Hamano, Sep 17, 2006
  4. Jakub NarebskiSep 17, 2006
  5. Junio C HamanoSep 17, 2006
  6. Jakub NarebskiSep 17, 2006
  7. Junio C HamanoSep 17, 2006
  8. git-apply(1): document --unidiff-zeroJonas Fonseca, Sep 17, 2006

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.