From: Taylor Blau <me@ttaylorr.com>
To: git@vger.kernel.org
Cc: peff@peff.net, gitster@pobox.com
Subject: [PATCH v2] Documentation/config: note trailing newline with --type=color
Date: Wed, 6 Mar 2019 15:52:38 -0800 [thread overview]
Message-ID: <be22686b93fa76f0ff63a7d93cb731545c57cb22.1551916338.git.me@ttaylorr.com> (raw)
In-Reply-To: <b5ca6391fd0273fb7d6b92bc5ada96df93bc5cf2.1551487219.git.me@ttaylorr.com>
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(-)
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::
--
2.20.1
next prev parent reply other threads:[~2019-03-06 23:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-02 0:40 [PATCH] builtin/config.c: don't print a newline with --color Taylor Blau
2019-03-02 12:34 ` Eric Sunshine
2019-03-02 20:25 ` Johannes Schindelin
2019-03-03 17:24 ` Jeff King
2019-03-05 15:59 ` Johannes Schindelin
2019-03-06 23:44 ` Taylor Blau
2019-03-03 1:18 ` Junio C Hamano
2019-03-03 17:42 ` Jeff King
2019-03-04 4:28 ` Junio C Hamano
2019-03-04 5:05 ` Junio C Hamano
2019-03-05 4:20 ` Jeff King
2019-03-05 5:57 ` Junio C Hamano
2019-03-06 23:42 ` Taylor Blau
2019-03-07 0:50 ` Junio C Hamano
2019-03-07 2:57 ` Jeff King
2019-03-06 23:52 ` Taylor Blau [this message]
2019-03-07 2:58 ` [PATCH v2] Documentation/config: note trailing newline with --type=color Jeff King
2019-03-07 3:47 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=be22686b93fa76f0ff63a7d93cb731545c57cb22.1551916338.git.me@ttaylorr.com \
--to=me@ttaylorr.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).