{"thread":{"id":"46246","subject":"[PATCH] doc: clarify syntax for %C(auto,...) in pretty formats","startedAt":"2017-06-24T07:23:18Z","lastAt":"2017-06-24T18:23:47Z","messageCount":2,"participants":["Andreas Heiduk","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"323179","messageId":"20170624072258.6832-1-asheiduk@gmail.com","threadId":"46246","inReplyTo":null,"subject":"[PATCH] doc: clarify syntax for %C(auto,...) in pretty formats","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-06-24T07:22:58Z","receivedAt":"2017-06-24T07:23:18Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"The change actually adds only \n\n\t(e.g. `%C(auto,red)`)\n\nbut reflowing the paragraph blows it up a little.\n\n-------- 8< --------\nThe manual correctly describes the syntax with `auto,` but the\ntrailing `,` is hard to spot in a terminal.  The HTML format does not\nhave this problem.  Adding an example helps both worlds.\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\n---\n Documentation/pretty-formats.txt | 11 ++++++-----\n 1 file changed, 6 insertions(+), 5 deletions(-)\n\ndiff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt\nindex 38040e95b..b03985101 100644\n--- a/Documentation/pretty-formats.txt\n+++ b/Documentation/pretty-formats.txt\n@@ -174,11 +174,12 @@ endif::git-rev-list[]\n - '%Creset': reset color\n - '%C(...)': color specification, as described under Values in the\n   \"CONFIGURATION FILE\" section of linkgit:git-config[1];\n-  adding `auto,` at the beginning will emit color only when colors are\n-  enabled for log output (by `color.diff`, `color.ui`, or `--color`, and\n-  respecting the `auto` settings of the former if we are going to a\n-  terminal). `auto` alone (i.e. `%C(auto)`) will turn on auto coloring\n-  on the next placeholders until the color is switched again.\n+  adding `auto,` at the beginning (e.g. `%C(auto,red)`) will emit\n+  color only when colors are enabled for log output (by `color.diff`,\n+  `color.ui`, or `--color`, and respecting the `auto` settings of the\n+  former if we are going to a terminal). `auto` alone (i.e.\n+  `%C(auto)`) will turn on auto coloring on the next placeholders\n+  until the color is switched again.\n - '%m': left (`<`), right (`>`) or boundary (`-`) mark\n - '%n': newline\n - '%%': a raw '%'\n-- \n2.13.1\n\n"},{"id":"323216","messageId":"xmqqfuep9rdf.fsf@gitster.mtv.corp.google.com","threadId":"46246","inReplyTo":"20170624072258.6832-1-asheiduk@gmail.com","subject":"Re: [PATCH] doc: clarify syntax for %C(auto,...) in pretty formats","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-06-24T18:23:40Z","receivedAt":"2017-06-24T18:23:47Z","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> The change actually adds only \n>\n> \t(e.g. `%C(auto,red)`)\n>\n> but reflowing the paragraph blows it up a little.\n\nIn such a case, you can avoid re-flowing and make the resulting\nlines of a-bit uneven lengths.\n\nThe end result can be checked with \"git diff --word-diff\", so do not\nworry too much about this either way, as long as the real change is\nsmall.\n\nThanks.\n\n>\n> -------- 8< --------\n> The manual correctly describes the syntax with `auto,` but the\n> trailing `,` is hard to spot in a terminal.  The HTML format does not\n> have this problem.  Adding an example helps both worlds.\n>\n> Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>\n> ---\n>  Documentation/pretty-formats.txt | 11 ++++++-----\n>  1 file changed, 6 insertions(+), 5 deletions(-)\n>\n> diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt\n> index 38040e95b..b03985101 100644\n> --- a/Documentation/pretty-formats.txt\n> +++ b/Documentation/pretty-formats.txt\n> @@ -174,11 +174,12 @@ endif::git-rev-list[]\n>  - '%Creset': reset color\n>  - '%C(...)': color specification, as described under Values in the\n>    \"CONFIGURATION FILE\" section of linkgit:git-config[1];\n> -  adding `auto,` at the beginning will emit color only when colors are\n> -  enabled for log output (by `color.diff`, `color.ui`, or `--color`, and\n> -  respecting the `auto` settings of the former if we are going to a\n> -  terminal). `auto` alone (i.e. `%C(auto)`) will turn on auto coloring\n> -  on the next placeholders until the color is switched again.\n> +  adding `auto,` at the beginning (e.g. `%C(auto,red)`) will emit\n> +  color only when colors are enabled for log output (by `color.diff`,\n> +  `color.ui`, or `--color`, and respecting the `auto` settings of the\n> +  former if we are going to a terminal). `auto` alone (i.e.\n> +  `%C(auto)`) will turn on auto coloring on the next placeholders\n> +  until the color is switched again.\n>  - '%m': left (`<`), right (`>`) or boundary (`-`) mark\n>  - '%n': newline\n>  - '%%': a raw '%'\n"}]}