Message ID | be22686b93fa76f0ff63a7d93cb731545c57cb22.1551916338.git.me@ttaylorr.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] Documentation/config: note trailing newline with --type=color | expand |
On Wed, Mar 06, 2019 at 03:52:38PM -0800, Taylor Blau wrote: > In 63e2a0f8e9 (builtin/config: introduce `color` type specifier, > 2018-04-09), `--type=color` was introduced and preferred to the > old-style `--get-color`. > > The two behave the same in almost every way, save for the fact that > `--type=color` prints a trailing newline where `--get-color` does not. > Instead of introducing ambiguity between `--type=color` and the other > `--type` variants, document the difference between `--type=color` and > `--get-color` instead. I just responded to the one Junio posted elsewhere in the thread, but for the record this one is fine to me, too (and it gets the literal quoting right ;) ). -Peff
Jeff King <peff@peff.net> writes: > On Wed, Mar 06, 2019 at 03:52:38PM -0800, Taylor Blau wrote: > >> In 63e2a0f8e9 (builtin/config: introduce `color` type specifier, >> 2018-04-09), `--type=color` was introduced and preferred to the >> old-style `--get-color`. >> >> The two behave the same in almost every way, save for the fact that >> `--type=color` prints a trailing newline where `--get-color` does not. >> Instead of introducing ambiguity between `--type=color` and the other >> `--type` variants, document the difference between `--type=color` and >> `--get-color` instead. > > I just responded to the one Junio posted elsewhere in the thread, but > for the record this one is fine to me, too (and it gets the literal > quoting right ;) ). Yeah, I haven't reached that message when I was doing mine. Other than "co-authored-by", which probably is not quite correct (i.e. I would have added "[tb: wrapped it up with a commit log message]" and kept you as the author, if I were doing it), I do not have a problem with Taylor's version, either.
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index 1bfe9f56a7..d0b9c50d20 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -240,7 +240,9 @@ Valid `<type>`'s include: output. The optional `default` parameter is used instead, if there is no color configured for `name`. + -`--type=color [--default=<default>]` is preferred over `--get-color`. +`--type=color [--default=<default>]` is preferred over `--get-color` +(but note that `--get-color` will omit the trailing newline printed by +`--type=color`). -e:: --edit::
In 63e2a0f8e9 (builtin/config: introduce `color` type specifier, 2018-04-09), `--type=color` was introduced and preferred to the old-style `--get-color`. The two behave the same in almost every way, save for the fact that `--type=color` prints a trailing newline where `--get-color` does not. Instead of introducing ambiguity between `--type=color` and the other `--type` variants, document the difference between `--type=color` and `--get-color` instead. Co-authored-by: Jeff King <peff@peff.net> Signed-off-by: Taylor Blau <me@ttaylorr.com> --- Documentation/git-config.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)