{"thread":{"id":"45177","subject":"[PATCH] Documentation: Link git-ls-files to core.quotePath variable.","startedAt":"2017-02-19T22:08:16Z","lastAt":"2017-02-28T21:59:22Z","messageCount":18,"participants":["Andreas Heiduk","Junio C Hamano","Philip Oakley","Jakub Narębski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"312095","messageId":"2b0ce702-60de-534b-8a86-5c7ae84060de@gmail.com","threadId":"45177","inReplyTo":null,"subject":"[PATCH] Documentation: Link git-ls-files to core.quotePath variable.","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-02-19T22:05:59Z","receivedAt":"2017-02-19T22:08:16Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"Add a hint for script writers where additional quoting can be configured.\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\n---\n Documentation/git-ls-files.txt | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt\nindex 446209e..19e0636 100644\n--- a/Documentation/git-ls-files.txt\n+++ b/Documentation/git-ls-files.txt\n@@ -198,7 +198,8 @@ path. (see linkgit:git-read-tree[1] for more information on state)\n \n When `-z` option is not used, TAB, LF, and backslash characters\n in pathnames are represented as `\\t`, `\\n`, and `\\\\`,\n-respectively.\n+respectively. The path is also quoted according to the\n+configuration variable `core.quotePath` (see linkgit:git-config[1]).\n \n \n Exclude Patterns\n-- \n2.7.4\n"},{"id":"312223","messageId":"xmqqh93nfeyj.fsf@gitster.mtv.corp.google.com","threadId":"45177","inReplyTo":"2b0ce702-60de-534b-8a86-5c7ae84060de@gmail.com","subject":"Re: [PATCH] Documentation: Link git-ls-files to core.quotePath variable.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-02-21T20:48:04Z","receivedAt":"2017-02-21T20:48:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Heiduk <asheiduk@gmail.com> writes:\n\n> Add a hint for script writers where additional quoting can be configured.\n>\n> Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>\n> ---\n>  Documentation/git-ls-files.txt | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt\n> index 446209e..19e0636 100644\n> --- a/Documentation/git-ls-files.txt\n> +++ b/Documentation/git-ls-files.txt\n> @@ -198,7 +198,8 @@ path. (see linkgit:git-read-tree[1] for more information on state)\n>  \n>  When `-z` option is not used, TAB, LF, and backslash characters\n>  in pathnames are represented as `\\t`, `\\n`, and `\\\\`,\n> -respectively.\n> +respectively. The path is also quoted according to the\n> +configuration variable `core.quotePath` (see linkgit:git-config[1]).\n\nI was waiting for others to comment on this patch but nobody seems\nto be interested.  Which is a bit sad, as this may not be a bad\nidea.\n\nIf we refer to core.quotePath, the mention of control characters\nbeing quoted can also be omitted, I think, as that is part of what\nappears in the description of core.quotePath variable.\n\nAlternatively, instead of referring to another page, we can spend\nthe additional lines to say what is more interesting to most of the\nreaders from that page, e.g.\n\n    When `-z` option is not used, a pathname with \"unusual\" characters\n    in it is quoted by enclosing it in a double-quote pair and with\n    backslashes the same way strings in C source code are quoted.  By\n    setting core.quotePath configuration to false, the bytes whose\n    values are higher than 0x80 are output verbatim.\n\n"},{"id":"312269","messageId":"61a3e1a7-e70c-cb68-184f-95dff28d1271@gmail.com","threadId":"45177","inReplyTo":"xmqqh93nfeyj.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] Documentation: Link git-ls-files to core.quotePath variable.","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-02-22T01:20:00Z","receivedAt":"2017-02-22T01:20:23Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"Am 21.02.2017 um 21:48 schrieb Junio C Hamano:\n> \n> I was waiting for others to comment on this patch but nobody seems\n> to be interested.  Which is a bit sad, as this may not be a bad\n> idea.\n> \n> If we refer to core.quotePath, the mention of control characters\n> being quoted can also be omitted, I think, as that is part of what\n> appears in the description of core.quotePath variable.\n> \n> Alternatively, instead of referring to another page, we can spend\n> the additional lines to say what is more interesting to most of the\n> readers from that page, e.g.\n> \n>     When `-z` option is not used, a pathname with \"unusual\" characters\n>     in it is quoted by enclosing it in a double-quote pair and with\n>     backslashes the same way strings in C source code are quoted.  By\n>     setting core.quotePath configuration to false, the bytes whose\n>     values are higher than 0x80 are output verbatim.\n>\n\nWithout `-z` but with core.quotePath=false the path may still be\nsurrounded with double-quotes if it contains control characters (and\nsome more). The documentation in `core.quotePath` mentions this, your\n\"inline\" alternative does not.\n\nI will send second patch. :-)\n\n"},{"id":"312270","messageId":"e55b3cb7-65bf-1609-2e8d-823b4336e07a@gmail.com","threadId":"45177","inReplyTo":"xmqqh93nfeyj.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] Documentation: Link git-ls-files to core.quotePath variable.","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-02-22T01:38:21Z","receivedAt":"2017-02-22T01:38:29Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"[PATCH] Documentation: Clarify core.quotePath, remove cruft in\n git-ls-files.\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\n---\n\nI have merged the best parts about quoting into the core.quotePath\ndescription and cleaned up the text in git-ls-files.txt regarding the\ncontrol characters.\n\n\n Documentation/config.txt       | 22 ++++++++++++----------\n Documentation/git-ls-files.txt | 11 ++++++-----\n 2 files changed, 18 insertions(+), 15 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex f4721a0..25e65ae 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -340,16 +340,18 @@ core.checkStat::\n \tall fields, including the sub-second part of mtime and ctime.\n\n core.quotePath::\n-\tThe commands that output paths (e.g. 'ls-files',\n-\t'diff'), when not given the `-z` option, will quote\n-\t\"unusual\" characters in the pathname by enclosing the\n-\tpathname in a double-quote pair and with backslashes the\n-\tsame way strings in C source code are quoted.  If this\n-\tvariable is set to false, the bytes higher than 0x80 are\n-\tnot quoted but output as verbatim.  Note that double\n-\tquote, backslash and control characters are always\n-\tquoted without `-z` regardless of the setting of this\n-\tvariable.\n+\tCommands that output paths (e.g. 'ls-files', 'diff'), will\n+\tquote \"unusual\" characters in the pathname by enclosing the\n+\tpathname in double-quotes and escaping those characters with\n+\tbackslashes in the same way C escapes control characters (e.g.\n+\t`\\t` for TAB, `\\n` for LF, `\\\\` for backslash) or bytes with\n+\tvalues larger than 0x80 (e.g. octal `\\265` for \"micro\").  If\n+\tthis variable is set to false, bytes higher than 0x80 are not\n+\tconsidered \"unusual\" any more.  Double-quotes, backslash and\n+\tcontrol characters are always escaped regardless of the\n+\tsetting of this variable.  Many commands can output pathnames\n+\tcompletely verbatim using the `-z` option. The default value is\n+\ttrue.\n\n core.eol::\n \tSets the line ending type to use in the working directory for\ndiff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt\nindex d2b17f2..88df561 100644\n--- a/Documentation/git-ls-files.txt\n+++ b/Documentation/git-ls-files.txt\n@@ -76,7 +76,8 @@ OPTIONS\n \tsucceed.\n\n -z::\n-\t\\0 line termination on output.\n+\t\\0 line termination on output and do not quote filenames.\n+\tSee OUTPUT below for more information.\n\n -x <pattern>::\n --exclude=<pattern>::\n@@ -192,10 +193,10 @@ the index records up to three such pairs; one from\ntree O in stage\n the user (or the porcelain) to see what should eventually be recorded\nat the\n path. (see linkgit:git-read-tree[1] for more information on state)\n\n-When `-z` option is not used, TAB, LF, and backslash characters\n-in pathnames are represented as `\\t`, `\\n`, and `\\\\`,\n-respectively. The path is also quoted according to the\n-configuration variable `core.quotePath` (see linkgit:git-config[1]).\n+Without the `-z` option pathnamens with \"unusual\" characters are\n+quoted as explained for the configuration variable `core.quotePath`\n+(see linkgit:git-config[1]).  Using `-z` the filename is output\n+verbatim and the line is terminated by a NUL byte.\n\n\n Exclude Patterns\n-- \n2.7.4\n\n"},{"id":"312323","messageId":"xmqqbmtucedo.fsf@gitster.mtv.corp.google.com","threadId":"45177","inReplyTo":"e55b3cb7-65bf-1609-2e8d-823b4336e07a@gmail.com","subject":"Re: [PATCH] Documentation: Link git-ls-files to core.quotePath variable.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-02-22T17:41:07Z","receivedAt":"2017-02-22T17:41:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Heiduk <asheiduk@gmail.com> writes:\n\n> [PATCH] Documentation: Clarify core.quotePath, remove cruft in\n>  git-ls-files.\n>\n> Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>\n> ---\n>\n> I have merged the best parts about quoting into the core.quotePath\n> description and cleaned up the text in git-ls-files.txt regarding the\n> control characters.\n>\n>\n>  Documentation/config.txt       | 22 ++++++++++++----------\n>  Documentation/git-ls-files.txt | 11 ++++++-----\n>  2 files changed, 18 insertions(+), 15 deletions(-)\n>\n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index f4721a0..25e65ae 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -340,16 +340,18 @@ core.checkStat::\n>  \tall fields, including the sub-second part of mtime and ctime.\n>\n>  core.quotePath::\n> -\tThe commands that output paths (e.g. 'ls-files',\n> -\t'diff'), when not given the `-z` option, will quote\n> -\t\"unusual\" characters in the pathname by enclosing the\n> -\tpathname in a double-quote pair and with backslashes the\n> -\tsame way strings in C source code are quoted.  If this\n> -\tvariable is set to false, the bytes higher than 0x80 are\n> -\tnot quoted but output as verbatim.  Note that double\n> -\tquote, backslash and control characters are always\n> -\tquoted without `-z` regardless of the setting of this\n> -\tvariable.\n> +\tCommands that output paths (e.g. 'ls-files', 'diff'), will\n> +\tquote \"unusual\" characters in the pathname by enclosing the\n> +\tpathname in double-quotes and escaping those characters with\n> +\tbackslashes in the same way C escapes control characters (e.g.\n> +\t`\\t` for TAB, `\\n` for LF, `\\\\` for backslash) or bytes with\n> +\tvalues larger than 0x80 (e.g. octal `\\265` for \"micro\").  If\n> +\tthis variable is set to false, bytes higher than 0x80 are not\n> +\tconsidered \"unusual\" any more.  Double-quotes, backslash and\n> +\tcontrol characters are always escaped regardless of the\n> +\tsetting of this variable.  Many commands can output pathnames\n> +\tcompletely verbatim using the `-z` option. The default value is\n> +\ttrue.\n\nEven though I am not sure \"\\265 is micro\" is a good example these\ndays, as \"high-bit set\" is primarily meant to catch UTF-8\nmulti-bytes, I find the above much easier to read than the original.\n\n> diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt\n> index d2b17f2..88df561 100644\n> --- a/Documentation/git-ls-files.txt\n> +++ b/Documentation/git-ls-files.txt\n> @@ -76,7 +76,8 @@ OPTIONS\n>  \tsucceed.\n>\n>  -z::\n> -\t\\0 line termination on output.\n> +\t\\0 line termination on output and do not quote filenames.\n> +\tSee OUTPUT below for more information.\n>\n>  -x <pattern>::\n>  --exclude=<pattern>::\n> @@ -192,10 +193,10 @@ the index records up to three such pairs; one from\n> tree O in stage\n>  the user (or the porcelain) to see what should eventually be recorded\n> at the\n>  path. (see linkgit:git-read-tree[1] for more information on state)\n>\n> -When `-z` option is not used, TAB, LF, and backslash characters\n> -in pathnames are represented as `\\t`, `\\n`, and `\\\\`,\n> -respectively. The path is also quoted according to the\n> -configuration variable `core.quotePath` (see linkgit:git-config[1]).\n> +Without the `-z` option pathnamens with \"unusual\" characters are\n> +quoted as explained for the configuration variable `core.quotePath`\n> +(see linkgit:git-config[1]).  Using `-z` the filename is output\n> +verbatim and the line is terminated by a NUL byte.\n\nYup, this looks much nicer than the original.\n\nThanks.\n"},{"id":"312336","messageId":"F71515D0E29940CA9C421D18480AD726@PhilipOakley","threadId":"45177","inReplyTo":"e55b3cb7-65bf-1609-2e8d-823b4336e07a@gmail.com","subject":"Re: [PATCH] Documentation: Link git-ls-files to core.quotePath variable.","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":null,"receivedAt":"2017-02-22T20:45:11Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Andreas Heiduk\" <asheiduk@gmail.com>\n> [PATCH] Documentation: Clarify core.quotePath, remove cruft in\n> git-ls-files.\n>\n> Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>\n> ---\n>\n> I have merged the best parts about quoting into the core.quotePath\n> description and cleaned up the text in git-ls-files.txt regarding the\n> control characters.\n>\n>\n> Documentation/config.txt       | 22 ++++++++++++----------\n> Documentation/git-ls-files.txt | 11 ++++++-----\n> 2 files changed, 18 insertions(+), 15 deletions(-)\n>\n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index f4721a0..25e65ae 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -340,16 +340,18 @@ core.checkStat::\n>  all fields, including the sub-second part of mtime and ctime.\n>\n> core.quotePath::\n> - The commands that output paths (e.g. 'ls-files',\n> - 'diff'), when not given the `-z` option, will quote\n> - \"unusual\" characters in the pathname by enclosing the\n> - pathname in a double-quote pair and with backslashes the\n> - same way strings in C source code are quoted.  If this\n> - variable is set to false, the bytes higher than 0x80 are\n> - not quoted but output as verbatim.  Note that double\n> - quote, backslash and control characters are always\n> - quoted without `-z` regardless of the setting of this\n> - variable.\n> + Commands that output paths (e.g. 'ls-files', 'diff'), will\n> + quote \"unusual\" characters in the pathname by enclosing the\n> + pathname in double-quotes and escaping those characters with\n> + backslashes in the same way C escapes control characters (e.g.\n> + `\\t` for TAB, `\\n` for LF, `\\\\` for backslash) or bytes with\n> + values larger than 0x80 (e.g. octal `\\265` for \"micro\").  If\n> + this variable is set to false, bytes higher than 0x80 are not\n> + considered \"unusual\" any more.  Double-quotes, backslash and\n> + control characters are always escaped regardless of the\n> + setting of this variable.  Many commands can output pathnames\n> + completely verbatim using the `-z` option. The default value is\n> + true.\n>\n> core.eol::\n>  Sets the line ending type to use in the working directory for\n> diff --git a/Documentation/git-ls-files.txt \n> b/Documentation/git-ls-files.txt\n> index d2b17f2..88df561 100644\n> --- a/Documentation/git-ls-files.txt\n> +++ b/Documentation/git-ls-files.txt\n> @@ -76,7 +76,8 @@ OPTIONS\n>  succeed.\n>\n> -z::\n> - \\0 line termination on output.\n> + \\0 line termination on output and do not quote filenames.\n> + See OUTPUT below for more information.\n>\n> -x <pattern>::\n> --exclude=<pattern>::\n> @@ -192,10 +193,10 @@ the index records up to three such pairs; one from\n> tree O in stage\n> the user (or the porcelain) to see what should eventually be recorded\n> at the\n> path. (see linkgit:git-read-tree[1] for more information on state)\n>\n> -When `-z` option is not used, TAB, LF, and backslash characters\n> -in pathnames are represented as `\\t`, `\\n`, and `\\\\`,\n> -respectively. The path is also quoted according to the\n> -configuration variable `core.quotePath` (see linkgit:git-config[1]).\n> +Without the `-z` option pathnamens with \"unusual\" characters are\n\ns/option pathnamens/option, pathnames/    # comma and spelling.\n\n> +quoted as explained for the configuration variable `core.quotePath`\n> +(see linkgit:git-config[1]).  Using `-z` the filename is output\n> +verbatim and the line is terminated by a NUL byte.\n>\n--\nPhilip \n\n"},{"id":"312339","messageId":"xmqqh93maqgw.fsf@gitster.mtv.corp.google.com","threadId":"45177","inReplyTo":"F71515D0E29940CA9C421D18480AD726@PhilipOakley","subject":"Re: [PATCH] Documentation: Link git-ls-files to core.quotePath variable.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-02-22T21:02:55Z","receivedAt":"2017-02-22T21:04:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Philip Oakley\" <philipoakley@iee.org> writes:\n\n>> -When `-z` option is not used, TAB, LF, and backslash characters\n>> -in pathnames are represented as `\\t`, `\\n`, and `\\\\`,\n>> -respectively. The path is also quoted according to the\n>> -configuration variable `core.quotePath` (see linkgit:git-config[1]).\n>> +Without the `-z` option pathnamens with \"unusual\" characters are\n>\n> s/option pathnamens/option, pathnames/    # comma and spelling.\n\nThanks.  Will squash it in while queuing (I need to discard the new\ntext added in the previous attempt in the preimage to make it apply,\ntoo).\n\n-- >8 --\nFrom: Andreas Heiduk <asheiduk@gmail.com>\nDate: Wed, 22 Feb 2017 02:38:21 +0100\nSubject: [PATCH] Documentation: clarify core.quotePath and update git-ls-files doc\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/config.txt       | 22 ++++++++++++----------\n Documentation/git-ls-files.txt | 10 ++++++----\n 2 files changed, 18 insertions(+), 14 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex f4721a048b..25e65aeb01 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -340,16 +340,18 @@ core.checkStat::\n \tall fields, including the sub-second part of mtime and ctime.\n \n core.quotePath::\n-\tThe commands that output paths (e.g. 'ls-files',\n-\t'diff'), when not given the `-z` option, will quote\n-\t\"unusual\" characters in the pathname by enclosing the\n-\tpathname in a double-quote pair and with backslashes the\n-\tsame way strings in C source code are quoted.  If this\n-\tvariable is set to false, the bytes higher than 0x80 are\n-\tnot quoted but output as verbatim.  Note that double\n-\tquote, backslash and control characters are always\n-\tquoted without `-z` regardless of the setting of this\n-\tvariable.\n+\tCommands that output paths (e.g. 'ls-files', 'diff'), will\n+\tquote \"unusual\" characters in the pathname by enclosing the\n+\tpathname in double-quotes and escaping those characters with\n+\tbackslashes in the same way C escapes control characters (e.g.\n+\t`\\t` for TAB, `\\n` for LF, `\\\\` for backslash) or bytes with\n+\tvalues larger than 0x80 (e.g. octal `\\265` for \"micro\").  If\n+\tthis variable is set to false, bytes higher than 0x80 are not\n+\tconsidered \"unusual\" any more.  Double-quotes, backslash and\n+\tcontrol characters are always escaped regardless of the\n+\tsetting of this variable.  Many commands can output pathnames\n+\tcompletely verbatim using the `-z` option. The default value is\n+\ttrue.\n \n core.eol::\n \tSets the line ending type to use in the working directory for\ndiff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt\nindex 078b556665..a415223b45 100644\n--- a/Documentation/git-ls-files.txt\n+++ b/Documentation/git-ls-files.txt\n@@ -76,7 +76,8 @@ OPTIONS\n \tsucceed.\n \n -z::\n-\t\\0 line termination on output.\n+\t\\0 line termination on output and do not quote filenames.\n+\tSee OUTPUT below for more information.\n \n -x <pattern>::\n --exclude=<pattern>::\n@@ -192,9 +193,10 @@ the index records up to three such pairs; one from tree O in stage\n the user (or the porcelain) to see what should eventually be recorded at the\n path. (see linkgit:git-read-tree[1] for more information on state)\n \n-When `-z` option is not used, TAB, LF, and backslash characters\n-in pathnames are represented as `\\t`, `\\n`, and `\\\\`,\n-respectively.\n+Without the `-z` option, pathnames with \"unusual\" characters are\n+quoted as explained for the configuration variable `core.quotePath`\n+(see linkgit:git-config[1]).  Using `-z` the filename is output\n+verbatim and the line is terminated by a NUL byte.\n \n \n Exclude Patterns\n-- \n2.12.0-rc2-250-gd33575c7f2\n\n\n"},{"id":"312342","messageId":"3c801e54-28c7-52d0-6915-ee7aaf1d89c9@gmail.com","threadId":"45177","inReplyTo":"xmqqh93maqgw.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] Documentation: Link git-ls-files to core.quotePath variable.","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-02-22T21:08:46Z","receivedAt":"2017-02-22T21:12:19Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"\n@Phillip: Thanks.\n\n@Junio: Don't bother, I'm about to fix other man-pages with the text\nfrom ls-files. I will include that typo-fix and prepare a new patch\nbased on maint.\n\n\nAm 22.02.2017 um 22:02 schrieb Junio C Hamano:\n> \"Philip Oakley\" <philipoakley@iee.org> writes:\n>> s/option pathnamens/option, pathnames/    # comma and spelling.\n> \n> Thanks.  Will squash it in while queuing (I need to discard the new\n> text added in the previous attempt in the preimage to make it apply,\n> too).\n>\n"},{"id":"312552","messageId":"1487968676-6126-1-git-send-email-asheiduk@gmail.com","threadId":"45177","inReplyTo":"3c801e54-28c7-52d0-6915-ee7aaf1d89c9@gmail.com","subject":"[PATCH v2 0/2] Documentation: Link git-ls-files to core.quotePath variable.","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-02-24T20:37:54Z","receivedAt":"2017-02-24T20:38:36Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"These two patches replace and extend the precious patches with the\nsame subject. Suggestions from Philip Oakley and Junio C Hamano are\nincluded.\n\nI tried to find and adjust all places where pathname quoting and \"-z\"\nwere described. I omitted these places:\n\n* Here \"-z\" is for input only. Quoting is unclear to me.\n\n-- git-mktree.txt\n-- git-update-index.txt\n-- git-checkout-index.txt\n\n* Here pathname quoting is not mentioned:\n\n-- git-check-ignore.txt\n-- git-check-attr.txt\n\nAnd last but not least: \n\n- git-grep.txt: The paths are always unquoted, `-z` toggles only the\ndelimiter. Perhaps some CAVEAT should be added.\n\n\nAndreas Heiduk (2):\n  Documentation: Improve description for core.quotePath\n  Documentation: Link descriptions of -z to core.quotePath\n\n Documentation/config.txt              | 24 ++++++++++++++----------\n Documentation/diff-format.txt         |  7 ++++---\n Documentation/diff-generate-patch.txt |  7 +++----\n Documentation/diff-options.txt        |  7 +++----\n Documentation/git-apply.txt           |  7 +++----\n Documentation/git-commit.txt          |  9 ++++++---\n Documentation/git-ls-files.txt        | 10 ++++++----\n Documentation/git-ls-tree.txt         | 10 +++++++---\n Documentation/git-status.txt          |  7 +++----\n 9 files changed, 49 insertions(+), 39 deletions(-)\n\n"},{"id":"312553","messageId":"1487968676-6126-2-git-send-email-asheiduk@gmail.com","threadId":"45177","inReplyTo":"1487968676-6126-1-git-send-email-asheiduk@gmail.com","subject":"[PATCH v2 1/2] Documentation: Improve description for core.quotePath","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-02-24T20:37:55Z","receivedAt":"2017-02-24T20:38:38Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>\n---\n Documentation/config.txt | 24 ++++++++++++++----------\n 1 file changed, 14 insertions(+), 10 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 1fee83c..fa06c2a 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -347,16 +347,20 @@ core.checkStat::\n \tall fields, including the sub-second part of mtime and ctime.\n \n core.quotePath::\n-\tThe commands that output paths (e.g. 'ls-files',\n-\t'diff'), when not given the `-z` option, will quote\n-\t\"unusual\" characters in the pathname by enclosing the\n-\tpathname in a double-quote pair and with backslashes the\n-\tsame way strings in C source code are quoted.  If this\n-\tvariable is set to false, the bytes higher than 0x80 are\n-\tnot quoted but output as verbatim.  Note that double\n-\tquote, backslash and control characters are always\n-\tquoted without `-z` regardless of the setting of this\n-\tvariable.\n+\n+\tCommands that output paths (e.g. 'ls-files', 'diff'), will\n+\tquote \"unusual\" characters in the pathname by enclosing the\n+\tpathname in double-quotes and escaping those characters with\n+\tbackslashes in the same way C escapes control characters (e.g.\n+\t`\\t` for TAB, `\\n` for LF, `\\\\` for backslash) or bytes with\n+\tvalues larger than 0x80 (e.g. octal `\\302\\265` for \"micro\" in\n+\tUTF-8).  If this variable is set to false, bytes higher than\n+\t0x80 are not considered \"unusual\" any more. Double-quotes,\n+\tbackslash and control characters are always escaped regardless\n+\tof the setting of this variable.  A simple space character is\n+\tnot considered \"unusual\".  Many commands can output pathnames\n+\tcompletely verbatim using the `-z` option. The default value\n+\tis true.\n \n core.eol::\n \tSets the line ending type to use in the working directory for\n"},{"id":"312554","messageId":"1487968676-6126-3-git-send-email-asheiduk@gmail.com","threadId":"45177","inReplyTo":"1487968676-6126-1-git-send-email-asheiduk@gmail.com","subject":"[PATCH v2 2/2] Documentation: Link descriptions of -z to core.quotePath","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-02-24T20:37:56Z","receivedAt":"2017-02-24T20:38:41Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"Linking the description for pathname quoting to the configuration\nvariable \"core.quotePath\" removes inconstistent and incomplete\nsections while also giving two hints how to deal with it: Either with\n\"-c core.quotePath=false\" or with \"-z\".\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\n---\n Documentation/diff-format.txt         |  7 ++++---\n Documentation/diff-generate-patch.txt |  7 +++----\n Documentation/diff-options.txt        |  7 +++----\n Documentation/git-apply.txt           |  7 +++----\n Documentation/git-commit.txt          |  9 ++++++---\n Documentation/git-ls-files.txt        | 10 ++++++----\n Documentation/git-ls-tree.txt         | 10 +++++++---\n Documentation/git-status.txt          |  7 +++----\n 8 files changed, 35 insertions(+), 29 deletions(-)\n\ndiff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt\nindex cf52626..706916c 100644\n--- a/Documentation/diff-format.txt\n+++ b/Documentation/diff-format.txt\n@@ -78,9 +78,10 @@ Example:\n :100644 100644 5be4a4...... 000000...... M file.c\n ------------------------------------------------\n \n-When `-z` option is not used, TAB, LF, and backslash characters\n-in pathnames are represented as `\\t`, `\\n`, and `\\\\`,\n-respectively.\n+Without the `-z` option, pathnames with \"unusual\" characters are\n+quoted as explained for the configuration variable `core.quotePath`\n+(see linkgit:git-config[1]).  Using `-z` the filename is output\n+verbatim and the line is terminated by a NUL byte.\n \n diff format for merges\n ----------------------\ndiff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt\nindex d2a7ff5..231105c 100644\n--- a/Documentation/diff-generate-patch.txt\n+++ b/Documentation/diff-generate-patch.txt\n@@ -53,10 +53,9 @@ The index line includes the SHA-1 checksum before and after the change.\n The <mode> is included if the file mode does not change; otherwise,\n separate lines indicate the old and the new mode.\n \n-3.  TAB, LF, double quote and backslash characters in pathnames\n-    are represented as `\\t`, `\\n`, `\\\"` and `\\\\`, respectively.\n-    If there is need for such substitution then the whole\n-    pathname is put in double quotes.\n+3.  Pathnames with \"unusual\" characters are quoted as explained for\n+    the configuration variable `core.quotePath` (see\n+    linkgit:git-config[1]).\n \n 4.  All the `file1` files in the output refer to files before the\n     commit, and all the `file2` files refer to files after the commit.\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex e6215c3..7c28e73 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -192,10 +192,9 @@ ifndef::git-log[]\n \tgiven, do not munge pathnames 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+Without this option, pathnames with \"unusual\" characters are munged as\n+explained for the configuration variable `core.quotePath` (see\n+linkgit:git-config[1]).\n \n --name-only::\n \tShow only names of changed files.\ndiff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt\nindex 8ddb207..a7a001b 100644\n--- a/Documentation/git-apply.txt\n+++ b/Documentation/git-apply.txt\n@@ -108,10 +108,9 @@ the information is read from the current index instead.\n \tWhen `--numstat` has been given, do not munge pathnames,\n \tbut use a NUL-terminated machine-readable format.\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+Without this option, pathnames with \"unusual\" characters are munged as\n+explained for the configuration variable `core.quotePath` (see\n+linkgit:git-config[1]).\n \n -p<n>::\n \tRemove <n> leading slashes from traditional diff paths. The\ndiff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\nindex 4f8f20a..25dcdcc 100644\n--- a/Documentation/git-commit.txt\n+++ b/Documentation/git-commit.txt\n@@ -117,9 +117,12 @@ OPTIONS\n \n -z::\n --null::\n-\tWhen showing `short` or `porcelain` status output, terminate\n-\tentries in the status output with NUL, instead of LF. If no\n-\tformat is given, implies the `--porcelain` output format.\n+\tWhen showing `short` or `porcelain` status output, print the\n+\tfilename verbatim and terminate the entries with NUL, instead of LF.\n+\tIf no format is given, implies the `--porcelain` output format.\n+\tWithout the `-z` option, filenames with \"unusual\" characters are\n+\tquoted as explained for the configuration variable `core.quotePath`\n+\t(see linkgit:git-config[1]).\n \n -F <file>::\n --file=<file>::\ndiff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt\nindex 446209e..1cab703 100644\n--- a/Documentation/git-ls-files.txt\n+++ b/Documentation/git-ls-files.txt\n@@ -77,7 +77,8 @@ OPTIONS\n \tsucceed.\n \n -z::\n-\t\\0 line termination on output.\n+\t\\0 line termination on output and do not quote filenames.\n+\tSee OUTPUT below for more information.\n \n -x <pattern>::\n --exclude=<pattern>::\n@@ -196,9 +197,10 @@ the index records up to three such pairs; one from tree O in stage\n the user (or the porcelain) to see what should eventually be recorded at the\n path. (see linkgit:git-read-tree[1] for more information on state)\n \n-When `-z` option is not used, TAB, LF, and backslash characters\n-in pathnames are represented as `\\t`, `\\n`, and `\\\\`,\n-respectively.\n+Without the `-z` option, pathnames with \"unusual\" characters are\n+quoted as explained for the configuration variable `core.quotePath`\n+(see linkgit:git-config[1]).  Using `-z` the filename is output\n+verbatim and the line is terminated by a NUL byte.\n \n \n Exclude Patterns\ndiff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt\nindex dbc91f9..9dee7be 100644\n--- a/Documentation/git-ls-tree.txt\n+++ b/Documentation/git-ls-tree.txt\n@@ -53,7 +53,8 @@ OPTIONS\n \tShow object size of blob (file) entries.\n \n -z::\n-\t\\0 line termination on output.\n+\t\\0 line termination on output and do not quote filenames.\n+\tSee OUTPUT FORMAT below for more information.\n \n --name-only::\n --name-status::\n@@ -82,8 +83,6 @@ Output Format\n -------------\n         <mode> SP <type> SP <object> TAB <file>\n \n-Unless the `-z` option is used, TAB, LF, and backslash characters\n-in pathnames are represented as `\\t`, `\\n`, and `\\\\`, respectively.\n This output format is compatible with what `--index-info --stdin` of\n 'git update-index' expects.\n \n@@ -95,6 +94,11 @@ Object size identified by <object> is given in bytes, and right-justified\n with minimum width of 7 characters.  Object size is given only for blobs\n (file) entries; for other entries `-` character is used in place of size.\n \n+Without the `-z` option, pathnames with \"unusual\" characters are\n+quoted as explained for the configuration variable `core.quotePath`\n+(see linkgit:git-config[1]).  Using `-z` the filename is output\n+verbatim and the line is terminated by a NUL byte.\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\ndiff --git a/Documentation/git-status.txt b/Documentation/git-status.txt\nindex 725065e..ba87365 100644\n--- a/Documentation/git-status.txt\n+++ b/Documentation/git-status.txt\n@@ -322,10 +322,9 @@ When the `-z` option is given, pathnames are printed as is and\n without any quoting and lines are terminated with a NUL (ASCII 0x00)\n byte.\n \n-Otherwise, all pathnames will be \"C-quoted\" if they contain any tab,\n-linefeed, double quote, or backslash characters. In C-quoting, these\n-characters will be replaced with the corresponding C-style escape\n-sequences and the resulting pathname will be double quoted.\n+Without the `-z` option, pathnames with \"unusual\" characters are\n+quoted as explained for the configuration variable `core.quotePath`\n+(see linkgit:git-config[1]).\n \n \n CONFIGURATION\n"},{"id":"312571","messageId":"f6845604-005d-06bb-e5e6-61f683cdbaf8@gmail.com","threadId":"45177","inReplyTo":"1487968676-6126-2-git-send-email-asheiduk@gmail.com","subject":"Re: [PATCH v2 1/2] Documentation: Improve description for core.quotePath","fromName":"Jakub Narębski","fromEmail":"jnareb@gmail.com","sentAt":"2017-02-24T21:43:10Z","receivedAt":"2017-02-24T21:50:44Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"W dniu 24.02.2017 o 21:37, Andreas Heiduk pisze:\n> Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>\n\nThanks.  This is good work.\n\n> ---\n>  Documentation/config.txt | 24 ++++++++++++++----------\n>  1 file changed, 14 insertions(+), 10 deletions(-)\n> \n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index 1fee83c..fa06c2a 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -347,16 +347,20 @@ core.checkStat::\n>  \tall fields, including the sub-second part of mtime and ctime.\n>  \n>  core.quotePath::\n> -\tThe commands that output paths (e.g. 'ls-files',\n> -\t'diff'), when not given the `-z` option, will quote\n> -\t\"unusual\" characters in the pathname by enclosing the\n> -\tpathname in a double-quote pair and with backslashes the\n> -\tsame way strings in C source code are quoted.  If this\n> -\tvariable is set to false, the bytes higher than 0x80 are\n> -\tnot quoted but output as verbatim.  Note that double\n> -\tquote, backslash and control characters are always\n> -\tquoted without `-z` regardless of the setting of this\n> -\tvariable.\n> +\n\nThis empty line should not be here, I think.\n\n> +\tCommands that output paths (e.g. 'ls-files', 'diff'), will\n> +\tquote \"unusual\" characters in the pathname by enclosing the\n> +\tpathname in double-quotes and escaping those characters with\n> +\tbackslashes in the same way C escapes control characters (e.g.\n> +\t`\\t` for TAB, `\\n` for LF, `\\\\` for backslash) or bytes with\n> +\tvalues larger than 0x80 (e.g. octal `\\302\\265` for \"micro\" in\n\nI wonder if we can put UTF-8 in AsciiDoc, that is write \"μ\"\ninstead of spelling it \"micro\" (or: Greek letter \"mu\").\n\nOr \"&micro;\" / \"&#181;\", though I wonder how well it is supported\nin manpage, info and PDF outputs...\n\n> +\tUTF-8).  If this variable is set to false, bytes higher than\n> +\t0x80 are not considered \"unusual\" any more. Double-quotes,\n> +\tbackslash and control characters are always escaped regardless\n> +\tof the setting of this variable.  A simple space character is\n> +\tnot considered \"unusual\".  Many commands can output pathnames\n> +\tcompletely verbatim using the `-z` option. The default value\n> +\tis true.\n>  \n>  core.eol::\n>  \tSets the line ending type to use in the working directory for\n> \n\n"},{"id":"312572","messageId":"f534b9c7-c8a8-1a05-5fcb-020122dccaac@gmail.com","threadId":"45177","inReplyTo":"1487968676-6126-3-git-send-email-asheiduk@gmail.com","subject":"Re: [PATCH v2 2/2] Documentation: Link descriptions of -z to core.quotePath","fromName":"Jakub Narębski","fromEmail":"jnareb@gmail.com","sentAt":"2017-02-24T21:54:35Z","receivedAt":"2017-02-24T21:54:48Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"W dniu 24.02.2017 o 21:37, Andreas Heiduk pisze:\n> Linking the description for pathname quoting to the configuration\n> variable \"core.quotePath\" removes inconstistent and incomplete\n> sections while also giving two hints how to deal with it: Either with\n> \"-c core.quotePath=false\" or with \"-z\".\n\nThis patch I am not sure about.  On one hand it improves consistency\n(and makes information more complete), on the other hand it removes\ninformation at hand and instead refers to other manpage.\n\nPerhaps a better solution would be to craft a short description that\nis both sufficiently complete, and refers to \"core.quotePath\" for\nmore details, and then transclude it with \"include::quotepath.txt[]\".\n\n> \n> Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>\n> ---\n>  Documentation/diff-format.txt         |  7 ++++---\n>  Documentation/diff-generate-patch.txt |  7 +++----\n>  Documentation/diff-options.txt        |  7 +++----\n>  Documentation/git-apply.txt           |  7 +++----\n>  Documentation/git-commit.txt          |  9 ++++++---\n>  Documentation/git-ls-files.txt        | 10 ++++++----\n>  Documentation/git-ls-tree.txt         | 10 +++++++---\n>  Documentation/git-status.txt          |  7 +++----\n>  8 files changed, 35 insertions(+), 29 deletions(-)\n> \n> diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt\n> index cf52626..706916c 100644\n> --- a/Documentation/diff-format.txt\n> +++ b/Documentation/diff-format.txt\n> @@ -78,9 +78,10 @@ Example:\n>  :100644 100644 5be4a4...... 000000...... M file.c\n>  ------------------------------------------------\n>  \n> -When `-z` option is not used, TAB, LF, and backslash characters\n> -in pathnames are represented as `\\t`, `\\n`, and `\\\\`,\n> -respectively.\n> +Without the `-z` option, pathnames with \"unusual\" characters are\n> +quoted as explained for the configuration variable `core.quotePath`\n> +(see linkgit:git-config[1]).  Using `-z` the filename is output\n> +verbatim and the line is terminated by a NUL byte.\n>  \n>  diff format for merges\n>  ----------------------\n> diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt\n> index d2a7ff5..231105c 100644\n> --- a/Documentation/diff-generate-patch.txt\n> +++ b/Documentation/diff-generate-patch.txt\n> @@ -53,10 +53,9 @@ The index line includes the SHA-1 checksum before and after the change.\n>  The <mode> is included if the file mode does not change; otherwise,\n>  separate lines indicate the old and the new mode.\n>  \n> -3.  TAB, LF, double quote and backslash characters in pathnames\n> -    are represented as `\\t`, `\\n`, `\\\"` and `\\\\`, respectively.\n> -    If there is need for such substitution then the whole\n> -    pathname is put in double quotes.\n> +3.  Pathnames with \"unusual\" characters are quoted as explained for\n> +    the configuration variable `core.quotePath` (see\n> +    linkgit:git-config[1]).\n>  \n>  4.  All the `file1` files in the output refer to files before the\n>      commit, and all the `file2` files refer to files after the commit.\n> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\n> index e6215c3..7c28e73 100644\n> --- a/Documentation/diff-options.txt\n> +++ b/Documentation/diff-options.txt\n> @@ -192,10 +192,9 @@ ifndef::git-log[]\n>  \tgiven, do not munge pathnames 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> +Without this option, pathnames with \"unusual\" characters are munged as\n> +explained for the configuration variable `core.quotePath` (see\n> +linkgit:git-config[1]).\n>  \n>  --name-only::\n>  \tShow only names of changed files.\n> diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt\n> index 8ddb207..a7a001b 100644\n> --- a/Documentation/git-apply.txt\n> +++ b/Documentation/git-apply.txt\n> @@ -108,10 +108,9 @@ the information is read from the current index instead.\n>  \tWhen `--numstat` has been given, do not munge pathnames,\n>  \tbut use a NUL-terminated machine-readable format.\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> +Without this option, pathnames with \"unusual\" characters are munged as\n> +explained for the configuration variable `core.quotePath` (see\n> +linkgit:git-config[1]).\n>  \n>  -p<n>::\n>  \tRemove <n> leading slashes from traditional diff paths. The\n> diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\n> index 4f8f20a..25dcdcc 100644\n> --- a/Documentation/git-commit.txt\n> +++ b/Documentation/git-commit.txt\n> @@ -117,9 +117,12 @@ OPTIONS\n>  \n>  -z::\n>  --null::\n> -\tWhen showing `short` or `porcelain` status output, terminate\n> -\tentries in the status output with NUL, instead of LF. If no\n> -\tformat is given, implies the `--porcelain` output format.\n> +\tWhen showing `short` or `porcelain` status output, print the\n> +\tfilename verbatim and terminate the entries with NUL, instead of LF.\n> +\tIf no format is given, implies the `--porcelain` output format.\n> +\tWithout the `-z` option, filenames with \"unusual\" characters are\n> +\tquoted as explained for the configuration variable `core.quotePath`\n> +\t(see linkgit:git-config[1]).\n>  \n>  -F <file>::\n>  --file=<file>::\n> diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt\n> index 446209e..1cab703 100644\n> --- a/Documentation/git-ls-files.txt\n> +++ b/Documentation/git-ls-files.txt\n> @@ -77,7 +77,8 @@ OPTIONS\n>  \tsucceed.\n>  \n>  -z::\n> -\t\\0 line termination on output.\n> +\t\\0 line termination on output and do not quote filenames.\n> +\tSee OUTPUT below for more information.\n>  \n>  -x <pattern>::\n>  --exclude=<pattern>::\n> @@ -196,9 +197,10 @@ the index records up to three such pairs; one from tree O in stage\n>  the user (or the porcelain) to see what should eventually be recorded at the\n>  path. (see linkgit:git-read-tree[1] for more information on state)\n>  \n> -When `-z` option is not used, TAB, LF, and backslash characters\n> -in pathnames are represented as `\\t`, `\\n`, and `\\\\`,\n> -respectively.\n> +Without the `-z` option, pathnames with \"unusual\" characters are\n> +quoted as explained for the configuration variable `core.quotePath`\n> +(see linkgit:git-config[1]).  Using `-z` the filename is output\n> +verbatim and the line is terminated by a NUL byte.\n>  \n>  \n>  Exclude Patterns\n> diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt\n> index dbc91f9..9dee7be 100644\n> --- a/Documentation/git-ls-tree.txt\n> +++ b/Documentation/git-ls-tree.txt\n> @@ -53,7 +53,8 @@ OPTIONS\n>  \tShow object size of blob (file) entries.\n>  \n>  -z::\n> -\t\\0 line termination on output.\n> +\t\\0 line termination on output and do not quote filenames.\n> +\tSee OUTPUT FORMAT below for more information.\n>  \n>  --name-only::\n>  --name-status::\n> @@ -82,8 +83,6 @@ Output Format\n>  -------------\n>          <mode> SP <type> SP <object> TAB <file>\n>  \n> -Unless the `-z` option is used, TAB, LF, and backslash characters\n> -in pathnames are represented as `\\t`, `\\n`, and `\\\\`, respectively.\n>  This output format is compatible with what `--index-info --stdin` of\n>  'git update-index' expects.\n>  \n> @@ -95,6 +94,11 @@ Object size identified by <object> is given in bytes, and right-justified\n>  with minimum width of 7 characters.  Object size is given only for blobs\n>  (file) entries; for other entries `-` character is used in place of size.\n>  \n> +Without the `-z` option, pathnames with \"unusual\" characters are\n> +quoted as explained for the configuration variable `core.quotePath`\n> +(see linkgit:git-config[1]).  Using `-z` the filename is output\n> +verbatim and the line is terminated by a NUL byte.\n> +\n>  GIT\n>  ---\n>  Part of the linkgit:git[1] suite\n> diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt\n> index 725065e..ba87365 100644\n> --- a/Documentation/git-status.txt\n> +++ b/Documentation/git-status.txt\n> @@ -322,10 +322,9 @@ When the `-z` option is given, pathnames are printed as is and\n>  without any quoting and lines are terminated with a NUL (ASCII 0x00)\n>  byte.\n>  \n> -Otherwise, all pathnames will be \"C-quoted\" if they contain any tab,\n> -linefeed, double quote, or backslash characters. In C-quoting, these\n> -characters will be replaced with the corresponding C-style escape\n> -sequences and the resulting pathname will be double quoted.\n> +Without the `-z` option, pathnames with \"unusual\" characters are\n> +quoted as explained for the configuration variable `core.quotePath`\n> +(see linkgit:git-config[1]).\n>  \n>  \n>  CONFIGURATION\n> \n\n"},{"id":"312893","messageId":"xmqqmvd6jayn.fsf@gitster.mtv.corp.google.com","threadId":"45177","inReplyTo":"1487968676-6126-3-git-send-email-asheiduk@gmail.com","subject":"Re: [PATCH v2 2/2] Documentation: Link descriptions of -z to core.quotePath","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-02-28T20:51:12Z","receivedAt":"2017-02-28T20:53:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Heiduk <asheiduk@gmail.com> writes:\n\n> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\n> index e6215c3..7c28e73 100644\n> --- a/Documentation/diff-options.txt\n> +++ b/Documentation/diff-options.txt\n> @@ -192,10 +192,9 @@ ifndef::git-log[]\n>  \tgiven, do not munge pathnames 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> +Without this option, pathnames with \"unusual\" characters are munged as\n> +explained for the configuration variable `core.quotePath` (see\n> +linkgit:git-config[1]).\n\nSeeing that many other instances call this \"quoted\", we may want to\nbe consistent.  I can see \"munge\" in the pre-context, but that one\ncan stay as is. Under -z, no modification/munging happens.  With -z,\na specific kind of modification (called \"quote\" described in the\ndocumentation for core.quotepath variable) happens.  The same\ncomment applies to the change to Documentation/git-apply.txt\n\nOtherwise the patch looks good.\n\nThanks.\n"},{"id":"312898","messageId":"d59bda7b-2eb5-a6cc-8240-0ff4f50de540@gmail.com","threadId":"45177","inReplyTo":"xmqqmvd6jayn.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2 2/2] Documentation: Link descriptions of -z to core.quotePath","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-02-28T21:13:35Z","receivedAt":"2017-02-28T21:15:14Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"Am 28.02.2017 um 21:51 schrieb Junio C Hamano:\n> Andreas Heiduk <asheiduk@gmail.com> writes:\n> \n>> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\n>> index e6215c3..7c28e73 100644\n>> --- a/Documentation/diff-options.txt\n>> +++ b/Documentation/diff-options.txt\n>> @@ -192,10 +192,9 @@ ifndef::git-log[]\n>>  \tgiven, do not munge pathnames 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>> +Without this option, pathnames with \"unusual\" characters are munged as\n>> +explained for the configuration variable `core.quotePath` (see\n>> +linkgit:git-config[1]).\n> \n> Seeing that many other instances call this \"quoted\", we may want to\n> be consistent.  I can see \"munge\" in the pre-context, but that one\n> can stay as is. Under -z, no modification/munging happens.  With -z,\n> a specific kind of modification (called \"quote\" described in the\n> documentation for core.quotepath variable) happens.  The same\n> comment applies to the change to Documentation/git-apply.txt\n> \n> Otherwise the patch looks good.\n> \n> Thanks.\n>\n\nI'll fix the \"munged\" and, unless there are objections, I will also\nreplace the remaining ones in the vicinity. These are the last\noccurrences of \"munged\".\n\nYou are OK with the references to another man page? My idea was to\nestablish a well-known term.\n\n"},{"id":"312899","messageId":"xmqq60juj9dw.fsf@gitster.mtv.corp.google.com","threadId":"45177","inReplyTo":"d59bda7b-2eb5-a6cc-8240-0ff4f50de540@gmail.com","subject":"Re: [PATCH v2 2/2] Documentation: Link descriptions of -z to core.quotePath","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-02-28T21:25:15Z","receivedAt":"2017-02-28T21:25:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Heiduk <asheiduk@gmail.com> writes:\n\n> I'll fix the \"munged\" and, unless there are objections, I will also\n> replace the remaining ones in the vicinity. These are the last\n> occurrences of \"munged\".\n\nI'd rather see the \"we do not munge\" to stay the same.  \"we do not\nquote\" still allows us to do modifications that are different from\nquoting.\n\n> You are OK with the references to another man page? My idea was to\n> establish a well-known term.\n\nThe \"well-known term\" cannot just be \"quote\", because it is too\ngeneric.  \"git rev-parse --sq-quote\" does a different kind of\nquoting from the quoting done here for paths with unusual\ncharacters, for example.\n\nWe certainly *could* (1) add to glossary-content.txt the definition\nof \"c-quote\" and describe it there, (2) change the \"see the quoting\nexplained for core.quotePath\" to \"unless -z is given, paths are\nc-quoted\", and (3) change the core.quotePath description to refer to\n\"c-quote\" in the glossary.\n\nBut I am not sure it that makes the resulting document easier to use\nby the end users.  I personally find the result of applying the\npatch you posted easier.\n\n\n\n"},{"id":"312901","messageId":"de5d3e7c-527f-eb6b-30ac-b0672e52ff29@gmail.com","threadId":"45177","inReplyTo":"f534b9c7-c8a8-1a05-5fcb-020122dccaac@gmail.com","subject":"Re: [PATCH v2 2/2] Documentation: Link descriptions of -z to core.quotePath","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-02-28T21:30:50Z","receivedAt":"2017-02-28T21:31:11Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"Am 24.02.2017 um 22:54 schrieb Jakub Narębski:\n> W dniu 24.02.2017 o 21:37, Andreas Heiduk pisze:\n>> Linking the description for pathname quoting to the configuration\n>> variable \"core.quotePath\" removes inconstistent and incomplete\n>> sections while also giving two hints how to deal with it: Either with\n>> \"-c core.quotePath=false\" or with \"-z\".\n> \n> This patch I am not sure about.  On one hand it improves consistency\n> (and makes information more complete), on the other hand it removes\n> information at hand and instead refers to other manpage.\n\nIndeed this is a trade-off. My intention was to establish some kind of\nwell-known term by citing \"core.quotePath\" everywhere. So after a while\n\"quoting\" and \"core.quotePath\" should be known by everyone interested.\n\n> Perhaps a better solution would be to craft a short description that\n> is both sufficiently complete, and refers to \"core.quotePath\" for\n> more details, and then transclude it with \"include::quotepath.txt[]\".\n\nOn the other hand this makes every section quite long. Personally, I\nfind long and repetitive documentation harder to comprehend.\n\n>>\n>> Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>\n>> ---\n>>  Documentation/diff-format.txt         |  7 ++++---\n>>  Documentation/diff-generate-patch.txt |  7 +++----\n>>  Documentation/diff-options.txt        |  7 +++----\n>>  Documentation/git-apply.txt           |  7 +++----\n>>  Documentation/git-commit.txt          |  9 ++++++---\n>>  Documentation/git-ls-files.txt        | 10 ++++++----\n>>  Documentation/git-ls-tree.txt         | 10 +++++++---\n>>  Documentation/git-status.txt          |  7 +++----\n>>  8 files changed, 35 insertions(+), 29 deletions(-)\n>>\n>> diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt\n>> index cf52626..706916c 100644\n>> --- a/Documentation/diff-format.txt\n>> +++ b/Documentation/diff-format.txt\n>> @@ -78,9 +78,10 @@ Example:\n>>  :100644 100644 5be4a4...... 000000...... M file.c\n>>  ------------------------------------------------\n>>  \n>> -When `-z` option is not used, TAB, LF, and backslash characters\n>> -in pathnames are represented as `\\t`, `\\n`, and `\\\\`,\n>> -respectively.\n>> +Without the `-z` option, pathnames with \"unusual\" characters are\n>> +quoted as explained for the configuration variable `core.quotePath`\n>> +(see linkgit:git-config[1]).  Using `-z` the filename is output\n>> +verbatim and the line is terminated by a NUL byte.\n>>  \n>>  diff format for merges\n>>  ----------------------\n>> diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt\n>> index d2a7ff5..231105c 100644\n>> --- a/Documentation/diff-generate-patch.txt\n>> +++ b/Documentation/diff-generate-patch.txt\n>> @@ -53,10 +53,9 @@ The index line includes the SHA-1 checksum before and after the change.\n>>  The <mode> is included if the file mode does not change; otherwise,\n>>  separate lines indicate the old and the new mode.\n>>  \n>> -3.  TAB, LF, double quote and backslash characters in pathnames\n>> -    are represented as `\\t`, `\\n`, `\\\"` and `\\\\`, respectively.\n>> -    If there is need for such substitution then the whole\n>> -    pathname is put in double quotes.\n>> +3.  Pathnames with \"unusual\" characters are quoted as explained for\n>> +    the configuration variable `core.quotePath` (see\n>> +    linkgit:git-config[1]).\n>>  \n>>  4.  All the `file1` files in the output refer to files before the\n>>      commit, and all the `file2` files refer to files after the commit.\n>> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\n>> index e6215c3..7c28e73 100644\n>> --- a/Documentation/diff-options.txt\n>> +++ b/Documentation/diff-options.txt\n>> @@ -192,10 +192,9 @@ ifndef::git-log[]\n>>  \tgiven, do not munge pathnames 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>> +Without this option, pathnames with \"unusual\" characters are munged as\n>> +explained for the configuration variable `core.quotePath` (see\n>> +linkgit:git-config[1]).\n>>  \n>>  --name-only::\n>>  \tShow only names of changed files.\n>> diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt\n>> index 8ddb207..a7a001b 100644\n>> --- a/Documentation/git-apply.txt\n>> +++ b/Documentation/git-apply.txt\n>> @@ -108,10 +108,9 @@ the information is read from the current index instead.\n>>  \tWhen `--numstat` has been given, do not munge pathnames,\n>>  \tbut use a NUL-terminated machine-readable format.\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>> +Without this option, pathnames with \"unusual\" characters are munged as\n>> +explained for the configuration variable `core.quotePath` (see\n>> +linkgit:git-config[1]).\n>>  \n>>  -p<n>::\n>>  \tRemove <n> leading slashes from traditional diff paths. The\n>> diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\n>> index 4f8f20a..25dcdcc 100644\n>> --- a/Documentation/git-commit.txt\n>> +++ b/Documentation/git-commit.txt\n>> @@ -117,9 +117,12 @@ OPTIONS\n>>  \n>>  -z::\n>>  --null::\n>> -\tWhen showing `short` or `porcelain` status output, terminate\n>> -\tentries in the status output with NUL, instead of LF. If no\n>> -\tformat is given, implies the `--porcelain` output format.\n>> +\tWhen showing `short` or `porcelain` status output, print the\n>> +\tfilename verbatim and terminate the entries with NUL, instead of LF.\n>> +\tIf no format is given, implies the `--porcelain` output format.\n>> +\tWithout the `-z` option, filenames with \"unusual\" characters are\n>> +\tquoted as explained for the configuration variable `core.quotePath`\n>> +\t(see linkgit:git-config[1]).\n>>  \n>>  -F <file>::\n>>  --file=<file>::\n>> diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt\n>> index 446209e..1cab703 100644\n>> --- a/Documentation/git-ls-files.txt\n>> +++ b/Documentation/git-ls-files.txt\n>> @@ -77,7 +77,8 @@ OPTIONS\n>>  \tsucceed.\n>>  \n>>  -z::\n>> -\t\\0 line termination on output.\n>> +\t\\0 line termination on output and do not quote filenames.\n>> +\tSee OUTPUT below for more information.\n>>  \n>>  -x <pattern>::\n>>  --exclude=<pattern>::\n>> @@ -196,9 +197,10 @@ the index records up to three such pairs; one from tree O in stage\n>>  the user (or the porcelain) to see what should eventually be recorded at the\n>>  path. (see linkgit:git-read-tree[1] for more information on state)\n>>  \n>> -When `-z` option is not used, TAB, LF, and backslash characters\n>> -in pathnames are represented as `\\t`, `\\n`, and `\\\\`,\n>> -respectively.\n>> +Without the `-z` option, pathnames with \"unusual\" characters are\n>> +quoted as explained for the configuration variable `core.quotePath`\n>> +(see linkgit:git-config[1]).  Using `-z` the filename is output\n>> +verbatim and the line is terminated by a NUL byte.\n>>  \n>>  \n>>  Exclude Patterns\n>> diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt\n>> index dbc91f9..9dee7be 100644\n>> --- a/Documentation/git-ls-tree.txt\n>> +++ b/Documentation/git-ls-tree.txt\n>> @@ -53,7 +53,8 @@ OPTIONS\n>>  \tShow object size of blob (file) entries.\n>>  \n>>  -z::\n>> -\t\\0 line termination on output.\n>> +\t\\0 line termination on output and do not quote filenames.\n>> +\tSee OUTPUT FORMAT below for more information.\n>>  \n>>  --name-only::\n>>  --name-status::\n>> @@ -82,8 +83,6 @@ Output Format\n>>  -------------\n>>          <mode> SP <type> SP <object> TAB <file>\n>>  \n>> -Unless the `-z` option is used, TAB, LF, and backslash characters\n>> -in pathnames are represented as `\\t`, `\\n`, and `\\\\`, respectively.\n>>  This output format is compatible with what `--index-info --stdin` of\n>>  'git update-index' expects.\n>>  \n>> @@ -95,6 +94,11 @@ Object size identified by <object> is given in bytes, and right-justified\n>>  with minimum width of 7 characters.  Object size is given only for blobs\n>>  (file) entries; for other entries `-` character is used in place of size.\n>>  \n>> +Without the `-z` option, pathnames with \"unusual\" characters are\n>> +quoted as explained for the configuration variable `core.quotePath`\n>> +(see linkgit:git-config[1]).  Using `-z` the filename is output\n>> +verbatim and the line is terminated by a NUL byte.\n>> +\n>>  GIT\n>>  ---\n>>  Part of the linkgit:git[1] suite\n>> diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt\n>> index 725065e..ba87365 100644\n>> --- a/Documentation/git-status.txt\n>> +++ b/Documentation/git-status.txt\n>> @@ -322,10 +322,9 @@ When the `-z` option is given, pathnames are printed as is and\n>>  without any quoting and lines are terminated with a NUL (ASCII 0x00)\n>>  byte.\n>>  \n>> -Otherwise, all pathnames will be \"C-quoted\" if they contain any tab,\n>> -linefeed, double quote, or backslash characters. In C-quoting, these\n>> -characters will be replaced with the corresponding C-style escape\n>> -sequences and the resulting pathname will be double quoted.\n>> +Without the `-z` option, pathnames with \"unusual\" characters are\n>> +quoted as explained for the configuration variable `core.quotePath`\n>> +(see linkgit:git-config[1]).\n>>  \n>>  \n>>  CONFIGURATION\n>>\n> \n\n"},{"id":"312911","messageId":"245b0848-3af9-7d7d-02f0-df470ddcca79@gmail.com","threadId":"45177","inReplyTo":"f6845604-005d-06bb-e5e6-61f683cdbaf8@gmail.com","subject":"Re: [PATCH v2 1/2] Documentation: Improve description for core.quotePath","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-02-28T20:55:02Z","receivedAt":"2017-02-28T21:59:22Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"Am 24.02.2017 um 22:43 schrieb Jakub Narębski:\n> W dniu 24.02.2017 o 21:37, Andreas Heiduk pisze:\n>> Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>\n> \n> Thanks.  This is good work.\n\n:-)\n\n> \n>> ---\n>>  Documentation/config.txt | 24 ++++++++++++++----------\n>>  1 file changed, 14 insertions(+), 10 deletions(-)\n>>\n>> diff --git a/Documentation/config.txt b/Documentation/config.txt\n[...]\n>> +\n> \n> This empty line should not be here, I think.\n\nMissed that bugger...\n\n[...]\n>> +\tvalues larger than 0x80 (e.g. octal `\\302\\265` for \"micro\" in\n> \n> I wonder if we can put UTF-8 in AsciiDoc, that is write \"μ\"\n> instead of spelling it \"micro\" (or: Greek letter \"mu\").\n> \n> Or \"&micro;\" / \"&#181;\", though I wonder how well it is supported\n> in manpage, info and PDF outputs...\n\n... and fonts installed on client machines!\n\nSince I started with a two-line diff for just git-ls-files I decided to\nplay safe with this,\n\n\n"}]}