From 55dc1863eb6a5c8f18121d385cb0824daa27d6b1 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 3 Oct 2017 12:14:00 +0900 Subject: colors: git_default_config() does not read color.ui As we reverted 136c8c8b ("color: check color.ui in git_default_config()", 2017-07-13), these need to be added back to the codebase so that "git tag --list" and "git for-each-ref" would still pay attention to color.ui setting. Signed-off-by: Junio C Hamano --- builtin/for-each-ref.c | 3 ++- builtin/tag.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c index 5d7c921a77..238eb00e09 100644 --- a/builtin/for-each-ref.c +++ b/builtin/for-each-ref.c @@ -5,6 +5,7 @@ #include "object.h" #include "parse-options.h" #include "ref-filter.h" +#include "color.h" static char const * const for_each_ref_usage[] = { N_("git for-each-ref [] []"), @@ -54,7 +55,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix) format.format = "%(objectname) %(objecttype)\t%(refname)"; - git_config(git_default_config, NULL); + git_config(git_color_default_config, NULL); parse_options(argc, argv, prefix, opts, for_each_ref_usage, 0); if (maxcount < 0) { diff --git a/builtin/tag.c b/builtin/tag.c index 66e35b823b..46c3e78b55 100644 --- a/builtin/tag.c +++ b/builtin/tag.c @@ -158,7 +158,7 @@ static int git_tag_config(const char *var, const char *value, void *cb) if (starts_with(var, "column.")) return git_column_config(var, value, "tag", &colopts); - return git_default_config(var, value, cb); + return git_color_default_config(var, value, cb); } static void write_tag_body(int fd, const struct object_id *oid) -- cgit v1.2.1