summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-10-07 07:27:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-07 07:27:55 (GMT)
commitda15b78e52642bd45fd5513ab0000fdf2e58a6f4 (patch)
treef8888a525b14e9397639f42d3bb9c6f6cb7950ee /builtin
parent5261fefa4aa7e9c054e1bd664a138d49a3e26d79 (diff)
parentaebd23506ec952c1ca68d577afc59d3e2f7bd7ce (diff)
downloadgit-da15b78e52642bd45fd5513ab0000fdf2e58a6f4.zip
git-da15b78e52642bd45fd5513ab0000fdf2e58a6f4.tar.gz
git-da15b78e52642bd45fd5513ab0000fdf2e58a6f4.tar.bz2
Merge branch 'jk/ui-color-always-to-auto'
Fix regression of "git add -p" for users with "color.ui = always" in their configuration, by merging the topic below and adjusting it for the 'master' front. * jk/ui-color-always-to-auto: t7301: use test_terminal to check color t4015: use --color with --color-moved color: make "always" the same as "auto" in config provide --color option for all ref-filter users t3205: use --color instead of color.branch=always t3203: drop "always" color test t6006: drop "always" color config tests t7502: use diff.noprefix for --verbose test t7508: use test_terminal for color output t3701: use test-terminal to collect color output t4015: prefer --color to -c color.diff=always test-terminal: set TERM=vt100
Diffstat (limited to 'builtin')
-rw-r--r--builtin/for-each-ref.c1
-rw-r--r--builtin/tag.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index 5d7c921..e931be9 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -36,6 +36,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
OPT_GROUP(""),
OPT_INTEGER( 0 , "count", &maxcount, N_("show only <n> matched refs")),
OPT_STRING( 0 , "format", &format.format, N_("format"), N_("format to use for the output")),
+ OPT__COLOR(&format.use_color, N_("respect format colors")),
OPT_CALLBACK(0 , "sort", sorting_tail, N_("key"),
N_("field name to sort on"), &parse_opt_ref_sorting),
OPT_CALLBACK(0, "points-at", &filter.points_at,
diff --git a/builtin/tag.c b/builtin/tag.c
index 34efba5..695cb07 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -411,6 +411,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
},
OPT_STRING( 0 , "format", &format.format, N_("format"),
N_("format to use for the output")),
+ OPT__COLOR(&format.use_color, N_("respect format colors")),
OPT_BOOL('i', "ignore-case", &icase, N_("sorting and filtering are case insensitive")),
OPT_END()
};