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

[PATCH 1/4] apply: Clarify the description of -z

From
Björn Gustavsson <bgustavsson@gmail.com>
Date
Nov 22, 2009, 16:19 UTC
Message-ID
<4B09648E.5060203@gmail.com>

The description of -z says that a machine-readable format will be used "when showing the index information". From that description, it is not at all clear which other option it will modify the behaviour of. Explicitly state that -z modifies the behavior of --numstat.

Also correct the description of the "munging" that takes places in the absence of -z, namely that apart from the characters mentioned, double quotes are also escaped and that the pathname will be enclosed in double quotes if any characters are escaped.

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
---
 Documentation/git-apply.txt |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index 5ee8c91..4f791ee 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -87,11 +87,13 @@ the information is read from the current index instead.
 	rejected hunks in corresponding *.rej files.
 
 -z::
-	When showing the index information, do not munge paths,
-	but use NUL terminated machine readable format.  Without
-	this flag, the pathnames output will have TAB, LF, and
-	backslash characters replaced with `\t`, `\n`, and `\\`,
-	respectively.
+	When `--numstat` has been given, do not munge pathnames,
+	but use a NUL-terminated machine-readable format.
++
+Without this flag, each pathname output will have TAB, LF, double quotes,
+and backslash characters replaced with `\t`, `\n`, `\"`, and `\\`,
+respectively, and the pathname will be enclosed in double quotes if
+any of those replacements occurred.
 
 -p<n>::
 	Remove <n> leading slashes from traditional diff paths. The
-- 
1.6.5.3.298.g39add
Next: Junio C Hamano
Message 1 of 2 in “apply: Clarify the description of -z”
  1. 1/4 apply: Clarify the description of -zBjörn Gustavsson, Nov 22, 2009
  2. Junio C HamanoNov 22, 2009

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.