diff options
author | Jeff King <peff@peff.net> | 2017-10-03 09:45:47 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-04 11:35:29 +0900 |
commit | 0c88bf50502e2be7d7d8965052d77bbf08e1d519 (patch) | |
tree | 2e0526a67f059be8fce0eaac254232845bdb9544 /Documentation | |
parent | t3205: use --color instead of color.branch=always (diff) | |
download | tgif-0c88bf50502e2be7d7d8965052d77bbf08e1d519.tar.xz |
provide --color option for all ref-filter users
When ref-filter learned about want_color() in 11b087adfd
(ref-filter: consult want_color() before emitting colors,
2017-07-13), it became useful to be able to turn colors off
and on for specific commands. For git-branch, you can do so
with --color/--no-color.
But for git-for-each-ref and git-tag, the other users of
ref-filter, you have no option except to tweak the
"color.ui" config setting. Let's give both of these commands
the usual color command-line options.
This is a bit more obvious as a method for overriding the
config. And it also prepares us for the behavior of "always"
changing (so that we are still left with a way of forcing
color when our output goes to a non-terminal).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-for-each-ref.txt | 5 | ||||
-rw-r--r-- | Documentation/git-tag.txt | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt index cc42c12832..b92ebd0cd9 100644 --- a/Documentation/git-for-each-ref.txt +++ b/Documentation/git-for-each-ref.txt @@ -55,6 +55,11 @@ OPTIONS literally, in the latter case matching completely or from the beginning up to a slash. +--color[=<when>]: + Respect any colors specified in the `--format` option. The + `<when>` field must be one of `always`, `never`, or `auto` (if + `<when>` is absent, behave as if `always` was given). + --shell:: --perl:: --python:: diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index 1eb15afa1c..a1399a78a0 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -115,6 +115,11 @@ options for details. variable if it exists, or lexicographic order otherwise. See linkgit:git-config[1]. +--color[=<when>]: + Respect any colors specified in the `--format` option. The + `<when>` field must be one of `always`, `never`, or `auto` (if + `<when>` is absent, behave as if `always` was given). + -i:: --ignore-case:: Sorting and filtering tags are case insensitive. |