revert: use OPT_NOOP_NOARG
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe committed
Sep 28, 2011 at 19:47 UTC
7cfc60576aeb25e2d234d47e9fd689a6c65ffd76
1 file changed
+1
-3
builtin/revert.c
+1
-3
@@ -72,12 +72,10 @@ static int option_parse_x(const struct option *opt,
72
static void parse_args(int argc, const char **argv)
73
{
74
const char * const * usage_str = revert_or_cherry_pick_usage();
75
- int noop;
75
struct option options[] = {
76
OPT_BOOLEAN('n', "no-commit", &no_commit, "don't automatically commit"),
77
OPT_BOOLEAN('e', "edit", &edit, "edit the commit message"),
79
- { OPTION_BOOLEAN, 'r', NULL, &noop, NULL, "no-op (backward compatibility)",
80
- PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 0 },
78
+ OPT_NOOP_NOARG('r', NULL),
79
OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"),
80
OPT_INTEGER('m', "mainline", &mainline, "parent number"),
81
OPT_RERERE_AUTOUPDATE(&allow_rerere_auto),