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

[PATCH v2 3/3] Documentation: Describe other situations where -z affects git diff

From
Charles Bailey <charles@hashpling.org>
Date
Apr 18, 2010, 18:28 UTC
Message-ID
<20100418182817.GC29329@hashpling.org>
In-Reply-To
<9eaa7a4672f2010c9e6e3b3f473f1c09abcfcc45.1271614677.git.charles@hashpling.org>
-z also alters the behaviour of --name-only and --name-status.
Signed-off-by: Charles Bailey <charles@hashpling.org>
---

As I'm relying on diff --name-only -z "doing the right thing", I quite wanted it to be part of the documented interface.

 Documentation/diff-options.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 60e922e..c9c6c2b 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -94,8 +94,8 @@ Also, when `--raw` or `--numstat` has been given, do not munge
 pathnames and use NULs as output field terminators.
 endif::git-log[]
 ifndef::git-log[]
-	When `--raw` or `--numstat` has been given, do not munge
-	pathnames and use NULs as output field terminators.
+	When `--raw`, `--numstat`, `--name-only` or `--name-status` has been
+	given, do not munge pathnames and use NULs as output field terminators.
 endif::git-log[]
 +
 Without this option, each pathname output will have TAB, LF, double quotes,
-- 
1.7.1.rc1.241.g4e72f
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “stash: Don't overwrite files that have gone from the index”
  1. 2/3 stash: Don't overwrite files that have gone from the indexCharles Bailey, Apr 18, 2010
  2. Junio C HamanoApr 18, 2010
  3. 3/3 Documentation: Describe other situations where -z affects git diffCharles Bailey, Apr 18, 2010
  4. Junio C HamanoApr 18, 2010

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.