tag: grok "--with" as synonym to "--contains"

Just like "git branch" can be told to list the branches that has the named commit by "git branch --with <commit>", teach the same short-hand to "git tag", so that "git tag --with <commit>" shows the releases with the named commit. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Mar 7, 2014 at 12:07 UTC b0bc1365c29ea3328329ad45aba9e86cd7575af6
1 file changed +6
builtin/tag.c
+6
@@ -470,6 +470,12 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
470 PARSE_OPT_LASTARG_DEFAULT,
471 parse_opt_with_commit, (intptr_t)"HEAD",
472 },
473 + {
474 + OPTION_CALLBACK, 0, "with", &with_commit, N_("commit"),
475 + N_("print only tags that contain the commit"),
476 + PARSE_OPT_HIDDEN | PARSE_OPT_LASTARG_DEFAULT,
477 + parse_opt_with_commit, (intptr_t)"HEAD",
478 + },
479 {
480 OPTION_CALLBACK, 0, "points-at", NULL, N_("object"),
481 N_("print only tags of the object"), 0, parse_opt_points_at