{"thread":{"id":"47470","subject":"[PATCH] doc: Fix specification of default (auto) for --color","startedAt":"2017-12-20T13:14:08Z","lastAt":"2017-12-20T13:23:42Z","messageCount":2,"participants":["William Pursell","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"335076","messageId":"CAJPQ5Na1Z5QpgqS+wUVPGq-E+wOgsW5m4NzGEUcAnmDnRz+9DA@mail.gmail.com","threadId":"47470","inReplyTo":null,"subject":"[PATCH] doc: Fix specification of default (auto) for --color","fromName":"William Pursell","fromEmail":"william.r.pursell@gmail.com","sentAt":"2017-12-20T13:14:02Z","receivedAt":"2017-12-20T13:14:08Z","isPatch":true,"sender":{"key":"william.r.pursell@gmail.com","avatar":"https://gravatar.com/avatar/904068e2b83b87043ecbbdcd450f04bd2148d70d5648fb47566bf1ebd6458f33?d=mp&s=160"},"body":"Current documentation for branch, show-branch, and grep contain the following:\n\n--color[=<when>]\n           Show colored matches. The value must be always (the\ndefault), never, or auto.\n\nThis is incorrect, as the default is \"auto\".\n\nSigned-off-by: William Pursell <william.r.pursell@gmail.com>\n---\n Documentation/git-branch.txt      | 2 +-\n Documentation/git-grep.txt        | 2 +-\n Documentation/git-show-branch.txt | 2 +-\n 3 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt\nindex b3084c99c..1e4dc3d91 100644\n--- a/Documentation/git-branch.txt\n+++ b/Documentation/git-branch.txt\n@@ -128,7 +128,7 @@ OPTIONS\n --color[=<when>]::\n  Color branches to highlight current, local, and\n  remote-tracking branches.\n- The value must be always (the default), never, or auto.\n+ The value must be always, never, or auto (the default).\n\n --no-color::\n  Turn off branch colors, even when the configuration file gives the\ndiff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt\nindex 18b494731..cb62fa30e 100644\n--- a/Documentation/git-grep.txt\n+++ b/Documentation/git-grep.txt\n@@ -201,7 +201,7 @@ providing this option will cause it to die.\n\n --color[=<when>]::\n  Show colored matches.\n- The value must be always (the default), never, or auto.\n+ The value must be always, never, or auto (the default).\n\n --no-color::\n  Turn off match highlighting, even when the configuration file\ndiff --git a/Documentation/git-show-branch.txt\nb/Documentation/git-show-branch.txt\nindex 7818e0f09..4a7be5f0c 100644\n--- a/Documentation/git-show-branch.txt\n+++ b/Documentation/git-show-branch.txt\n@@ -119,7 +119,7 @@ OPTIONS\n --color[=<when>]::\n  Color the status sign (one of these: `*` `!` `+` `-`) of each commit\n  corresponding to the branch it's in.\n- The value must be always (the default), never, or auto.\n+ The value must be always, never, or auto (the default).\n\n --no-color::\n  Turn off colored output, even when the configuration file gives the\n"},{"id":"335077","messageId":"20171220132335.GE17569@sigill.intra.peff.net","threadId":"47470","inReplyTo":"CAJPQ5Na1Z5QpgqS+wUVPGq-E+wOgsW5m4NzGEUcAnmDnRz+9DA@mail.gmail.com","subject":"Re: [PATCH] doc: Fix specification of default (auto) for --color","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-12-20T13:23:35Z","receivedAt":"2017-12-20T13:23:42Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Dec 20, 2017 at 05:14:02AM -0800, William Pursell wrote:\n\n> Current documentation for branch, show-branch, and grep contain the following:\n> \n> --color[=<when>]\n>            Show colored matches. The value must be always (the\n> default), never, or auto.\n> \n> This is incorrect, as the default is \"auto\".\n\nI think what this is trying to say is that if you specify \"--color\" but\nnot \"<when>\", then \"<when>\" defaults to \"always\". I.e., this is talking\nabout a different default than if you didn't specify \"--color\" at all\n(and that default relies on the config, which in turn defaults to\n\"auto\").\n\nThe wording is quite confusing, though. Maybe we could clarify that and\nmention both \"defaults\":\n\n  --color[=<when>]\n\tShow colored matches. The value of `<when>` must be `always`,\n\t`never`, or `auto`. If `<when>` is omitted (i.e., just\n\t`--color`), behave as if `--color=always` was specified. If no\n\t`--color` option is given, defaults, to the value of the\n\t`color.grep` config variable.\n\nThere may be a less clunky way of saying all that, though.\n\n-Peff\n"}]}