Replace deprecated OPT_BOOLEAN by OPT_BOOL

This task emerged from b04ba2bb (parse-options: deprecate OPT_BOOLEAN, 2011-09-27). All occurrences of the respective variables have been reviewed and none of them relied on the counting up mechanism, but all of them were using the variable as a true boolean. This patch does not change semantics of any command intentionally. Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefan Beller committed Aug 3, 2013 at 13:51 UTC d5d09d475440c24016ec52a0bcc8477d9a7b5c71
39 files changed +227 -227
builtin/apply.c
+12 -12
@@ -4363,23 +4363,23 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)
4363 { OPTION_CALLBACK, 'p', NULL, NULL, N_("num"),
4364 N_("remove <num> leading slashes from traditional diff paths"),
4365 0, option_parse_p },
4366 - OPT_BOOLEAN(0, "no-add", &no_add,
4366 + OPT_BOOL(0, "no-add", &no_add,
4367 N_("ignore additions made by the patch")),
4368 - OPT_BOOLEAN(0, "stat", &diffstat,
4368 + OPT_BOOL(0, "stat", &diffstat,
4369 N_("instead of applying the patch, output diffstat for the input")),
4370 OPT_NOOP_NOARG(0, "allow-binary-replacement"),
4371 OPT_NOOP_NOARG(0, "binary"),
4372 - OPT_BOOLEAN(0, "numstat", &numstat,
4372 + OPT_BOOL(0, "numstat", &numstat,
4373 N_("show number of added and deleted lines in decimal notation")),
4374 - OPT_BOOLEAN(0, "summary", &summary,
4374 + OPT_BOOL(0, "summary", &summary,
4375 N_("instead of applying the patch, output a summary for the input")),
4376 - OPT_BOOLEAN(0, "check", &check,
4376 + OPT_BOOL(0, "check", &check,
4377 N_("instead of applying the patch, see if the patch is applicable")),
4378 - OPT_BOOLEAN(0, "index", &check_index,
4378 + OPT_BOOL(0, "index", &check_index,
4379 N_("make sure the patch is applicable to the current index")),
4380 - OPT_BOOLEAN(0, "cached", &cached,
4380 + OPT_BOOL(0, "cached", &cached,
4381 N_("apply a patch without touching the working tree")),
4382 - OPT_BOOLEAN(0, "apply", &force_apply,
4382 + OPT_BOOL(0, "apply", &force_apply,
4383 N_("also apply the patch (use with --stat/--summary/--check)")),
4384 OPT_BOOL('3', "3way", &threeway,
4385 N_( "attempt three-way merge if a patch does not apply")),
@@ -4399,13 +4399,13 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)
4399 { OPTION_CALLBACK, 0, "ignore-whitespace", NULL, NULL,
4400 N_("ignore changes in whitespace when finding context"),
4401 PARSE_OPT_NOARG, option_parse_space_change },
4402 - OPT_BOOLEAN('R', "reverse", &apply_in_reverse,
4402 + OPT_BOOL('R', "reverse", &apply_in_reverse,
4403 N_("apply the patch in reverse")),
4404 - OPT_BOOLEAN(0, "unidiff-zero", &unidiff_zero,
4404 + OPT_BOOL(0, "unidiff-zero", &unidiff_zero,
4405 N_("don't expect at least one line of context")),
4406 - OPT_BOOLEAN(0, "reject", &apply_with_reject,
4406 + OPT_BOOL(0, "reject", &apply_with_reject,
4407 N_("leave the rejected hunks in corresponding *.rej files")),
4408 - OPT_BOOLEAN(0, "allow-overlap", &allow_overlap,
4408 + OPT_BOOL(0, "allow-overlap", &allow_overlap,
4409 N_("allow overlapping hunks")),
4410 OPT__VERBOSE(&apply_verbosely, N_("be verbose")),
4411 OPT_BIT(0, "inaccurate-eof", &options,
builtin/bisect--helper.c
+4 -4
@@ -13,10 +13,10 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
13 int next_all = 0;
14 int no_checkout = 0;
15 struct option options[] = {
16 - OPT_BOOLEAN(0, "next-all", &next_all,
17 - N_("perform 'git bisect next'")),
18 - OPT_BOOLEAN(0, "no-checkout", &no_checkout,
19 - N_("update BISECT_HEAD instead of checking out the current commit")),
16 + OPT_BOOL(0, "next-all", &next_all,
17 + N_("perform 'git bisect next'")),
18 + OPT_BOOL(0, "no-checkout", &no_checkout,
19 + N_("update BISECT_HEAD instead of checking out the current commit")),
20 OPT_END()
21 };
22
builtin/blame.c
+4 -4
@@ -2273,10 +2273,10 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
2273 static const char *revs_file = NULL;
2274 static const char *contents_from = NULL;
2275 static const struct option options[] = {
2276 - OPT_BOOLEAN(0, "incremental", &incremental, N_("Show blame entries as we find them, incrementally")),
2277 - OPT_BOOLEAN('b', NULL, &blank_boundary, N_("Show blank SHA-1 for boundary commits (Default: off)")),
2278 - OPT_BOOLEAN(0, "root", &show_root, N_("Do not treat root commits as boundaries (Default: off)")),
2279 - OPT_BOOLEAN(0, "show-stats", &show_stats, N_("Show work cost statistics")),
2276 + OPT_BOOL(0, "incremental", &incremental, N_("Show blame entries as we find them, incrementally")),
2277 + OPT_BOOL('b', NULL, &blank_boundary, N_("Show blank SHA-1 for boundary commits (Default: off)")),
2278 + OPT_BOOL(0, "root", &show_root, N_("Do not treat root commits as boundaries (Default: off)")),
2279 + OPT_BOOL(0, "show-stats", &show_stats, N_("Show work cost statistics")),
2280 OPT_BIT(0, "score-debug", &output_option, N_("Show output score for blame entries"), OUTPUT_SHOW_SCORE),
2281 OPT_BIT('f', "show-name", &output_option, N_("Show original filename (Default: auto)"), OUTPUT_SHOW_NAME),
2282 OPT_BIT('n', "show-number", &output_option, N_("Show original linenumber (Default: off)"), OUTPUT_SHOW_NUMBER),
builtin/branch.c
+5 -5
@@ -797,7 +797,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
797 OPT_SET_INT( 0, "set-upstream", &track, N_("change upstream info"),
798 BRANCH_TRACK_OVERRIDE),
799 OPT_STRING('u', "set-upstream-to", &new_upstream, "upstream", "change the upstream info"),
800 - OPT_BOOLEAN(0, "unset-upstream", &unset_upstream, "Unset the upstream info"),
800 + OPT_BOOL(0, "unset-upstream", &unset_upstream, "Unset the upstream info"),
801 OPT__COLOR(&branch_use_color, N_("use colored output")),
802 OPT_SET_INT('r', "remotes", &kinds, N_("act on remote-tracking branches"),
803 REF_REMOTE_BRANCH),
@@ -822,10 +822,10 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
822 OPT_BIT('D', NULL, &delete, N_("delete branch (even if not merged)"), 2),
823 OPT_BIT('m', "move", &rename, N_("move/rename a branch and its reflog"), 1),
824 OPT_BIT('M', NULL, &rename, N_("move/rename a branch, even if target exists"), 2),
825 - OPT_BOOLEAN(0, "list", &list, N_("list branch names")),
826 - OPT_BOOLEAN('l', "create-reflog", &reflog, N_("create the branch's reflog")),
827 - OPT_BOOLEAN(0, "edit-description", &edit_description,
828 - N_("edit the description for the branch")),
825 + OPT_BOOL(0, "list", &list, N_("list branch names")),
826 + OPT_BOOL('l', "create-reflog", &reflog, N_("create the branch's reflog")),
827 + OPT_BOOL(0, "edit-description", &edit_description,
828 + N_("edit the description for the branch")),
829 OPT__FORCE(&force_create, N_("force creation (when already exists)")),
830 {
831 OPTION_CALLBACK, 0, "no-merged", &merge_filter_ref,
builtin/check-attr.c
+4 -4
@@ -16,10 +16,10 @@ NULL
16 static int null_term_line;
17
18 static const struct option check_attr_options[] = {
19 - OPT_BOOLEAN('a', "all", &all_attrs, N_("report all attributes set on file")),
20 - OPT_BOOLEAN(0, "cached", &cached_attrs, N_("use .gitattributes only from the index")),
21 - OPT_BOOLEAN(0 , "stdin", &stdin_paths, N_("read file names from stdin")),
22 - OPT_BOOLEAN('z', NULL, &null_term_line,
19 + OPT_BOOL('a', "all", &all_attrs, N_("report all attributes set on file")),
20 + OPT_BOOL(0, "cached", &cached_attrs, N_("use .gitattributes only from the index")),
21 + OPT_BOOL(0 , "stdin", &stdin_paths, N_("read file names from stdin")),
22 + OPT_BOOL('z', NULL, &null_term_line,
23 N_("input paths are terminated by a null character")),
24 OPT_END()
25 };
builtin/check-ignore.c
+6 -6
@@ -18,12 +18,12 @@ static const struct option check_ignore_options[] = {
18 OPT__QUIET(&quiet, N_("suppress progress reporting")),
19 OPT__VERBOSE(&verbose, N_("be verbose")),
20 OPT_GROUP(""),
21 - OPT_BOOLEAN(0, "stdin", &stdin_paths,
22 - N_("read file names from stdin")),
23 - OPT_BOOLEAN('z', NULL, &null_term_line,
24 - N_("input paths are terminated by a null character")),
25 - OPT_BOOLEAN('n', "non-matching", &show_non_matching,
26 - N_("show non-matching input paths")),
21 + OPT_BOOL(0, "stdin", &stdin_paths,
22 + N_("read file names from stdin")),
23 + OPT_BOOL('z', NULL, &null_term_line,
24 + N_("input paths are terminated by a null character")),
25 + OPT_BOOL('n', "non-matching", &show_non_matching,
26 + N_("show non-matching input paths")),
27 OPT_END()
28 };
29
builtin/checkout-index.c
+3 -3
@@ -183,7 +183,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
183 int prefix_length;
184 int force = 0, quiet = 0, not_new = 0;
185 struct option builtin_checkout_index_options[] = {
186 - OPT_BOOLEAN('a', "all", &all,
186 + OPT_BOOL('a', "all", &all,
187 N_("check out all files in the index")),
188 OPT__FORCE(&force, N_("force overwrite of existing files")),
189 OPT__QUIET(&quiet,
@@ -196,9 +196,9 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
196 { OPTION_CALLBACK, 'z', NULL, NULL, NULL,
197 N_("paths are separated with NUL character"),
198 PARSE_OPT_NOARG, option_parse_z },
199 - OPT_BOOLEAN(0, "stdin", &read_from_stdin,
199 + OPT_BOOL(0, "stdin", &read_from_stdin,
200 N_("read list of paths from the standard input")),
201 - OPT_BOOLEAN(0, "temp", &to_tempfile,
201 + OPT_BOOL(0, "temp", &to_tempfile,
202 N_("write the content to temporary files")),
203 OPT_CALLBACK(0, "prefix", NULL, N_("string"),
204 N_("when creating files, prepend <string>"),
builtin/checkout.c
+5 -5
@@ -1056,8 +1056,8 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
1056 N_("create and checkout a new branch")),
1057 OPT_STRING('B', NULL, &opts.new_branch_force, N_("branch"),
1058 N_("create/reset and checkout a branch")),
1059 - OPT_BOOLEAN('l', NULL, &opts.new_branch_log, N_("create reflog for new branch")),
1060 - OPT_BOOLEAN(0, "detach", &opts.force_detach, N_("detach the HEAD at named commit")),
1059 + OPT_BOOL('l', NULL, &opts.new_branch_log, N_("create reflog for new branch")),
1060 + OPT_BOOL(0, "detach", &opts.force_detach, N_("detach the HEAD at named commit")),
1061 OPT_SET_INT('t', "track", &opts.track, N_("set upstream info for new branch"),
1062 BRANCH_TRACK_EXPLICIT),
1063 OPT_STRING(0, "orphan", &opts.new_orphan_branch, N_("new branch"), N_("new unparented branch")),
@@ -1066,11 +1066,11 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
1066 OPT_SET_INT('3', "theirs", &opts.writeout_stage, N_("checkout their version for unmerged files"),
1067 3),
1068 OPT__FORCE(&opts.force, N_("force checkout (throw away local modifications)")),
1069 - OPT_BOOLEAN('m', "merge", &opts.merge, N_("perform a 3-way merge with the new branch")),
1070 - OPT_BOOLEAN(0, "overwrite-ignore", &opts.overwrite_ignore, N_("update ignored files (default)")),
1069 + OPT_BOOL('m', "merge", &opts.merge, N_("perform a 3-way merge with the new branch")),
1070 + OPT_BOOL(0, "overwrite-ignore", &opts.overwrite_ignore, N_("update ignored files (default)")),
1071 OPT_STRING(0, "conflict", &conflict_style, N_("style"),
1072 N_("conflict style (merge or diff3)")),
1073 - OPT_BOOLEAN('p', "patch", &opts.patch_mode, N_("select hunks interactively")),
1073 + OPT_BOOL('p', "patch", &opts.patch_mode, N_("select hunks interactively")),
1074 OPT_BOOL(0, "ignore-skip-worktree-bits", &opts.ignore_skipworktree,
1075 N_("do not limit pathspecs to sparse entries only")),
1076 OPT_HIDDEN_BOOL(0, "guess", &dwim_new_local_branch,
builtin/clean.c
+3 -3
@@ -851,12 +851,12 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
851 OPT__DRY_RUN(&dry_run, N_("dry run")),
852 OPT__FORCE(&force, N_("force")),
853 OPT_BOOL('i', "interactive", &interactive, N_("interactive cleaning")),
854 - OPT_BOOLEAN('d', NULL, &remove_directories,
854 + OPT_BOOL('d', NULL, &remove_directories,
855 N_("remove whole directories")),
856 { OPTION_CALLBACK, 'e', "exclude", &exclude_list, N_("pattern"),
857 N_("add <pattern> to ignore rules"), PARSE_OPT_NONEG, exclude_cb },
858 - OPT_BOOLEAN('x', NULL, &ignored, N_("remove ignored files, too")),
859 - OPT_BOOLEAN('X', NULL, &ignored_only,
858 + OPT_BOOL('x', NULL, &ignored, N_("remove ignored files, too")),
859 + OPT_BOOL('X', NULL, &ignored_only,
860 N_("remove only ignored files")),
861 OPT_END()
862 };
builtin/clone.c
+8 -8
@@ -62,22 +62,22 @@ static struct option builtin_clone_options[] = {
62 OPT__VERBOSITY(&option_verbosity),
63 OPT_BOOL(0, "progress", &option_progress,
64 N_("force progress reporting")),
65 - OPT_BOOLEAN('n', "no-checkout", &option_no_checkout,
66 - N_("don't create a checkout")),
65 + OPT_BOOL('n', "no-checkout", &option_no_checkout,
66 + N_("don't create a checkout")),
67 OPT_BOOL(0, "bare", &option_bare, N_("create a bare repository")),
68 OPT_HIDDEN_BOOL(0, "naked", &option_bare,
69 N_("create a bare repository")),
70 - OPT_BOOLEAN(0, "mirror", &option_mirror,
71 - N_("create a mirror repository (implies bare)")),
70 + OPT_BOOL(0, "mirror", &option_mirror,
71 + N_("create a mirror repository (implies bare)")),
72 OPT_BOOL('l', "local", &option_local,
73 N_("to clone from a local repository")),
74 - OPT_BOOLEAN(0, "no-hardlinks", &option_no_hardlinks,
74 + OPT_BOOL(0, "no-hardlinks", &option_no_hardlinks,
75 N_("don't use local hardlinks, always copy")),
76 - OPT_BOOLEAN('s', "shared", &option_shared,
76 + OPT_BOOL('s', "shared", &option_shared,
77 N_("setup as shared repository")),
78 - OPT_BOOLEAN(0, "recursive", &option_recursive,
78 + OPT_BOOL(0, "recursive", &option_recursive,
79 N_("initialize submodules in the clone")),
80 - OPT_BOOLEAN(0, "recurse-submodules", &option_recursive,
80 + OPT_BOOL(0, "recurse-submodules", &option_recursive,
81 N_("initialize submodules in the clone")),
82 OPT_STRING(0, "template", &option_template, N_("template-directory"),
83 N_("directory from which templates will be used")),
builtin/commit.c
+18 -18
@@ -1209,14 +1209,14 @@ int cmd_status(int argc, const char **argv, const char *prefix)
1209 OPT_SET_INT(0, "long", &status_format,
1210 N_("show status in long format (default)"),
1211 STATUS_FORMAT_LONG),
1212 - OPT_BOOLEAN('z', "null", &s.null_termination,
1213 - N_("terminate entries with NUL")),
1212 + OPT_BOOL('z', "null", &s.null_termination,
1213 + N_("terminate entries with NUL")),
1214 { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg,
1215 N_("mode"),
1216 N_("show untracked files, optional modes: all, normal, no. (Default: all)"),
1217 PARSE_OPT_OPTARG, NULL, (intptr_t)"all" },
1218 - OPT_BOOLEAN(0, "ignored", &show_ignored_in_status,
1219 - N_("show ignored files")),
1218 + OPT_BOOL(0, "ignored", &show_ignored_in_status,
1219 + N_("show ignored files")),
1220 { OPTION_STRING, 0, "ignore-submodules", &ignore_submodule_arg, N_("when"),
1221 N_("ignore changes to submodules, optional when: all, dirty, untracked. (Default: all)"),
1222 PARSE_OPT_OPTARG, NULL, (intptr_t)"all" },
@@ -1415,24 +1415,24 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
1415 OPT_STRING('C', "reuse-message", &use_message, N_("commit"), N_("reuse message from specified commit")),
1416 OPT_STRING(0, "fixup", &fixup_message, N_("commit"), N_("use autosquash formatted message to fixup specified commit")),
1417 OPT_STRING(0, "squash", &squash_message, N_("commit"), N_("use autosquash formatted message to squash specified commit")),
1418 - OPT_BOOLEAN(0, "reset-author", &renew_authorship, N_("the commit is authored by me now (used with -C/-c/--amend)")),
1419 - OPT_BOOLEAN('s', "signoff", &signoff, N_("add Signed-off-by:")),
1418 + OPT_BOOL(0, "reset-author", &renew_authorship, N_("the commit is authored by me now (used with -C/-c/--amend)")),
1419 + OPT_BOOL('s', "signoff", &signoff, N_("add Signed-off-by:")),
1420 OPT_FILENAME('t', "template", &template_file, N_("use specified template file")),
1421 OPT_BOOL('e', "edit", &edit_flag, N_("force edit of commit")),
1422 OPT_STRING(0, "cleanup", &cleanup_arg, N_("default"), N_("how to strip spaces and #comments from message")),
1423 - OPT_BOOLEAN(0, "status", &include_status, N_("include status in commit message template")),
1423 + OPT_BOOL(0, "status", &include_status, N_("include status in commit message template")),
1424 { OPTION_STRING, 'S', "gpg-sign", &sign_commit, N_("key id"),
1425 N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
1426 /* end commit message options */
1427
1428 OPT_GROUP(N_("Commit contents options")),
1429 - OPT_BOOLEAN('a', "all", &all, N_("commit all changed files")),
1430 - OPT_BOOLEAN('i', "include", &also, N_("add specified files to index for commit")),
1431 - OPT_BOOLEAN(0, "interactive", &interactive, N_("interactively add files")),
1432 - OPT_BOOLEAN('p', "patch", &patch_interactive, N_("interactively add changes")),
1433 - OPT_BOOLEAN('o', "only", &only, N_("commit only specified files")),
1434 - OPT_BOOLEAN('n', "no-verify", &no_verify, N_("bypass pre-commit hook")),
1435 - OPT_BOOLEAN(0, "dry-run", &dry_run, N_("show what would be committed")),
1429 + OPT_BOOL('a', "all", &all, N_("commit all changed files")),
1430 + OPT_BOOL('i', "include", &also, N_("add specified files to index for commit")),
1431 + OPT_BOOL(0, "interactive", &interactive, N_("interactively add files")),
1432 + OPT_BOOL('p', "patch", &patch_interactive, N_("interactively add changes")),
1433 + OPT_BOOL('o', "only", &only, N_("commit only specified files")),
1434 + OPT_BOOL('n', "no-verify", &no_verify, N_("bypass pre-commit hook")),
1435 + OPT_BOOL(0, "dry-run", &dry_run, N_("show what would be committed")),
1436 OPT_SET_INT(0, "short", &status_format, N_("show status concisely"),
1437 STATUS_FORMAT_SHORT),
1438 OPT_BOOL(0, "branch", &s.show_branch, N_("show branch information")),
@@ -1441,10 +1441,10 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
1441 OPT_SET_INT(0, "long", &status_format,
1442 N_("show status in long format (default)"),
1443 STATUS_FORMAT_LONG),
1444 - OPT_BOOLEAN('z', "null", &s.null_termination,
1445 - N_("terminate entries with NUL")),
1446 - OPT_BOOLEAN(0, "amend", &amend, N_("amend previous commit")),
1447 - OPT_BOOLEAN(0, "no-post-rewrite", &no_post_rewrite, N_("bypass post-rewrite hook")),
1444 + OPT_BOOL('z', "null", &s.null_termination,
1445 + N_("terminate entries with NUL")),
1446 + OPT_BOOL(0, "amend", &amend, N_("amend previous commit")),
1447 + OPT_BOOL(0, "no-post-rewrite", &no_post_rewrite, N_("bypass post-rewrite hook")),
1448 { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, N_("mode"), N_("show untracked files, optional modes: all, normal, no. (Default: all)"), PARSE_OPT_OPTARG, NULL, (intptr_t)"all" },
1449 /* end commit contents options */
1450
builtin/config.c
+1 -1
@@ -75,7 +75,7 @@ static struct option builtin_config_options[] = {
75 OPT_BIT(0, "bool-or-int", &types, N_("value is --bool or --int"), TYPE_BOOL_OR_INT),
76 OPT_BIT(0, "path", &types, N_("value is a path (file or directory name)"), TYPE_PATH),
77 OPT_GROUP(N_("Other")),
78 - OPT_BOOLEAN('z', "null", &end_null, N_("terminate values with NUL byte")),
78 + OPT_BOOL('z', "null", &end_null, N_("terminate values with NUL byte")),
79 OPT_BOOL(0, "includes", &respect_includes, N_("respect include directives on lookup")),
80 OPT_END(),
81 };
builtin/describe.c
+10 -10
@@ -406,12 +406,12 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
406 {
407 int contains = 0;
408 struct option options[] = {
409 - OPT_BOOLEAN(0, "contains", &contains, N_("find the tag that comes after the commit")),
410 - OPT_BOOLEAN(0, "debug", &debug, N_("debug search strategy on stderr")),
411 - OPT_BOOLEAN(0, "all", &all, N_("use any ref")),
412 - OPT_BOOLEAN(0, "tags", &tags, N_("use any tag, even unannotated")),
413 - OPT_BOOLEAN(0, "long", &longformat, N_("always use long format")),
414 - OPT_BOOLEAN(0, "first-parent", &first_parent, N_("only follow first parent")),
409 + OPT_BOOL(0, "contains", &contains, N_("find the tag that comes after the commit")),
410 + OPT_BOOL(0, "debug", &debug, N_("debug search strategy on stderr")),
411 + OPT_BOOL(0, "all", &all, N_("use any ref")),
412 + OPT_BOOL(0, "tags", &tags, N_("use any tag, even unannotated")),
413 + OPT_BOOL(0, "long", &longformat, N_("always use long format")),
414 + OPT_BOOL(0, "first-parent", &first_parent, N_("only follow first parent")),
415 OPT__ABBREV(&abbrev),
416 OPT_SET_INT(0, "exact-match", &max_candidates,
417 N_("only output exact matches"), 0),
@@ -419,11 +419,11 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
419 N_("consider <n> most recent tags (default: 10)")),
420 OPT_STRING(0, "match", &pattern, N_("pattern"),
421 N_("only consider tags matching <pattern>")),
422 - OPT_BOOLEAN(0, "always", &always,
423 - N_("show abbreviated commit object as fallback")),
422 + OPT_BOOL(0, "always", &always,
423 + N_("show abbreviated commit object as fallback")),
424 {OPTION_STRING, 0, "dirty", &dirty, N_("mark"),
425 - N_("append <mark> on dirty working tree (default: \"-dirty\")"),
426 - PARSE_OPT_OPTARG, NULL, (intptr_t) "-dirty"},
425 + N_("append <mark> on dirty working tree (default: \"-dirty\")"),
426 + PARSE_OPT_OPTARG, NULL, (intptr_t) "-dirty"},
427 OPT_END(),
428 };
429
builtin/fast-export.c
+5 -5
@@ -674,11 +674,11 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
674 N_("Dump marks to this file")),
675 OPT_STRING(0, "import-marks", &import_filename, N_("file"),
676 N_("Import marks from this file")),
677 - OPT_BOOLEAN(0, "fake-missing-tagger", &fake_missing_tagger,
678 - N_("Fake a tagger when tags lack one")),
679 - OPT_BOOLEAN(0, "full-tree", &full_tree,
680 - N_("Output full tree for each commit")),
681 - OPT_BOOLEAN(0, "use-done-feature", &use_done_feature,
677 + OPT_BOOL(0, "fake-missing-tagger", &fake_missing_tagger,
678 + N_("Fake a tagger when tags lack one")),
679 + OPT_BOOL(0, "full-tree", &full_tree,
680 + N_("Output full tree for each commit")),
681 + OPT_BOOL(0, "use-done-feature", &use_done_feature,
682 N_("Use the done feature to terminate the stream")),
683 OPT_BOOL(0, "no-data", &no_data, N_("Skip output of blob data")),
684 OPT_END()
builtin/fetch.c
+12 -12
@@ -56,28 +56,28 @@ static int option_parse_recurse_submodules(const struct option *opt,
56
57 static struct option builtin_fetch_options[] = {
58 OPT__VERBOSITY(&verbosity),
59 - OPT_BOOLEAN(0, "all", &all,
60 - N_("fetch from all remotes")),
61 - OPT_BOOLEAN('a', "append", &append,
62 - N_("append to .git/FETCH_HEAD instead of overwriting")),
59 + OPT_BOOL(0, "all", &all,
60 + N_("fetch from all remotes")),
61 + OPT_BOOL('a', "append", &append,
62 + N_("append to .git/FETCH_HEAD instead of overwriting")),
63 OPT_STRING(0, "upload-pack", &upload_pack, N_("path"),
64 N_("path to upload pack on remote end")),
65 OPT__FORCE(&force, N_("force overwrite of local branch")),
66 - OPT_BOOLEAN('m', "multiple", &multiple,
67 - N_("fetch from multiple remotes")),
66 + OPT_BOOL('m', "multiple", &multiple,
67 + N_("fetch from multiple remotes")),
68 OPT_SET_INT('t', "tags", &tags,
69 N_("fetch all tags and associated objects"), TAGS_SET),
70 OPT_SET_INT('n', NULL, &tags,
71 N_("do not fetch all tags (--no-tags)"), TAGS_UNSET),
72 - OPT_BOOLEAN('p', "prune", &prune,
73 - N_("prune remote-tracking branches no longer on remote")),
72 + OPT_BOOL('p', "prune", &prune,
73 + N_("prune remote-tracking branches no longer on remote")),
74 { OPTION_CALLBACK, 0, "recurse-submodules", NULL, N_("on-demand"),
75 N_("control recursive fetching of submodules"),
76 PARSE_OPT_OPTARG, option_parse_recurse_submodules },
77 - OPT_BOOLEAN(0, "dry-run", &dry_run,
78 - N_("dry run")),
79 - OPT_BOOLEAN('k', "keep", &keep, N_("keep downloaded pack")),
80 - OPT_BOOLEAN('u', "update-head-ok", &update_head_ok,
77 + OPT_BOOL(0, "dry-run", &dry_run,
78 + N_("dry run")),
79 + OPT_BOOL('k', "keep", &keep, N_("keep downloaded pack")),
80 + OPT_BOOL('u', "update-head-ok", &update_head_ok,
81 N_("allow updating of HEAD ref")),
82 OPT_BOOL(0, "progress", &progress, N_("force progress reporting")),
83 OPT_STRING(0, "depth", &depth, N_("depth"),
builtin/fsck.c
+8 -8
@@ -611,15 +611,15 @@ static char const * const fsck_usage[] = {
611
612 static struct option fsck_opts[] = {
613 OPT__VERBOSE(&verbose, N_("be verbose")),
614 - OPT_BOOLEAN(0, "unreachable", &show_unreachable, N_("show unreachable objects")),
614 + OPT_BOOL(0, "unreachable", &show_unreachable, N_("show unreachable objects")),
615 OPT_BOOL(0, "dangling", &show_dangling, N_("show dangling objects")),
616 - OPT_BOOLEAN(0, "tags", &show_tags, N_("report tags")),
617 - OPT_BOOLEAN(0, "root", &show_root, N_("report root nodes")),
618 - OPT_BOOLEAN(0, "cache", &keep_cache_objects, N_("make index objects head nodes")),
619 - OPT_BOOLEAN(0, "reflogs", &include_reflogs, N_("make reflogs head nodes (default)")),
620 - OPT_BOOLEAN(0, "full", &check_full, N_("also consider packs and alternate objects")),
621 - OPT_BOOLEAN(0, "strict", &check_strict, N_("enable more strict checking")),
622 - OPT_BOOLEAN(0, "lost-found", &write_lost_and_found,
616 + OPT_BOOL(0, "tags", &show_tags, N_("report tags")),
617 + OPT_BOOL(0, "root", &show_root, N_("report root nodes")),
618 + OPT_BOOL(0, "cache", &keep_cache_objects, N_("make index objects head nodes")),
619 + OPT_BOOL(0, "reflogs", &include_reflogs, N_("make reflogs head nodes (default)")),
620 + OPT_BOOL(0, "full", &check_full, N_("also consider packs and alternate objects")),
621 + OPT_BOOL(0, "strict", &check_strict, N_("enable more strict checking")),
622 + OPT_BOOL(0, "lost-found", &write_lost_and_found,
623 N_("write dangling objects in .git/lost-found")),
624 OPT_BOOL(0, "progress", &show_progress, N_("show progress")),
625 OPT_END(),
builtin/gc.c
+2 -2
@@ -178,8 +178,8 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
178 { OPTION_STRING, 0, "prune", &prune_expire, N_("date"),
179 N_("prune unreferenced objects"),
180 PARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire },
181 - OPT_BOOLEAN(0, "aggressive", &aggressive, N_("be more thorough (increased runtime)")),
182 - OPT_BOOLEAN(0, "auto", &auto_gc, N_("enable auto-gc mode")),
181 + OPT_BOOL(0, "aggressive", &aggressive, N_("be more thorough (increased runtime)")),
182 + OPT_BOOL(0, "auto", &auto_gc, N_("enable auto-gc mode")),
183 OPT_END()
184 };
185
builtin/grep.c
+19 -19
@@ -638,20 +638,20 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
638 int pattern_type_arg = GREP_PATTERN_TYPE_UNSPECIFIED;
639
640 struct option options[] = {
641 - OPT_BOOLEAN(0, "cached", &cached,
641 + OPT_BOOL(0, "cached", &cached,
642 N_("search in index instead of in the work tree")),
643 OPT_NEGBIT(0, "no-index", &use_index,
644 N_("find in contents not managed by git"), 1),
645 - OPT_BOOLEAN(0, "untracked", &untracked,
645 + OPT_BOOL(0, "untracked", &untracked,
646 N_("search in both tracked and untracked files")),
647 OPT_SET_INT(0, "exclude-standard", &opt_exclude,
648 N_("search also in ignored files"), 1),
649 OPT_GROUP(""),
650 - OPT_BOOLEAN('v', "invert-match", &opt.invert,
650 + OPT_BOOL('v', "invert-match", &opt.invert,
651 N_("show non-matching lines")),
652 - OPT_BOOLEAN('i', "ignore-case", &opt.ignore_case,
652 + OPT_BOOL('i', "ignore-case", &opt.ignore_case,
653 N_("case insensitive matching")),
654 - OPT_BOOLEAN('w', "word-regexp", &opt.word_regexp,
654 + OPT_BOOL('w', "word-regexp", &opt.word_regexp,
655 N_("match patterns only at word boundaries")),
656 OPT_SET_INT('a', "text", &opt.binary,
657 N_("process binary files as text"), GREP_BINARY_TEXT),
@@ -675,26 +675,26 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
675 N_("use Perl-compatible regular expressions"),
676 GREP_PATTERN_TYPE_PCRE),
677 OPT_GROUP(""),
678 - OPT_BOOLEAN('n', "line-number", &opt.linenum, N_("show line numbers")),
678 + OPT_BOOL('n', "line-number", &opt.linenum, N_("show line numbers")),
679 OPT_NEGBIT('h', NULL, &opt.pathname, N_("don't show filenames"), 1),
680 OPT_BIT('H', NULL, &opt.pathname, N_("show filenames"), 1),
681 OPT_NEGBIT(0, "full-name", &opt.relative,
682 N_("show filenames relative to top directory"), 1),
683 - OPT_BOOLEAN('l', "files-with-matches", &opt.name_only,
683 + OPT_BOOL('l', "files-with-matches", &opt.name_only,
684 N_("show only filenames instead of matching lines")),
685 - OPT_BOOLEAN(0, "name-only", &opt.name_only,
685 + OPT_BOOL(0, "name-only", &opt.name_only,
686 N_("synonym for --files-with-matches")),
687 - OPT_BOOLEAN('L', "files-without-match",
687 + OPT_BOOL('L', "files-without-match",
688 &opt.unmatch_name_only,
689 N_("show only the names of files without match")),
690 - OPT_BOOLEAN('z', "null", &opt.null_following_name,
690 + OPT_BOOL('z', "null", &opt.null_following_name,
691 N_("print NUL after filenames")),
692 - OPT_BOOLEAN('c', "count", &opt.count,
692 + OPT_BOOL('c', "count", &opt.count,
693 N_("show the number of matches instead of matching lines")),
694 OPT__COLOR(&opt.color, N_("highlight matches")),
695 - OPT_BOOLEAN(0, "break", &opt.file_break,
695 + OPT_BOOL(0, "break", &opt.file_break,
696 N_("print empty line between matches from different files")),
697 - OPT_BOOLEAN(0, "heading", &opt.heading,
697 + OPT_BOOL(0, "heading", &opt.heading,
698 N_("show filename only once above matches from same file")),
699 OPT_GROUP(""),
700 OPT_CALLBACK('C', "context", &opt, N_("n"),
@@ -706,9 +706,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
706 N_("show <n> context lines after matches")),
707 OPT_NUMBER_CALLBACK(&opt, N_("shortcut for -C NUM"),
708 context_callback),
709 - OPT_BOOLEAN('p', "show-function", &opt.funcname,
709 + OPT_BOOL('p', "show-function", &opt.funcname,
710 N_("show a line with the function name before matches")),
711 - OPT_BOOLEAN('W', "function-context", &opt.funcbody,
711 + OPT_BOOL('W', "function-context", &opt.funcbody,
712 N_("show the surrounding function")),
713 OPT_GROUP(""),
714 OPT_CALLBACK('f', NULL, &opt, N_("file"),
@@ -718,7 +718,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
718 { OPTION_CALLBACK, 0, "and", &opt, NULL,
719 N_("combine patterns specified with -e"),
720 PARSE_OPT_NOARG | PARSE_OPT_NONEG, and_callback },
721 - OPT_BOOLEAN(0, "or", &dummy, ""),
721 + OPT_BOOL(0, "or", &dummy, ""),
722 { OPTION_CALLBACK, 0, "not", &opt, NULL, "",
723 PARSE_OPT_NOARG | PARSE_OPT_NONEG, not_callback },
724 { OPTION_CALLBACK, '(', NULL, &opt, NULL, "",
@@ -729,7 +729,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
729 close_callback },
730 OPT__QUIET(&opt.status_only,
731 N_("indicate hit with exit status without output")),
732 - OPT_BOOLEAN(0, "all-match", &opt.all_match,
732 + OPT_BOOL(0, "all-match", &opt.all_match,
733 N_("show only matches from files that match all patterns")),
734 { OPTION_SET_INT, 0, "debug", &opt.debug, NULL,
735 N_("show parse tree for grep expression"),
@@ -738,8 +738,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
738 { OPTION_STRING, 'O', "open-files-in-pager", &show_in_pager,
739 N_("pager"), N_("show matching files in the pager"),
740 PARSE_OPT_OPTARG, NULL, (intptr_t)default_pager },
741 - OPT_BOOLEAN(0, "ext-grep", &external_grep_allowed__ignored,
742 - N_("allow calling of grep(1) (ignored by this build)")),
741 + OPT_BOOL(0, "ext-grep", &external_grep_allowed__ignored,
742 + N_("allow calling of grep(1) (ignored by this build)")),
743 { OPTION_CALLBACK, 0, "help-all", &options, NULL, N_("show usage"),
744 PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, help_callback },
745 OPT_END()
builtin/hash-object.c
+3 -3
@@ -70,10 +70,10 @@ static const char *vpath;
70
71 static const struct option hash_object_options[] = {
72 OPT_STRING('t', NULL, &type, N_("type"), N_("object type")),
73 - OPT_BOOLEAN('w', NULL, &write_object, N_("write the object into the object database")),
73 + OPT_BOOL('w', NULL, &write_object, N_("write the object into the object database")),
74 OPT_BOOLEAN( 0 , "stdin", &hashstdin, N_("read the object from stdin")),
75 - OPT_BOOLEAN( 0 , "stdin-paths", &stdin_paths, N_("read file names from stdin")),
76 - OPT_BOOLEAN( 0 , "no-filters", &no_filters, N_("store file as is without filters")),
75 + OPT_BOOL( 0 , "stdin-paths", &stdin_paths, N_("read file names from stdin")),
76 + OPT_BOOL( 0 , "no-filters", &no_filters, N_("store file as is without filters")),
77 OPT_STRING( 0 , "path", &vpath, N_("file"), N_("process file as it were from this path")),
78 OPT_END()
79 };
builtin/log.c
+4 -4
@@ -1179,10 +1179,10 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
1179 { OPTION_CALLBACK, 'k', "keep-subject", &rev, NULL,
1180 N_("don't strip/add [PATCH]"),
1181 PARSE_OPT_NOARG | PARSE_OPT_NONEG, keep_callback },
1182 - OPT_BOOLEAN(0, "no-binary", &no_binary_diff,
1183 - N_("don't output binary diffs")),
1184 - OPT_BOOLEAN(0, "ignore-if-in-upstream", &ignore_if_in_upstream,
1185 - N_("don't include a patch matching a commit upstream")),
1182 + OPT_BOOL(0, "no-binary", &no_binary_diff,
1183 + N_("don't output binary diffs")),
1184 + OPT_BOOL(0, "ignore-if-in-upstream", &ignore_if_in_upstream,
1185 + N_("don't include a patch matching a commit upstream")),
1186 { OPTION_SET_INT, 'p', "no-stat", &use_patch_format, NULL,
1187 N_("show patch format instead of default (patch + stat)"),
1188 PARSE_OPT_NONEG | PARSE_OPT_NOARG, NULL, 1},
builtin/ls-files.c
+12 -12
@@ -461,24 +461,24 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)
461 { OPTION_CALLBACK, 'z', NULL, NULL, NULL,
462 N_("paths are separated with NUL character"),
463 PARSE_OPT_NOARG, option_parse_z },
464 - OPT_BOOLEAN('t', NULL, &show_tag,
464 + OPT_BOOL('t', NULL, &show_tag,
465 N_("identify the file status with tags")),
466 - OPT_BOOLEAN('v', NULL, &show_valid_bit,
466 + OPT_BOOL('v', NULL, &show_valid_bit,
467 N_("use lowercase letters for 'assume unchanged' files")),
468 - OPT_BOOLEAN('c', "cached", &show_cached,
468 + OPT_BOOL('c', "cached", &show_cached,
469 N_("show cached files in the output (default)")),
470 - OPT_BOOLEAN('d', "deleted", &show_deleted,
470 + OPT_BOOL('d', "deleted", &show_deleted,
471 N_("show deleted files in the output")),
472 - OPT_BOOLEAN('m', "modified", &show_modified,
472 + OPT_BOOL('m', "modified", &show_modified,
473 N_("show modified files in the output")),
474 - OPT_BOOLEAN('o', "others", &show_others,
474 + OPT_BOOL('o', "others", &show_others,
475 N_("show other files in the output")),
476 OPT_BIT('i', "ignored", &dir.flags,
477 N_("show ignored files in the output"),
478 DIR_SHOW_IGNORED),
479 - OPT_BOOLEAN('s', "stage", &show_stage,
479 + OPT_BOOL('s', "stage", &show_stage,
480 N_("show staged contents' object name in the output")),
481 - OPT_BOOLEAN('k', "killed", &show_killed,
481 + OPT_BOOL('k', "killed", &show_killed,
482 N_("show files on the filesystem that need to be removed")),
483 OPT_BIT(0, "directory", &dir.flags,
484 N_("show 'other' directories' name only"),
@@ -486,9 +486,9 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)
486 OPT_NEGBIT(0, "empty-directory", &dir.flags,
487 N_("don't show empty directories"),
488 DIR_HIDE_EMPTY_DIRECTORIES),
489 - OPT_BOOLEAN('u', "unmerged", &show_unmerged,
489 + OPT_BOOL('u', "unmerged", &show_unmerged,
490 N_("show unmerged files in the output")),
491 - OPT_BOOLEAN(0, "resolve-undo", &show_resolve_undo,
491 + OPT_BOOL(0, "resolve-undo", &show_resolve_undo,
492 N_("show resolve-undo information")),
493 { OPTION_CALLBACK, 'x', "exclude", &exclude_list, N_("pattern"),
494 N_("skip files matching pattern"),
@@ -504,12 +504,12 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)
504 { OPTION_SET_INT, 0, "full-name", &prefix_len, NULL,
505 N_("make the output relative to the project top directory"),
506 PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL },
507 - OPT_BOOLEAN(0, "error-unmatch", &error_unmatch,
507 + OPT_BOOL(0, "error-unmatch", &error_unmatch,
508 N_("if any <file> is not in the index, treat this as an error")),
509 OPT_STRING(0, "with-tree", &with_tree, N_("tree-ish"),
510 N_("pretend that paths removed since <tree-ish> are still present")),
511 OPT__ABBREV(&abbrev),
512 - OPT_BOOLEAN(0, "debug", &debug_mode, N_("show debugging data")),
512 + OPT_BOOL(0, "debug", &debug_mode, N_("show debugging data")),
513 OPT_END()
514 };
515
builtin/ls-tree.c
+3 -3
@@ -138,9 +138,9 @@ int cmd_ls_tree(int argc, const char **argv, const char *prefix)
138 LS_NAME_ONLY),
139 OPT_SET_INT(0, "full-name", &chomp_prefix,
140 N_("use full path names"), 0),
141 - OPT_BOOLEAN(0, "full-tree", &full_tree,
142 - N_("list entire tree; not just current directory "
143 - "(implies --full-name)")),
141 + OPT_BOOL(0, "full-tree", &full_tree,
142 + N_("list entire tree; not just current directory "
143 + "(implies --full-name)")),
144 OPT__ABBREV(&abbrev),
145 OPT_END()
146 };
builtin/merge-base.c
+5 -5
@@ -95,11 +95,11 @@ int cmd_merge_base(int argc, const char **argv, const char *prefix)
95 int is_ancestor = 0;
96
97 struct option options[] = {
98 - OPT_BOOLEAN('a', "all", &show_all, N_("output all common ancestors")),
99 - OPT_BOOLEAN(0, "octopus", &octopus, N_("find ancestors for a single n-way merge")),
100 - OPT_BOOLEAN(0, "independent", &reduce, N_("list revs not reachable from others")),
101 - OPT_BOOLEAN(0, "is-ancestor", &is_ancestor,
102 - N_("is the first one ancestor of the other?")),
98 + OPT_BOOL('a', "all", &show_all, N_("output all common ancestors")),
99 + OPT_BOOL(0, "octopus", &octopus, N_("find ancestors for a single n-way merge")),
100 + OPT_BOOL(0, "independent", &reduce, N_("list revs not reachable from others")),
101 + OPT_BOOL(0, "is-ancestor", &is_ancestor,
102 + N_("is the first one ancestor of the other?")),
103 OPT_END()
104 };
105
builtin/merge-file.c
+1 -1
@@ -30,7 +30,7 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
30 int quiet = 0;
31 int prefixlen = 0;
32 struct option options[] = {
33 - OPT_BOOLEAN('p', "stdout", &to_stdout, N_("send results to standard output")),
33 + OPT_BOOL('p', "stdout", &to_stdout, N_("send results to standard output")),
34 OPT_SET_INT(0, "diff3", &xmp.style, N_("use a diff3 based merge"), XDL_MERGE_DIFF3),
35 OPT_SET_INT(0, "ours", &xmp.favor, N_("for conflicts, use our version"),
36 XDL_MERGE_FAVOR_OURS),
builtin/merge.c
+6 -6
@@ -197,15 +197,15 @@ static struct option builtin_merge_options[] = {
197 { OPTION_CALLBACK, 'n', NULL, NULL, NULL,
198 N_("do not show a diffstat at the end of the merge"),
199 PARSE_OPT_NOARG, option_parse_n },
200 - OPT_BOOLEAN(0, "stat", &show_diffstat,
200 + OPT_BOOL(0, "stat", &show_diffstat,
201 N_("show a diffstat at the end of the merge")),
202 - OPT_BOOLEAN(0, "summary", &show_diffstat, N_("(synonym to --stat)")),
202 + OPT_BOOL(0, "summary", &show_diffstat, N_("(synonym to --stat)")),
203 { OPTION_INTEGER, 0, "log", &shortlog_len, N_("n"),
204 N_("add (at most <n>) entries from shortlog to merge commit message"),
205 PARSE_OPT_OPTARG, NULL, DEFAULT_MERGE_LOG_LEN },
206 - OPT_BOOLEAN(0, "squash", &squash,
206 + OPT_BOOL(0, "squash", &squash,
207 N_("create a single commit instead of doing a merge")),
208 - OPT_BOOLEAN(0, "commit", &option_commit,
208 + OPT_BOOL(0, "commit", &option_commit,
209 N_("perform a commit if the merge succeeds (default)")),
210 OPT_BOOL('e', "edit", &option_edit,
211 N_("edit message before committing")),
@@ -224,12 +224,12 @@ static struct option builtin_merge_options[] = {
224 N_("merge commit message (for a non-fast-forward merge)"),
225 option_parse_message),
226 OPT__VERBOSITY(&verbosity),
227 - OPT_BOOLEAN(0, "abort", &abort_current_merge,
227 + OPT_BOOL(0, "abort", &abort_current_merge,
228 N_("abort the current in-progress merge")),
229 OPT_SET_INT(0, "progress", &show_progress, N_("force progress reporting"), 1),
230 { OPTION_STRING, 'S', "gpg-sign", &sign_commit, N_("key id"),
231 N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
232 - OPT_BOOLEAN(0, "overwrite-ignore", &overwrite_ignore, N_("update ignored files (default)")),
232 + OPT_BOOL(0, "overwrite-ignore", &overwrite_ignore, N_("update ignored files (default)")),
233 OPT_END()
234 };
235
builtin/mv.c
+1 -1
@@ -62,7 +62,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
62 OPT__VERBOSE(&verbose, N_("be verbose")),
63 OPT__DRY_RUN(&show_only, N_("dry run")),
64 OPT__FORCE(&force, N_("force move/rename even if target exists")),
65 - OPT_BOOLEAN('k', NULL, &ignore_errors, N_("skip move/rename errors")),
65 + OPT_BOOL('k', NULL, &ignore_errors, N_("skip move/rename errors")),
66 OPT_END(),
67 };
68 const char **source, **destination, **dest_path;
builtin/name-rev.c
+6 -6
@@ -310,15 +310,15 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
310 int all = 0, transform_stdin = 0, allow_undefined = 1, always = 0, peel_tag = 0;
311 struct name_ref_data data = { 0, 0, NULL };
312 struct option opts[] = {
313 - OPT_BOOLEAN(0, "name-only", &data.name_only, N_("print only names (no SHA-1)")),
314 - OPT_BOOLEAN(0, "tags", &data.tags_only, N_("only use tags to name the commits")),
313 + OPT_BOOL(0, "name-only", &data.name_only, N_("print only names (no SHA-1)")),
314 + OPT_BOOL(0, "tags", &data.tags_only, N_("only use tags to name the commits")),
315 OPT_STRING(0, "refs", &data.ref_filter, N_("pattern"),
316 N_("only use refs matching <pattern>")),
317 OPT_GROUP(""),
318 - OPT_BOOLEAN(0, "all", &all, N_("list all commits reachable from all refs")),
319 - OPT_BOOLEAN(0, "stdin", &transform_stdin, N_("read from stdin")),
320 - OPT_BOOLEAN(0, "undefined", &allow_undefined, N_("allow to print `undefined` names")),
321 - OPT_BOOLEAN(0, "always", &always,
318 + OPT_BOOL(0, "all", &all, N_("list all commits reachable from all refs")),
319 + OPT_BOOL(0, "stdin", &transform_stdin, N_("read from stdin")),
320 + OPT_BOOL(0, "undefined", &allow_undefined, N_("allow to print `undefined` names (default)")),
321 + OPT_BOOL(0, "always", &always,
322 N_("show abbreviated commit object as fallback")),
323 {
324 /* A Hidden OPT_BOOL */
builtin/notes.c
+2 -2
@@ -483,7 +483,7 @@ static int copy(int argc, const char **argv, const char *prefix)
483 const char *rewrite_cmd = NULL;
484 struct option options[] = {
485 OPT__FORCE(&force, N_("replace existing notes")),
486 - OPT_BOOLEAN(0, "stdin", &from_stdin, N_("read objects from stdin")),
486 + OPT_BOOL(0, "stdin", &from_stdin, N_("read objects from stdin")),
487 OPT_STRING(0, "for-rewrite", &rewrite_cmd, N_("command"),
488 N_("load rewriting config for <command> (implies "
489 "--stdin)")),
@@ -853,7 +853,7 @@ static int remove_cmd(int argc, const char **argv, const char *prefix)
853 OPT_BIT(0, "ignore-missing", &flag,
854 N_("attempt to remove non-existent note is not an error"),
855 IGNORE_MISSING),
856 - OPT_BOOLEAN(0, "stdin", &from_stdin,
856 + OPT_BOOL(0, "stdin", &from_stdin,
857 N_("read object names from the standard input")),
858 OPT_END()
859 };
builtin/push.c
+3 -3
@@ -446,15 +446,15 @@ int cmd_push(int argc, const char **argv, const char *prefix)
446 OPT_BIT( 0 , "all", &flags, N_("push all refs"), TRANSPORT_PUSH_ALL),
447 OPT_BIT( 0 , "mirror", &flags, N_("mirror all refs"),
448 (TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE)),
449 - OPT_BOOLEAN( 0, "delete", &deleterefs, N_("delete refs")),
450 - OPT_BOOLEAN( 0 , "tags", &tags, N_("push tags (can't be used with --all or --mirror)")),
449 + OPT_BOOL( 0, "delete", &deleterefs, N_("delete refs")),
450 + OPT_BOOL( 0 , "tags", &tags, N_("push tags (can't be used with --all or --mirror)")),
451 OPT_BIT('n' , "dry-run", &flags, N_("dry run"), TRANSPORT_PUSH_DRY_RUN),
452 OPT_BIT( 0, "porcelain", &flags, N_("machine-readable output"), TRANSPORT_PUSH_PORCELAIN),
453 OPT_BIT('f', "force", &flags, N_("force updates"), TRANSPORT_PUSH_FORCE),
454 { OPTION_CALLBACK, 0, "recurse-submodules", &flags, N_("check"),
455 N_("control recursive pushing of submodules"),
456 PARSE_OPT_OPTARG, option_parse_recurse_submodules },
457 - OPT_BOOLEAN( 0 , "thin", &thin, N_("use thin pack")),
457 + OPT_BOOL( 0 , "thin", &thin, N_("use thin pack")),
458 OPT_STRING( 0 , "receive-pack", &receivepack, "receive-pack", N_("receive pack program")),
459 OPT_STRING( 0 , "exec", &receivepack, "receive-pack", N_("receive pack program")),
460 OPT_BIT('u', "set-upstream", &flags, N_("set upstream for git pull/status"),
builtin/remote.c
+14 -14
@@ -160,7 +160,7 @@ static int add(int argc, const char **argv)
160 int i;
161
162 struct option options[] = {
163 - OPT_BOOLEAN('f', "fetch", &fetch, N_("fetch the remote branches")),
163 + OPT_BOOL('f', "fetch", &fetch, N_("fetch the remote branches")),
164 OPT_SET_INT(0, "tags", &fetch_tags,
165 N_("import all tags and associated objects when fetching"),
166 TAGS_SET),
@@ -1088,7 +1088,7 @@ static int show(int argc, const char **argv)
1088 {
1089 int no_query = 0, result = 0, query_flag = 0;
1090 struct option options[] = {
1091 - OPT_BOOLEAN('n', NULL, &no_query, N_("do not query remotes")),
1091 + OPT_BOOL('n', NULL, &no_query, N_("do not query remotes")),
1092 OPT_END()
1093 };
1094 struct ref_states states;
@@ -1195,10 +1195,10 @@ static int set_head(int argc, const char **argv)
1195 char *head_name = NULL;
1196
1197 struct option options[] = {
1198 - OPT_BOOLEAN('a', "auto", &opt_a,
1199 - N_("set refs/remotes/<name>/HEAD according to remote")),
1200 - OPT_BOOLEAN('d', "delete", &opt_d,
1201 - N_("delete refs/remotes/<name>/HEAD")),
1198 + OPT_BOOL('a', "auto", &opt_a,
1199 + N_("set refs/remotes/<name>/HEAD according to remote")),
1200 + OPT_BOOL('d', "delete", &opt_d,
1201 + N_("delete refs/remotes/<name>/HEAD")),
1202 OPT_END()
1203 };
1204 argc = parse_options(argc, argv, NULL, options, builtin_remote_sethead_usage,
@@ -1317,8 +1317,8 @@ static int update(int argc, const char **argv)
1317 {
1318 int i, prune = 0;
1319 struct option options[] = {
1320 - OPT_BOOLEAN('p', "prune", &prune,
1321 - N_("prune remotes after fetching")),
1320 + OPT_BOOL('p', "prune", &prune,
1321 + N_("prune remotes after fetching")),
1322 OPT_END()
1323 };
1324 const char **fetch_argv;
@@ -1404,7 +1404,7 @@ static int set_branches(int argc, const char **argv)
1404 {
1405 int add_mode = 0;
1406 struct option options[] = {
1407 - OPT_BOOLEAN('\0', "add", &add_mode, N_("add branch")),
1407 + OPT_BOOL('\0', "add", &add_mode, N_("add branch")),
1408 OPT_END()
1409 };
1410
@@ -1432,11 +1432,11 @@ static int set_url(int argc, const char **argv)
1432 int urlset_nr;
1433 struct strbuf name_buf = STRBUF_INIT;
1434 struct option options[] = {
1435 - OPT_BOOLEAN('\0', "push", &push_mode,
1436 - N_("manipulate push URLs")),
1437 - OPT_BOOLEAN('\0', "add", &add_mode,
1438 - N_("add URL")),
1439 - OPT_BOOLEAN('\0', "delete", &delete_mode,
1435 + OPT_BOOL('\0', "push", &push_mode,
1436 + N_("manipulate push URLs")),
1437 + OPT_BOOL('\0', "add", &add_mode,
1438 + N_("add URL")),
1439 + OPT_BOOL('\0', "delete", &delete_mode,
1440 N_("delete URLs")),
1441 OPT_END()
1442 };
builtin/replace.c
+3 -3
@@ -118,9 +118,9 @@ int cmd_replace(int argc, const char **argv, const char *prefix)
118 {
119 int list = 0, delete = 0, force = 0;
120 struct option options[] = {
121 - OPT_BOOLEAN('l', NULL, &list, N_("list replace refs")),
122 - OPT_BOOLEAN('d', NULL, &delete, N_("delete replace refs")),
123 - OPT_BOOLEAN('f', NULL, &force, N_("replace the ref if it exists")),
121 + OPT_BOOL('l', NULL, &list, N_("list replace refs")),
122 + OPT_BOOL('d', NULL, &delete, N_("delete replace refs")),
123 + OPT_BOOL('f', NULL, &force, N_("replace the ref if it exists")),
124 OPT_END()
125 };
126
builtin/reset.c
+1 -1
@@ -258,7 +258,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
258 N_("reset HEAD, index and working tree"), MERGE),
259 OPT_SET_INT(0, "keep", &reset_type,
260 N_("reset HEAD but keep local changes"), KEEP),
261 - OPT_BOOLEAN('p', "patch", &patch_mode, N_("select hunks interactively")),
261 + OPT_BOOL('p', "patch", &patch_mode, N_("select hunks interactively")),
262 OPT_END()
263 };
264
builtin/rev-parse.c
+2 -2
@@ -346,9 +346,9 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix)
346 NULL
347 };
348 static struct option parseopt_opts[] = {
349 - OPT_BOOLEAN(0, "keep-dashdash", &keep_dashdash,
349 + OPT_BOOL(0, "keep-dashdash", &keep_dashdash,
350 N_("keep the `--` passed as an arg")),
351 - OPT_BOOLEAN(0, "stop-at-non-option", &stop_at_non_option,
351 + OPT_BOOL(0, "stop-at-non-option", &stop_at_non_option,
352 N_("stop parsing after the "
353 "first non-option argument")),
354 OPT_END(),
builtin/rm.c
+3 -3
@@ -268,10 +268,10 @@ static int ignore_unmatch = 0;
268 static struct option builtin_rm_options[] = {
269 OPT__DRY_RUN(&show_only, N_("dry run")),
270 OPT__QUIET(&quiet, N_("do not list removed files")),
271 - OPT_BOOLEAN( 0 , "cached", &index_only, N_("only remove from the index")),
271 + OPT_BOOL( 0 , "cached", &index_only, N_("only remove from the index")),
272 OPT__FORCE(&force, N_("override the up-to-date check")),
273 - OPT_BOOLEAN('r', NULL, &recursive, N_("allow recursive removal")),
274 - OPT_BOOLEAN( 0 , "ignore-unmatch", &ignore_unmatch,
273 + OPT_BOOL('r', NULL, &recursive, N_("allow recursive removal")),
274 + OPT_BOOL( 0 , "ignore-unmatch", &ignore_unmatch,
275 N_("exit with a zero status even if nothing matched")),
276 OPT_END(),
277 };
builtin/shortlog.c
+6 -6
@@ -224,12 +224,12 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix)
224 int nongit = !startup_info->have_repository;
225
226 static const struct option options[] = {
227 - OPT_BOOLEAN('n', "numbered", &log.sort_by_number,
228 - N_("sort output according to the number of commits per author")),
229 - OPT_BOOLEAN('s', "summary", &log.summary,
230 - N_("Suppress commit descriptions, only provides commit count")),
231 - OPT_BOOLEAN('e', "email", &log.email,
232 - N_("Show the email address of each author")),
227 + OPT_BOOL('n', "numbered", &log.sort_by_number,
228 + N_("sort output according to the number of commits per author")),
229 + OPT_BOOL('s', "summary", &log.summary,
230 + N_("Suppress commit descriptions, only provides commit count")),
231 + OPT_BOOL('e', "email", &log.email,
232 + N_("Show the email address of each author")),
233 { OPTION_CALLBACK, 'w', NULL, &log, N_("w[,i1[,i2]]"),
234 N_("Linewrap output"), PARSE_OPT_OPTARG, &parse_wrap_args },
235 OPT_END(),
builtin/show-branch.c
+14 -14
@@ -646,30 +646,30 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
646 int dense = 1;
647 const char *reflog_base = NULL;
648 struct option builtin_show_branch_options[] = {
649 - OPT_BOOLEAN('a', "all", &all_heads,
650 - N_("show remote-tracking and local branches")),
651 - OPT_BOOLEAN('r', "remotes", &all_remotes,
652 - N_("show remote-tracking branches")),
649 + OPT_BOOL('a', "all", &all_heads,
650 + N_("show remote-tracking and local branches")),
651 + OPT_BOOL('r', "remotes", &all_remotes,
652 + N_("show remote-tracking branches")),
653 OPT__COLOR(&showbranch_use_color,
654 N_("color '*!+-' corresponding to the branch")),
655 { OPTION_INTEGER, 0, "more", &extra, N_("n"),
656 N_("show <n> more commits after the common ancestor"),
657 PARSE_OPT_OPTARG, NULL, (intptr_t)1 },
658 OPT_SET_INT(0, "list", &extra, N_("synonym to more=-1"), -1),
659 - OPT_BOOLEAN(0, "no-name", &no_name, N_("suppress naming strings")),
660 - OPT_BOOLEAN(0, "current", &with_current_branch,
661 - N_("include the current branch")),
662 - OPT_BOOLEAN(0, "sha1-name", &sha1_name,
663 - N_("name commits with their object names")),
664 - OPT_BOOLEAN(0, "merge-base", &merge_base,
665 - N_("show possible merge bases")),
666 - OPT_BOOLEAN(0, "independent", &independent,
659 + OPT_BOOL(0, "no-name", &no_name, N_("suppress naming strings")),
660 + OPT_BOOL(0, "current", &with_current_branch,
661 + N_("include the current branch")),
662 + OPT_BOOL(0, "sha1-name", &sha1_name,
663 + N_("name commits with their object names")),
664 + OPT_BOOL(0, "merge-base", &merge_base,
665 + N_("show possible merge bases")),
666 + OPT_BOOL(0, "independent", &independent,
667 N_("show refs unreachable from any other ref")),
668 OPT_SET_INT(0, "topo-order", &sort_order,
669 N_("show commits in topological order"),
670 REV_SORT_IN_GRAPH_ORDER),
671 - OPT_BOOLEAN(0, "topics", &topics,
672 - N_("show only commits not on the first branch")),
671 + OPT_BOOL(0, "topics", &topics,
672 + N_("show only commits not on the first branch")),
673 OPT_SET_INT(0, "sparse", &dense,
674 N_("show merges reachable from only one tip"), 0),
675 OPT_SET_INT(0, "date-order", &sort_order,
builtin/show-ref.c
+5 -5
@@ -165,15 +165,15 @@ static int help_callback(const struct option *opt, const char *arg, int unset)
165 }
166
167 static const struct option show_ref_options[] = {
168 - OPT_BOOLEAN(0, "tags", &tags_only, N_("only show tags (can be combined with heads)")),
169 - OPT_BOOLEAN(0, "heads", &heads_only, N_("only show heads (can be combined with tags)")),
170 - OPT_BOOLEAN(0, "verify", &verify, N_("stricter reference checking, "
168 + OPT_BOOL(0, "tags", &tags_only, N_("only show tags (can be combined with heads)")),
169 + OPT_BOOL(0, "heads", &heads_only, N_("only show heads (can be combined with tags)")),
170 + OPT_BOOL(0, "verify", &verify, N_("stricter reference checking, "
171 "requires exact ref path")),
172 OPT_HIDDEN_BOOL('h', NULL, &show_head,
173 N_("show the HEAD reference, even if it would be filtered out")),
174 - OPT_BOOLEAN(0, "head", &show_head,
174 + OPT_BOOL(0, "head", &show_head,
175 N_("show the HEAD reference, even if it would be filtered out")),
176 - OPT_BOOLEAN('d', "dereference", &deref_tags,
176 + OPT_BOOL('d', "dereference", &deref_tags,
177 N_("dereference tags into object IDs")),
178 { OPTION_CALLBACK, 's', "hash", &abbrev, N_("n"),
179 N_("only show SHA1 hash using <n> digits"),
builtin/tag.c
+2 -2
@@ -450,12 +450,12 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
450 OPT_CMDMODE('v', "verify", &cmdmode, N_("verify tags"), 'v'),
451
452 OPT_GROUP(N_("Tag creation options")),
453 - OPT_BOOLEAN('a', "annotate", &annotate,
453 + OPT_BOOL('a', "annotate", &annotate,
454 N_("annotated tag, needs a message")),
455 OPT_CALLBACK('m', "message", &msg, N_("message"),
456 N_("tag message"), parse_msg_arg),
457 OPT_FILENAME('F', "file", &msgfile, N_("read message from file")),
458 - OPT_BOOLEAN('s', "sign", &opt.sign, N_("annotated and GPG-signed tag")),
458 + OPT_BOOL('s', "sign", &opt.sign, N_("annotated and GPG-signed tag")),
459 OPT_STRING(0, "cleanup", &cleanup_arg, N_("mode"),
460 N_("how to strip spaces and #comments from message")),
461 OPT_STRING('u', "local-user", &keyid, N_("key id"),
builtin/update-ref.c
+2 -2
@@ -16,8 +16,8 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)
16 int delete = 0, no_deref = 0, flags = 0;
17 struct option options[] = {
18 OPT_STRING( 'm', NULL, &msg, N_("reason"), N_("reason of the update")),
19 - OPT_BOOLEAN('d', NULL, &delete, N_("delete the reference")),
20 - OPT_BOOLEAN( 0 , "no-deref", &no_deref,
19 + OPT_BOOL('d', NULL, &delete, N_("delete the reference")),
20 + OPT_BOOL( 0 , "no-deref", &no_deref,
21 N_("update <refname> not the one it points to")),
22 OPT_END(),
23 };