]> git.ipfire.org Git - thirdparty/git.git/commitdiff
config: document --type=color output is a complete line
authorJeff King <peff@peff.net>
Tue, 5 Mar 2019 04:20:51 +0000 (23:20 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Mar 2019 03:48:35 +0000 (12:48 +0900)
Even though the newer "--type=color" option to "git config" is meant
to be upward compatible with the traditional "--get-color" option,
unlike the latter, its output is not an incomplete line that lack
the LF at the end.  That makes it consistent with output of other
types like "git config --type=bool".

Document it, as it sometimes surprises unsuspecting users.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-config.txt

index 1bfe9f56a7b9b983a2d927406dc17ff384e715a2..d0b9c50d20489e421139b531b66d0b0e693c9781 100644 (file)
@@ -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::