parse-options.h: add macros for '--contains' option
[gitweb.git] / builtin / tag.c
index 7af45a0a90c11edce2df29e8f7bd7c6334394ef8..767162e3a9087a68223c2e0399bb8cd83744dfe1 100644 (file)
@@ -595,22 +595,12 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
 
                OPT_GROUP(N_("Tag listing options")),
                OPT_COLUMN(0, "column", &colopts, N_("show tag list in columns")),
+               OPT_CONTAINS(&with_commit, N_("print only tags that contain the commit")),
+               OPT_WITH(&with_commit, N_("print only tags that contain the commit")),
                {
                        OPTION_CALLBACK, 0, "sort", &tag_sort, N_("type"), N_("sort tags"),
                        PARSE_OPT_NONEG, parse_opt_sort
                },
-               {
-                       OPTION_CALLBACK, 0, "contains", &with_commit, N_("commit"),
-                       N_("print only tags that contain the commit"),
-                       PARSE_OPT_LASTARG_DEFAULT,
-                       parse_opt_commits, (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_commits, (intptr_t)"HEAD",
-               },
                {
                        OPTION_CALLBACK, 0, "points-at", &points_at, N_("object"),
                        N_("print only tags of the object"), 0, parse_opt_object_name