X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=log-tree.c;fp=log-tree.c;h=9ba8fb2af37ae0b027b4f9df1f01e3bcf1f2888c;hb=f1c9626105d5e4962a5ccaa4620114d03f32ad02;hp=e9457019d5ac7aff1e185e195f37b851732f6210;hpb=2e6c012e10fd866eb3259de3a929e0296daabbaf;p=git.git diff --git a/log-tree.c b/log-tree.c index e9457019d..9ba8fb2af 100644 --- a/log-tree.c +++ b/log-tree.c @@ -31,7 +31,7 @@ static char decoration_colors[][COLOR_MAXLEN] = { static const char *decorate_get_color(int decorate_use_color, enum decoration_type ix) { - if (decorate_use_color) + if (decorate_use_color > 0) return decoration_colors[ix]; return ""; } @@ -77,7 +77,7 @@ int parse_decorate_color_config(const char *var, const int ofs, const char *valu * for showing the commit sha1, use the same check for --decorate */ #define decorate_get_color_opt(o, ix) \ - decorate_get_color(DIFF_OPT_TST((o), COLOR_DIFF), ix) + decorate_get_color((o)->use_color, ix) static void add_name_decoration(enum decoration_type type, const char *name, struct object *obj) {