From: Junio C Hamano Date: Tue, 18 Mar 2014 20:51:14 +0000 (-0700) Subject: Merge branch 'jc/tag-contains-with' X-Git-Tag: v2.0.0-rc0~87 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/884377c128925e7aa43eafebd8d4d0ba27dafe67?ds=inline;hp=-c Merge branch 'jc/tag-contains-with' * jc/tag-contains-with: tag: grok "--with" as synonym to "--contains" --- 884377c128925e7aa43eafebd8d4d0ba27dafe67 diff --combined builtin/tag.c index 169c676636,74d599c2d9..b7d9632867 --- a/builtin/tag.c +++ b/builtin/tag.c @@@ -42,7 -42,7 +42,7 @@@ static int match_pattern(const char **p if (!*patterns) return 1; for (; *patterns; patterns++) - if (!fnmatch(*patterns, ref, 0)) + if (!wildmatch(*patterns, ref, 0, NULL)) return 1; return 0; } @@@ -470,6 -470,12 +470,12 @@@ int cmd_tag(int argc, const char **argv PARSE_OPT_LASTARG_DEFAULT, parse_opt_with_commit, (intptr_t)"HEAD", }, + { + OPTION_CALLBACK, 0, "with", &with_commit, N_("commit"), + N_("print only tags that contain the commit"), + PARSE_OPT_HIDDEN | PARSE_OPT_LASTARG_DEFAULT, + parse_opt_with_commit, (intptr_t)"HEAD", + }, { OPTION_CALLBACK, 0, "points-at", NULL, N_("object"), N_("print only tags of the object"), 0, parse_opt_points_at