Merge branch 'jk/ui-color-always-to-auto'
authorJunio C Hamano <gitster@pobox.com>
Sat, 7 Oct 2017 07:27:55 +0000 (16:27 +0900)
committerJunio C Hamano <gitster@pobox.com>
Sat, 7 Oct 2017 07:27:55 +0000 (16:27 +0900)
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

1  2 
builtin/tag.c
diff --combined builtin/tag.c
index 34efba5798e226f684906af74ebbc104e8401f39,12dbbc56d93f296f09a0f640127311bdeb8c8800..695cb0778e2cad52d829030b00f91a4b230224e1
@@@ -411,6 -411,7 +411,7 @@@ int cmd_tag(int argc, const char **argv
                },
                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()
        };
        if (force && !is_null_oid(&prev) && oidcmp(&prev, &object))
                printf(_("Updated tag '%s' (was %s)\n"), tag, find_unique_abbrev(prev.hash, DEFAULT_ABBREV));
  
 -      strbuf_release(&err);
 -      strbuf_release(&buf);
 -      strbuf_release(&ref);
 -      strbuf_release(&reflog_msg);
 +      UNLEAK(buf);
 +      UNLEAK(ref);
 +      UNLEAK(reflog_msg);
 +      UNLEAK(msg);
 +      UNLEAK(err);
        return 0;
  }