From b0bc1365c29ea3328329ad45aba9e86cd7575af6 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 7 Mar 2014 12:07:35 -0800 Subject: 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 ", teach the same short-hand to "git tag", so that "git tag --with " shows the releases with the named commit. Signed-off-by: Junio C Hamano --- builtin/tag.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'builtin') diff --git a/builtin/tag.c b/builtin/tag.c index 74d3780b77..74d599c2d9 100644 --- a/builtin/tag.c +++ b/builtin/tag.c @@ -470,6 +470,12 @@ int cmd_tag(int argc, const char **argv, const char *prefix) 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 -- cgit v1.2.3