From: Junio C Hamano Date: Sat, 7 Oct 2017 07:27:55 +0000 (+0900) Subject: Merge branch 'jk/ui-color-always-to-auto' X-Git-Tag: v2.15.0-rc1~18 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/da15b78e52642bd45fd5513ab0000fdf2e58a6f4?ds=inline;hp=-c 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 --- da15b78e52642bd45fd5513ab0000fdf2e58a6f4 diff --combined builtin/tag.c index 34efba5798,12dbbc56d9..695cb0778e --- a/builtin/tag.c +++ b/builtin/tag.c @@@ -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() }; @@@ -552,10 -553,9 +553,10 @@@ 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; }