diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-12 12:34:15 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-12 12:34:15 -0700 |
commit | af543833d4e10163af8045859cc081969fa5fcec (patch) | |
tree | 8d131837c007202fa2e733996c8b5384fe73bde5 /builtin | |
parent | fbca6911dedd58136d27bff452c3ccdf48c82779 (diff) | |
parent | af1032edf951b4f0f0b3811af4e34e26198a9ef8 (diff) | |
download | git-af543833d4e10163af8045859cc081969fa5fcec.tar.gz |
Merge branch 'jc/parse-options-boolean'
* jc/parse-options-boolean:
apply: use OPT_NOOP_NOARG
revert: use OPT_NOOP_NOARG
parseopt: add OPT_NOOP_NOARG
archive.c: use OPT_BOOL()
parse-options: deprecate OPT_BOOLEAN
Conflicts:
builtin/revert.c
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/apply.c | 9 | ||||
-rw-r--r-- | builtin/revert.c | 4 |
2 files changed, 3 insertions, 10 deletions
diff --git a/builtin/apply.c b/builtin/apply.c index f2edc52818..872e40ab1e 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -3831,7 +3831,6 @@ int cmd_apply(int argc, const char **argv, const char *prefix_) int i; int errs = 0; int is_not_gitdir = !startup_info->have_repository; - int binary; int force_apply = 0; const char *whitespace_option = NULL; @@ -3850,12 +3849,8 @@ int cmd_apply(int argc, const char **argv, const char *prefix_) "ignore additions made by the patch"), OPT_BOOLEAN(0, "stat", &diffstat, "instead of applying the patch, output diffstat for the input"), - { OPTION_BOOLEAN, 0, "allow-binary-replacement", &binary, - NULL, "old option, now no-op", - PARSE_OPT_HIDDEN | PARSE_OPT_NOARG }, - { OPTION_BOOLEAN, 0, "binary", &binary, - NULL, "old option, now no-op", - PARSE_OPT_HIDDEN | PARSE_OPT_NOARG }, + OPT_NOOP_NOARG(0, "allow-binary-replacement"), + OPT_NOOP_NOARG(0, "binary"), OPT_BOOLEAN(0, "numstat", &numstat, "shows number of added and deleted lines in decimal notation"), OPT_BOOLEAN(0, "summary", &summary, diff --git a/builtin/revert.c b/builtin/revert.c index 200149e2e7..010508d571 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -133,7 +133,6 @@ static void parse_args(int argc, const char **argv, struct replay_opts *opts) { const char * const * usage_str = revert_or_cherry_pick_usage(opts); const char *me = action_name(opts); - int noop; int reset = 0; int contin = 0; struct option options[] = { @@ -141,8 +140,7 @@ static void parse_args(int argc, const char **argv, struct replay_opts *opts) OPT_BOOLEAN(0, "continue", &contin, "continue the current operation"), OPT_BOOLEAN('n', "no-commit", &opts->no_commit, "don't automatically commit"), OPT_BOOLEAN('e', "edit", &opts->edit, "edit the commit message"), - { OPTION_BOOLEAN, 'r', NULL, &noop, NULL, "no-op (backward compatibility)", - PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 0 }, + OPT_NOOP_NOARG('r', NULL), OPT_BOOLEAN('s', "signoff", &opts->signoff, "add Signed-off-by:"), OPT_INTEGER('m', "mainline", &opts->mainline, "parent number"), OPT_RERERE_AUTOUPDATE(&opts->allow_rerere_auto), |