Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit b0bc136

Browse files
committed
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 <[email protected]>
1 parent 5f95c9f commit b0bc136

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

builtin/tag.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,12 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
470470
PARSE_OPT_LASTARG_DEFAULT,
471471
parse_opt_with_commit, (intptr_t)"HEAD",
472472
},
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+
},
473479
{
474480
OPTION_CALLBACK, 0, "points-at", NULL, N_("object"),
475481
N_("print only tags of the object"), 0, parse_opt_points_at

0 commit comments

Comments
 (0)