Skip to content

Commit cd8e759

Browse files
peffgitster
authored andcommitted
config: document --type=color output is a complete line
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0d0ac38 commit cd8e759

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/git-config.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,9 @@ Valid `<type>`'s include:
240240
output. The optional `default` parameter is used instead, if
241241
there is no color configured for `name`.
242242
+
243-
`--type=color [--default=<default>]` is preferred over `--get-color`.
243+
`--type=color [--default=<default>]` is preferred over `--get-color`
244+
(but note that `--get-color` will omit the trailing newline printed by
245+
`--type=color`).
244246

245247
-e::
246248
--edit::

0 commit comments

Comments
 (0)