Re: [PATCH v5 3/3] builtin/config: introduce `color` type specifier
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Apr 6, 2018, 07:29 UTC
- Message-ID
- <CAPig+cT2T8r9mefv-7GEU4khEDVrthK45X5kbVXU5c-MXU39dg@mail.gmail.com>
- In-Reply-To
- <20180406063017.GD662@syl.local>
On Fri, Apr 6, 2018 at 2:30 AM, Taylor Blau <me@ttaylorr.com> wrote:
> [...] > For consistency, let's introduce `--type=color` and encourage its use > with `--default` together over `--get-color` alone.
A couple minor subjective comments below... neither worth a re-roll.
Show 8 quoted lines
> Signed-off-by: Taylor Blau <me@ttaylorr.com> > --- > diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt > @@ -180,6 +180,10 @@ Valid `<type>`'s include: > +- 'color': When writing to a caller, canonicalize by converting to an ANSI color > + escape sequence. When writing to the configuration file, a sanity-check is > + performed to ensure that the given value is canonicalize-able as an ANSI > + color, but it is written as-is.
"When writing to a caller" is a somewhat confusing way to say "When getting a value".
Likewise, "When writing to the configuration file" could be stated more concisely as "When setting a value".
Show 8 quoted lines
> --bool:: > @@ -231,6 +235,9 @@ Valid `<type>`'s include: > output it as the ANSI color escape sequence to the standard > output. The optional `default` parameter is used instead, if > there is no color configured for `name`. > ++ > +It is preferred to use `--type=color`, or `--type=color [--default=<default>]` > +instead of `--get-color`.
Repetitious. More conscisely:
It is preferred to use `--type=color [--default=<value>]`
instead of `--get-color`.Or, even:
`--type=color [--default=<value>]` is preferred over `--get-color`.