Skip to content

Commit 5c931c8

Browse files
bjornggitster
authored andcommitted
Fix over-simplified documentation for 'git log -z'
In commit 64485b4, the documentation for 'git log -z' was simplified too much. The -z option actually changes the behavior of 'git log' in two ways: commits will be ended with a NUL instead of a LF (correctly documented) and the --raw and --numstat will have NUL as field terminators (omitted in the documentation for 'git log'). Signed-off-by: Björn Gustavsson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c34ec65 commit 5c931c8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Documentation/diff-options.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,21 @@ endif::git-format-patch[]
8787
ifndef::git-format-patch[]
8888

8989
-z::
90+
ifdef::git-log[]
91+
Separate the commits with NULs instead of with new newlines.
92+
+
93+
Also, when `--raw` or `--numstat` has been given, do not munge
94+
pathnames and use NULs as output field terminators.
95+
endif::git-log[]
9096
ifndef::git-log[]
9197
When `--raw` or `--numstat` has been given, do not munge
9298
pathnames and use NULs as output field terminators.
99+
endif::git-log[]
93100
+
94101
Without this option, each pathname output will have TAB, LF, double quotes,
95102
and backslash characters replaced with `\t`, `\n`, `\"`, and `\\`,
96103
respectively, and the pathname will be enclosed in double quotes if
97104
any of those replacements occurred.
98-
endif::git-log[]
99-
100-
ifdef::git-log[]
101-
Separate the commits with NULs instead of with new newlines.
102-
endif::git-log[]
103105

104106
--name-only::
105107
Show only names of changed files.

0 commit comments

Comments
 (0)