{"thread":{"id":"21706","subject":"[PATCH 1/4] apply: Clarify the description of -z","startedAt":"2009-11-22T16:19:26Z","lastAt":"2009-11-22T17:28:55Z","messageCount":2,"participants":["Björn Gustavsson","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"128109","messageId":"4B09648E.5060203@gmail.com","threadId":"21706","inReplyTo":null,"subject":"[PATCH 1/4] apply: Clarify the description of -z","fromName":"Björn Gustavsson","fromEmail":"bgustavsson@gmail.com","sentAt":"2009-11-22T16:19:26Z","receivedAt":"2009-11-22T16:19:26Z","isPatch":true,"sender":{"key":"bgustavsson@gmail.com","avatar":"https://avatars.githubusercontent.com/u/74840?v=4"},"body":"The description of -z says that a machine-readable format will be\nused \"when showing the index information\". From that description,\nit is not at all clear which other option it will modify the\nbehaviour of. Explicitly state that -z modifies the behavior\nof --numstat.\n\nAlso correct the description of the \"munging\" that takes places\nin the absence of -z, namely that apart from the characters\nmentioned, double quotes are also escaped and that the pathname\nwill be enclosed in double quotes if any characters are escaped.\n\nSigned-off-by: Björn Gustavsson <bgustavsson@gmail.com>\n---\n Documentation/git-apply.txt |   12 +++++++-----\n 1 files changed, 7 insertions(+), 5 deletions(-)\n\ndiff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt\nindex 5ee8c91..4f791ee 100644\n--- a/Documentation/git-apply.txt\n+++ b/Documentation/git-apply.txt\n@@ -87,11 +87,13 @@ the information is read from the current index instead.\n \trejected hunks in corresponding *.rej files.\n \n -z::\n-\tWhen showing the index information, do not munge paths,\n-\tbut use NUL terminated machine readable format.  Without\n-\tthis flag, the pathnames output will have TAB, LF, and\n-\tbackslash characters replaced with `\\t`, `\\n`, and `\\\\`,\n-\trespectively.\n+\tWhen `--numstat` has been given, do not munge pathnames,\n+\tbut use a NUL-terminated machine-readable format.\n++\n+Without this flag, 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 \n -p<n>::\n \tRemove <n> leading slashes from traditional diff paths. The\n-- \n1.6.5.3.298.g39add\n"},{"id":"128115","messageId":"7v8wdyii3s.fsf@alter.siamese.dyndns.org","threadId":"21706","inReplyTo":"4B09648E.5060203@gmail.com","subject":"Re: [PATCH 1/4] apply: Clarify the description of -z","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-11-22T17:28:55Z","receivedAt":"2009-11-22T17:28:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Björn Gustavsson <bgustavsson@gmail.com> writes:\n\n> The description of -z says that a machine-readable format will be\n> used \"when showing the index information\". From that description,\n> it is not at all clear which other option it will modify the\n> behaviour of. Explicitly state that -z modifies the behavior\n> of --numstat.\n>\n> Also correct the description of the \"munging\" that takes places\n> in the absence of -z, namely that apart from the characters\n> mentioned, double quotes are also escaped and that the pathname\n> will be enclosed in double quotes if any characters are escaped.\n>\n> Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>\n> ---\n>  Documentation/git-apply.txt |   12 +++++++-----\n>  1 files changed, 7 insertions(+), 5 deletions(-)\n>\n> diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt\n> index 5ee8c91..4f791ee 100644\n> --- a/Documentation/git-apply.txt\n> +++ b/Documentation/git-apply.txt\n> @@ -87,11 +87,13 @@ the information is read from the current index instead.\n>  \trejected hunks in corresponding *.rej files.\n>  \n>  -z::\n> -\tWhen showing the index information, do not munge paths,\n> -\tbut use NUL terminated machine readable format.  Without\n> -\tthis flag, the pathnames output will have TAB, LF, and\n> -\tbackslash characters replaced with `\\t`, `\\n`, and `\\\\`,\n> -\trespectively.\n\nI think diff-format.txt has the same description; could you please update\nthat to be in sync?\n"}]}