From: "Björn Gustavsson" <bgustavsson@gmail•com>
To: git@vger•kernel.org
Cc: Junio C Hamano <gitster@pobox•com>
Subject: [PATCH] Fix over-simplified documentation for 'git log -z'
Date: Mon, 23 Nov 2009 08:40:24 +0100 [thread overview]
Message-ID: <4B0A3C68.3010000@gmail.com> (raw)
In commit 64485b4a, 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 <bgustavsson@gmail•com>
---
I wrongly assumed that 'git log' ignores the --raw
and --numstat options, because I tested it in a repository
with only merge commits. They do have an effect for
plain commits, and consequently -z will modify their
behavior for 'git log' too.
This patch applies on 'next'.
Documentation/diff-options.txt | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 18366b1..8707d0e 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -87,19 +87,21 @@ endif::git-format-patch[]
ifndef::git-format-patch[]
-z::
+ifdef::git-log[]
+ Separate the commits with NULs instead of with new newlines.
++
+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.
+endif::git-log[]
+
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.
--
1.6.5.3.298.g39add
reply other threads:[~2009-11-23 7:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B0A3C68.3010000@gmail.com \
--to=bgustavsson@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox