use "sentinel" function attribute for variadic lists
[gitweb.git] / builtin / revert.c
index c5e36b94c080212ec9241146c20ef2e323663bea..b8b51746def851c86371e084abaa95a64599c66c 100644 (file)
  */
 
 static const char * const revert_usage[] = {
-       N_("git revert [options] <commit-ish>"),
+       N_("git revert [options] <commit-ish>..."),
        N_("git revert <subcommand>"),
        NULL
 };
 
 static const char * const cherry_pick_usage[] = {
-       N_("git cherry-pick [options] <commit-ish>"),
+       N_("git cherry-pick [options] <commit-ish>..."),
        N_("git cherry-pick <subcommand>"),
        NULL
 };
@@ -54,6 +54,7 @@ static int option_parse_x(const struct option *opt,
        return 0;
 }
 
+__attribute__((sentinel))
 static void verify_opt_compatible(const char *me, const char *base_opt, ...)
 {
        const char *this_opt;
@@ -70,6 +71,7 @@ static void verify_opt_compatible(const char *me, const char *base_opt, ...)
                die(_("%s: %s cannot be used with %s"), me, this_opt, base_opt);
 }
 
+__attribute__((sentinel))
 static void verify_opt_mutually_compatible(const char *me, ...)
 {
        const char *opt1, *opt2 = NULL;