diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 2b37193a37..18366b1be6 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -85,10 +85,21 @@ ifndef::git-format-patch[] endif::git-format-patch[] ifndef::git-format-patch[] + -z:: - NUL-line termination on output. This affects the `--raw` - output field terminator. Also output from commands such - as `git-log` will be delimited with NUL between commits. +ifndef::git-log[] + When `--raw` or `--numstat` has been given, do not munge + pathnames and use NULs as output field terminators. ++ +Without this option, 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. +endif::git-log[] + +ifdef::git-log[] + Separate the commits with NULs instead of with new newlines. +endif::git-log[] --name-only:: Show only names of changed files. diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index 5ee8c91f2d..0156ca9112 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 option, 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:: Remove leading slashes from traditional diff paths. The