{"thread":{"id":"21724","subject":"[PATCH] Fix over-simplified documentation for 'git log -z'","startedAt":"2009-11-23T07:40:24Z","lastAt":"2009-11-23T07:40:24Z","messageCount":1,"participants":["Björn Gustavsson"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"128156","messageId":"4B0A3C68.3010000@gmail.com","threadId":"21724","inReplyTo":null,"subject":"[PATCH] Fix over-simplified documentation for 'git log -z'","fromName":"Björn Gustavsson","fromEmail":"bgustavsson@gmail.com","sentAt":"2009-11-23T07:40:24Z","receivedAt":"2009-11-23T07:40:24Z","isPatch":true,"sender":{"key":"bgustavsson@gmail.com","avatar":"https://avatars.githubusercontent.com/u/74840?v=4"},"body":"In commit 64485b4a, the documentation for 'git log -z' was\nsimplified too much. The -z option actually changes the behavior\nof 'git log' in two ways: commits will be ended with a NUL\ninstead of a LF (correctly documented) and the --raw and\n--numstat will have NUL as field terminators (omitted in\nthe documentation for 'git log').\n\nSigned-off-by: Björn Gustavsson <bgustavsson@gmail.com>\n---\nI wrongly assumed that 'git log' ignores the --raw\nand --numstat options, because I tested it in a repository\nwith only merge commits. They do have an effect for\nplain commits, and consequently -z will modify their\nbehavior for 'git log' too.\n\nThis patch applies on 'next'.\n\n Documentation/diff-options.txt |   12 +++++++-----\n 1 files changed, 7 insertions(+), 5 deletions(-)\n\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex 18366b1..8707d0e 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -87,19 +87,21 @@ endif::git-format-patch[]\n ifndef::git-format-patch[]\n \n -z::\n+ifdef::git-log[]\n+\tSeparate the commits with NULs instead of with new newlines.\n++\n+Also, when `--raw` or `--numstat` has been given, do not munge\n+pathnames and use NULs as output field terminators.\n+endif::git-log[]\n ifndef::git-log[]\n \tWhen `--raw` or `--numstat` has been given, do not munge\n \tpathnames and use NULs as output field terminators.\n+endif::git-log[]\n +\n Without this option, each pathname output will have TAB, LF, double quotes,\n and backslash characters replaced with `\\t`, `\\n`, `\\\"`, and `\\\\`,\n respectively, and the pathname will be enclosed in double quotes if\n any of those replacements occurred.\n-endif::git-log[]\n-\n-ifdef::git-log[]\n-\tSeparate the commits with NULs instead of with new newlines.\n-endif::git-log[]\n \n --name-only::\n \tShow only names of changed files.\n-- \n1.6.5.3.298.g39add\n"}]}