{"thread":{"id":"34575","subject":"[PATCHv2 0/9] Removing deprecated parsing macros","startedAt":"2013-07-31T16:28:28Z","lastAt":"2013-07-31T17:21:48Z","messageCount":14,"participants":["Stefan Beller","Eric Sunshine"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"224351","messageId":"1375288117-1576-1-git-send-email-stefanbeller@googlemail.com","threadId":"34575","inReplyTo":null,"subject":"[PATCHv2 0/9] Removing deprecated parsing macros","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-07-31T16:28:28Z","receivedAt":"2013-07-31T16:28:28Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"I am rerolling \"Removing deprecated parsing macros\" series. \nNow with more patches! ;)\nThe patches apply on top of origin/jc/parseopt-command-modes\n\nWithin the builtin/ folder all occurrences of OPT_BOOLEAN have been removed.\nNow we only need to review the usage of it in parse-options as used in\nOPT__VERBOSE, OPT__QUIET, OPT__DRY_RUN and OPT__FORCE.\nMost likely we could just use OPT_SET_INT there and then OPT_BOOLEAN is \ngone.\n\nThe patch 1 and 2 are not intended to change any semantics,\nbut were the most work, because of the checking for each place not\nchanging the semantics.\n\nPatch 3 introduces -q the shortform of --quiet for log and format-patch \n\nPatch 4,5 are unspectacular, just improving readability.\n\nPatch 6 is indeed the only occurence, where I needed to use OPT_COUNTUP\nfor OPT_BOOLEAN. Personally I'd change it there as well, but it's plumbing.\n\nPatch 7 makes git config a little more flexible (allowing --global \nmultiple times).\n\nPatch 8 is a change in the plumbing layer, what I'd call a bugfix,\nnot urgent, but still.\n\nPatch 9 introduces the new OPT_CMDMODE to revert. Junio suggested to \nchange the OPT_CMDMODE a little and use the short parameter as the value\nassigned to the command variable. This patch shows, why it might not be a\ngood idea, as the options there do not have short parameters.\n\nStefan\n\nStefan Beller (9):\n  Remove deprecated OPTION_BOOLEAN for parsing arguments\n  Replace deprecated OPT_BOOLEAN by OPT_BOOL\n  log, format-patch: parsing uses OPT__QUIET\n  checkout: remove superfluous local variable\n  branch, commit, name-rev: ease up boolean conditions\n  hash-object: Replace stdin parsing OPT_BOOLEAN by OPT_COUNTUP\n  config: parsing options: config file flag multiple times\n  checkout-index: Fix negations of odd numbers of -n\n  revert: use the OPT_CMDMODE for parsing, reducing code\n\n builtin/apply.c          | 24 +++++++++----------\n builtin/bisect--helper.c |  8 +++----\n builtin/blame.c          |  8 +++----\n builtin/branch.c         | 13 +++++-----\n builtin/check-attr.c     |  8 +++----\n builtin/check-ignore.c   | 12 +++++-----\n builtin/checkout-index.c |  8 +++----\n builtin/checkout.c       | 27 ++++++++++-----------\n builtin/clean.c          |  6 ++---\n builtin/clone.c          | 23 +++++++++---------\n builtin/commit.c         | 48 ++++++++++++++++++-------------------\n builtin/config.c         |  8 +++----\n builtin/describe.c       | 20 ++++++++--------\n builtin/fast-export.c    | 10 ++++----\n builtin/fetch.c          | 24 +++++++++----------\n builtin/fsck.c           | 16 ++++++-------\n builtin/gc.c             |  4 ++--\n builtin/grep.c           | 38 ++++++++++++++---------------\n builtin/hash-object.c    |  8 +++----\n builtin/log.c            | 17 +++++++------\n builtin/ls-files.c       | 24 +++++++++----------\n builtin/ls-tree.c        |  6 ++---\n builtin/merge-base.c     | 10 ++++----\n builtin/merge-file.c     |  2 +-\n builtin/merge.c          | 12 +++++-----\n builtin/mv.c             |  2 +-\n builtin/name-rev.c       | 14 +++++------\n builtin/notes.c          | 12 +++++-----\n builtin/push.c           |  6 ++---\n builtin/remote.c         | 28 +++++++++++-----------\n builtin/replace.c        |  6 ++---\n builtin/reset.c          |  2 +-\n builtin/rev-parse.c      |  4 ++--\n builtin/revert.c         | 62 ++++++++++++------------------------------------\n builtin/rm.c             |  6 ++---\n builtin/shortlog.c       | 12 +++++-----\n builtin/show-branch.c    | 28 +++++++++++-----------\n builtin/show-ref.c       | 15 ++++++------\n builtin/tag.c            |  4 ++--\n builtin/update-ref.c     |  4 ++--\n parse-options.h          |  5 ++--\n 41 files changed, 277 insertions(+), 317 deletions(-)\n\n-- \n1.8.4.rc0.1.g8f6a3e5\n"},{"id":"224352","messageId":"1375288117-1576-2-git-send-email-stefanbeller@googlemail.com","threadId":"34575","inReplyTo":"1375288117-1576-1-git-send-email-stefanbeller@googlemail.com","subject":"[PATCHv2 1/9] Remove deprecated OPTION_BOOLEAN for parsing arguments","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-07-31T16:28:29Z","receivedAt":"2013-07-31T16:28:29Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"As of b04ba2bb4 OPTION_BOOLEAN was deprecated.\nThis commit removes all occurrences of OPTION_BOOLEAN.\nIn b04ba2bb4 Junio suggested to replace it with either\nOPTION_SET_INT or OPTION_COUNTUP instead. However a pattern, which\noccurred often with the OPTION_BOOLEAN was a hidden boolean parameter.\nSo I defined OPT_HIDDEN_BOOL as an additional possible parse option\nin parse-options.h to make life easy.\n\nThe OPT_HIDDEN_BOOL was used in checkout, clone, commit, show-ref.\nThe only exception, where there was need to fiddle with OPTION_SET_INT\nwas log and notes. However in these two files there is also a pattern,\nso we could think of introducing OPT_NONEG_BOOL.\n\nSigned-off-by: Stefan Beller <stefanbeller@googlemail.com>\n---\n builtin/checkout.c |  5 ++---\n builtin/clone.c    |  7 +++----\n builtin/commit.c   | 10 ++++------\n builtin/log.c      |  4 ++--\n builtin/notes.c    |  8 ++++----\n builtin/show-ref.c |  5 ++---\n parse-options.h    |  5 ++---\n 7 files changed, 19 insertions(+), 25 deletions(-)\n\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex 7025938..646a475 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -1073,9 +1073,8 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \t\tOPT_BOOLEAN('p', \"patch\", &opts.patch_mode, N_(\"select hunks interactively\")),\n \t\tOPT_BOOL(0, \"ignore-skip-worktree-bits\", &opts.ignore_skipworktree,\n \t\t\t N_(\"do not limit pathspecs to sparse entries only\")),\n-\t\t{ OPTION_BOOLEAN, 0, \"guess\", &dwim_new_local_branch, NULL,\n-\t\t  N_(\"second guess 'git checkout no-such-branch'\"),\n-\t\t  PARSE_OPT_NOARG | PARSE_OPT_HIDDEN },\n+\t\tOPT_HIDDEN_BOOL(0, \"guess\", &dwim_new_local_branch,\n+\t\t\t\tN_(\"second guess 'git checkout no-such-branch'\")),\n \t\tOPT_END(),\n \t};\n \ndiff --git a/builtin/clone.c b/builtin/clone.c\nindex 430307b..e7b0b13 100644\n--- a/builtin/clone.c\n+++ b/builtin/clone.c\n@@ -64,10 +64,9 @@ static struct option builtin_clone_options[] = {\n \t\t N_(\"force progress reporting\")),\n \tOPT_BOOLEAN('n', \"no-checkout\", &option_no_checkout,\n \t\t    N_(\"don't create a checkout\")),\n-\tOPT_BOOLEAN(0, \"bare\", &option_bare, N_(\"create a bare repository\")),\n-\t{ OPTION_BOOLEAN, 0, \"naked\", &option_bare, NULL,\n-\t\tN_(\"create a bare repository\"),\n-\t\tPARSE_OPT_NOARG | PARSE_OPT_HIDDEN },\n+\tOPT_BOOL(0, \"bare\", &option_bare, N_(\"create a bare repository\")),\n+\tOPT_HIDDEN_BOOL(0, \"naked\", &option_bare,\n+\t\t\tN_(\"create a bare repository\")),\n \tOPT_BOOLEAN(0, \"mirror\", &option_mirror,\n \t\t    N_(\"create a mirror repository (implies bare)\")),\n \tOPT_BOOL('l', \"local\", &option_local,\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex 003bd7d..b64a083 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -1448,12 +1448,10 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \t\t{ 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\" },\n \t\t/* end commit contents options */\n \n-\t\t{ OPTION_BOOLEAN, 0, \"allow-empty\", &allow_empty, NULL,\n-\t\t  N_(\"ok to record an empty change\"),\n-\t\t  PARSE_OPT_NOARG | PARSE_OPT_HIDDEN },\n-\t\t{ OPTION_BOOLEAN, 0, \"allow-empty-message\", &allow_empty_message, NULL,\n-\t\t  N_(\"ok to record a change with an empty message\"),\n-\t\t  PARSE_OPT_NOARG | PARSE_OPT_HIDDEN },\n+\t\tOPT_HIDDEN_BOOL(0, \"allow-empty\", &allow_empty,\n+\t\t\t\tN_(\"ok to record an empty change\")),\n+\t\tOPT_HIDDEN_BOOL(0, \"allow-empty-message\", &allow_empty_message,\n+\t\t\t\tN_(\"ok to record a change with an empty message\")),\n \n \t\tOPT_END()\n \t};\ndiff --git a/builtin/log.c b/builtin/log.c\nindex 2625f98..05e374d 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -1183,9 +1183,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t\t\t    N_(\"don't output binary diffs\")),\n \t\tOPT_BOOLEAN(0, \"ignore-if-in-upstream\", &ignore_if_in_upstream,\n \t\t\t    N_(\"don't include a patch matching a commit upstream\")),\n-\t\t{ OPTION_BOOLEAN, 'p', \"no-stat\", &use_patch_format, NULL,\n+\t\t{ OPTION_SET_INT, 'p', \"no-stat\", &use_patch_format, NULL,\n \t\t  N_(\"show patch format instead of default (patch + stat)\"),\n-\t\t  PARSE_OPT_NONEG | PARSE_OPT_NOARG },\n+\t\t  PARSE_OPT_NONEG | PARSE_OPT_NOARG, NULL, 1},\n \t\tOPT_GROUP(N_(\"Messaging\")),\n \t\t{ OPTION_CALLBACK, 0, \"add-header\", NULL, N_(\"header\"),\n \t\t\t    N_(\"add email header\"), 0, header_callback },\ndiff --git a/builtin/notes.c b/builtin/notes.c\nindex e4100c4..8f63cb2 100644\n--- a/builtin/notes.c\n+++ b/builtin/notes.c\n@@ -739,13 +739,13 @@ static int merge(int argc, const char **argv, const char *prefix)\n \t\t\t   N_(\"resolve notes conflicts using the given strategy \"\n \t\t\t      \"(manual/ours/theirs/union/cat_sort_uniq)\")),\n \t\tOPT_GROUP(N_(\"Committing unmerged notes\")),\n-\t\t{ OPTION_BOOLEAN, 0, \"commit\", &do_commit, NULL,\n+\t\t{ OPTION_SET_INT, 0, \"commit\", &do_commit, NULL,\n \t\t\tN_(\"finalize notes merge by committing unmerged notes\"),\n-\t\t\tPARSE_OPT_NOARG | PARSE_OPT_NONEG },\n+\t\t\tPARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, 1},\n \t\tOPT_GROUP(N_(\"Aborting notes merge resolution\")),\n-\t\t{ OPTION_BOOLEAN, 0, \"abort\", &do_abort, NULL,\n+\t\t{ OPTION_SET_INT, 0, \"abort\", &do_abort, NULL,\n \t\t\tN_(\"abort notes merge\"),\n-\t\t\tPARSE_OPT_NOARG | PARSE_OPT_NONEG },\n+\t\t\tPARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, 1},\n \t\tOPT_END()\n \t};\n \ndiff --git a/builtin/show-ref.c b/builtin/show-ref.c\nindex 87806ad..18680bb 100644\n--- a/builtin/show-ref.c\n+++ b/builtin/show-ref.c\n@@ -169,9 +169,8 @@ static const struct option show_ref_options[] = {\n \tOPT_BOOLEAN(0, \"heads\", &heads_only, N_(\"only show heads (can be combined with tags)\")),\n \tOPT_BOOLEAN(0, \"verify\", &verify, N_(\"stricter reference checking, \"\n \t\t    \"requires exact ref path\")),\n-\t{ OPTION_BOOLEAN, 'h', NULL, &show_head, NULL,\n-\t  N_(\"show the HEAD reference, even if it would be filtered out\"),\n-\t  PARSE_OPT_NOARG | PARSE_OPT_HIDDEN },\n+\tOPT_HIDDEN_BOOL('h', NULL, &show_head,\n+\t\t\tN_(\"show the HEAD reference, even if it would be filtered out\")),\n \tOPT_BOOLEAN(0, \"head\", &show_head,\n \t  N_(\"show the HEAD reference, even if it would be filtered out\")),\n \tOPT_BOOLEAN('d', \"dereference\", &deref_tags,\ndiff --git a/parse-options.h b/parse-options.h\nindex 2404e06..aeab9aa 100644\n--- a/parse-options.h\n+++ b/parse-options.h\n@@ -22,9 +22,6 @@ enum parse_opt_type {\n \tOPTION_FILENAME\n };\n \n-/* Deprecated synonym */\n-#define OPTION_BOOLEAN OPTION_COUNTUP\n-\n enum parse_opt_flags {\n \tPARSE_OPT_KEEP_DASHDASH = 1,\n \tPARSE_OPT_STOP_AT_NON_OPTION = 2,\n@@ -129,6 +126,8 @@ struct option {\n #define OPT_SET_INT(s, l, v, h, i)  { OPTION_SET_INT, (s), (l), (v), NULL, \\\n \t\t\t\t      (h), PARSE_OPT_NOARG, NULL, (i) }\n #define OPT_BOOL(s, l, v, h)        OPT_SET_INT(s, l, v, h, 1)\n+#define OPT_HIDDEN_BOOL(s, l, v, h) { OPTION_SET_INT, (s), (l), (v), NULL, \\\n+\t\t\t\t      (h), PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 1}\n #define OPT_SET_PTR(s, l, v, h, p)  { OPTION_SET_PTR, (s), (l), (v), NULL, \\\n \t\t\t\t      (h), PARSE_OPT_NOARG, NULL, (p) }\n #define OPT_CMDMODE(s, l, v, h, i) { OPTION_CMDMODE, (s), (l), (v), NULL, \\\n-- \n1.8.4.rc0.1.g8f6a3e5\n"},{"id":"224360","messageId":"1375288117-1576-3-git-send-email-stefanbeller@googlemail.com","threadId":"34575","inReplyTo":"1375288117-1576-1-git-send-email-stefanbeller@googlemail.com","subject":"[PATCHv2 2/9] Replace deprecated OPT_BOOLEAN by OPT_BOOL","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-07-31T16:28:30Z","receivedAt":"2013-07-31T16:28:30Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"This task emerged from b04ba2bb (parse-options: deprecate OPT_BOOLEAN,\n2011-09-27). All occurrences of the respective variables have\nbeen reviewed and none of them relied on the counting up mechanism,\nbut all of them were using the variable as a true boolean.\n\nThis patch does not change semantics of any command intentionally.\n\nSigned-off-by: Stefan Beller <stefanbeller@googlemail.com>\n---\n builtin/apply.c          | 24 ++++++++++++------------\n builtin/bisect--helper.c |  8 ++++----\n builtin/blame.c          |  8 ++++----\n builtin/branch.c         | 10 +++++-----\n builtin/check-attr.c     |  8 ++++----\n builtin/check-ignore.c   | 12 ++++++------\n builtin/checkout-index.c |  6 +++---\n builtin/checkout.c       | 10 +++++-----\n builtin/clean.c          |  6 +++---\n builtin/clone.c          | 16 ++++++++--------\n builtin/commit.c         | 36 ++++++++++++++++++------------------\n builtin/config.c         |  2 +-\n builtin/describe.c       | 20 ++++++++++----------\n builtin/fast-export.c    | 10 +++++-----\n builtin/fetch.c          | 24 ++++++++++++------------\n builtin/fsck.c           | 16 ++++++++--------\n builtin/gc.c             |  4 ++--\n builtin/grep.c           | 38 +++++++++++++++++++-------------------\n builtin/hash-object.c    |  6 +++---\n builtin/log.c            |  8 ++++----\n builtin/ls-files.c       | 24 ++++++++++++------------\n builtin/ls-tree.c        |  6 +++---\n builtin/merge-base.c     | 10 +++++-----\n builtin/merge-file.c     |  2 +-\n builtin/merge.c          | 12 ++++++------\n builtin/mv.c             |  2 +-\n builtin/name-rev.c       | 12 ++++++------\n builtin/notes.c          |  4 ++--\n builtin/push.c           |  6 +++---\n builtin/remote.c         | 28 ++++++++++++++--------------\n builtin/replace.c        |  6 +++---\n builtin/reset.c          |  2 +-\n builtin/rev-parse.c      |  4 ++--\n builtin/rm.c             |  6 +++---\n builtin/shortlog.c       | 12 ++++++------\n builtin/show-branch.c    | 28 ++++++++++++++--------------\n builtin/show-ref.c       | 10 +++++-----\n builtin/tag.c            |  4 ++--\n builtin/update-ref.c     |  4 ++--\n 39 files changed, 227 insertions(+), 227 deletions(-)\n\ndiff --git a/builtin/apply.c b/builtin/apply.c\nindex 50912c9..ef32e4f 100644\n--- a/builtin/apply.c\n+++ b/builtin/apply.c\n@@ -4363,23 +4363,23 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)\n \t\t{ OPTION_CALLBACK, 'p', NULL, NULL, N_(\"num\"),\n \t\t\tN_(\"remove <num> leading slashes from traditional diff paths\"),\n \t\t\t0, option_parse_p },\n-\t\tOPT_BOOLEAN(0, \"no-add\", &no_add,\n+\t\tOPT_BOOL(0, \"no-add\", &no_add,\n \t\t\tN_(\"ignore additions made by the patch\")),\n-\t\tOPT_BOOLEAN(0, \"stat\", &diffstat,\n+\t\tOPT_BOOL(0, \"stat\", &diffstat,\n \t\t\tN_(\"instead of applying the patch, output diffstat for the input\")),\n \t\tOPT_NOOP_NOARG(0, \"allow-binary-replacement\"),\n \t\tOPT_NOOP_NOARG(0, \"binary\"),\n-\t\tOPT_BOOLEAN(0, \"numstat\", &numstat,\n+\t\tOPT_BOOL(0, \"numstat\", &numstat,\n \t\t\tN_(\"show number of added and deleted lines in decimal notation\")),\n-\t\tOPT_BOOLEAN(0, \"summary\", &summary,\n+\t\tOPT_BOOL(0, \"summary\", &summary,\n \t\t\tN_(\"instead of applying the patch, output a summary for the input\")),\n-\t\tOPT_BOOLEAN(0, \"check\", &check,\n+\t\tOPT_BOOL(0, \"check\", &check,\n \t\t\tN_(\"instead of applying the patch, see if the patch is applicable\")),\n-\t\tOPT_BOOLEAN(0, \"index\", &check_index,\n+\t\tOPT_BOOL(0, \"index\", &check_index,\n \t\t\tN_(\"make sure the patch is applicable to the current index\")),\n-\t\tOPT_BOOLEAN(0, \"cached\", &cached,\n+\t\tOPT_BOOL(0, \"cached\", &cached,\n \t\t\tN_(\"apply a patch without touching the working tree\")),\n-\t\tOPT_BOOLEAN(0, \"apply\", &force_apply,\n+\t\tOPT_BOOL(0, \"apply\", &force_apply,\n \t\t\tN_(\"also apply the patch (use with --stat/--summary/--check)\")),\n \t\tOPT_BOOL('3', \"3way\", &threeway,\n \t\t\t N_( \"attempt three-way merge if a patch does not apply\")),\n@@ -4399,13 +4399,13 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)\n \t\t{ OPTION_CALLBACK, 0, \"ignore-whitespace\", NULL, NULL,\n \t\t\tN_(\"ignore changes in whitespace when finding context\"),\n \t\t\tPARSE_OPT_NOARG, option_parse_space_change },\n-\t\tOPT_BOOLEAN('R', \"reverse\", &apply_in_reverse,\n+\t\tOPT_BOOL('R', \"reverse\", &apply_in_reverse,\n \t\t\tN_(\"apply the patch in reverse\")),\n-\t\tOPT_BOOLEAN(0, \"unidiff-zero\", &unidiff_zero,\n+\t\tOPT_BOOL(0, \"unidiff-zero\", &unidiff_zero,\n \t\t\tN_(\"don't expect at least one line of context\")),\n-\t\tOPT_BOOLEAN(0, \"reject\", &apply_with_reject,\n+\t\tOPT_BOOL(0, \"reject\", &apply_with_reject,\n \t\t\tN_(\"leave the rejected hunks in corresponding *.rej files\")),\n-\t\tOPT_BOOLEAN(0, \"allow-overlap\", &allow_overlap,\n+\t\tOPT_BOOL(0, \"allow-overlap\", &allow_overlap,\n \t\t\tN_(\"allow overlapping hunks\")),\n \t\tOPT__VERBOSE(&apply_verbosely, N_(\"be verbose\")),\n \t\tOPT_BIT(0, \"inaccurate-eof\", &options,\ndiff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c\nindex e3884e3..3324229 100644\n--- a/builtin/bisect--helper.c\n+++ b/builtin/bisect--helper.c\n@@ -13,10 +13,10 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)\n \tint next_all = 0;\n \tint no_checkout = 0;\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN(0, \"next-all\", &next_all,\n-\t\t\t    N_(\"perform 'git bisect next'\")),\n-\t\tOPT_BOOLEAN(0, \"no-checkout\", &no_checkout,\n-\t\t\t    N_(\"update BISECT_HEAD instead of checking out the current commit\")),\n+\t\tOPT_BOOL(0, \"next-all\", &next_all,\n+\t\t\t N_(\"perform 'git bisect next'\")),\n+\t\tOPT_BOOL(0, \"no-checkout\", &no_checkout,\n+\t\t\t N_(\"update BISECT_HEAD instead of checking out the current commit\")),\n \t\tOPT_END()\n \t};\n \ndiff --git a/builtin/blame.c b/builtin/blame.c\nindex 079dcd3..f932112 100644\n--- a/builtin/blame.c\n+++ b/builtin/blame.c\n@@ -2273,10 +2273,10 @@ int cmd_blame(int argc, const char **argv, const char *prefix)\n \tstatic const char *revs_file = NULL;\n \tstatic const char *contents_from = NULL;\n \tstatic const struct option options[] = {\n-\t\tOPT_BOOLEAN(0, \"incremental\", &incremental, N_(\"Show blame entries as we find them, incrementally\")),\n-\t\tOPT_BOOLEAN('b', NULL, &blank_boundary, N_(\"Show blank SHA-1 for boundary commits (Default: off)\")),\n-\t\tOPT_BOOLEAN(0, \"root\", &show_root, N_(\"Do not treat root commits as boundaries (Default: off)\")),\n-\t\tOPT_BOOLEAN(0, \"show-stats\", &show_stats, N_(\"Show work cost statistics\")),\n+\t\tOPT_BOOL(0, \"incremental\", &incremental, N_(\"Show blame entries as we find them, incrementally\")),\n+\t\tOPT_BOOL('b', NULL, &blank_boundary, N_(\"Show blank SHA-1 for boundary commits (Default: off)\")),\n+\t\tOPT_BOOL(0, \"root\", &show_root, N_(\"Do not treat root commits as boundaries (Default: off)\")),\n+\t\tOPT_BOOL(0, \"show-stats\", &show_stats, N_(\"Show work cost statistics\")),\n \t\tOPT_BIT(0, \"score-debug\", &output_option, N_(\"Show output score for blame entries\"), OUTPUT_SHOW_SCORE),\n \t\tOPT_BIT('f', \"show-name\", &output_option, N_(\"Show original filename (Default: auto)\"), OUTPUT_SHOW_NAME),\n \t\tOPT_BIT('n', \"show-number\", &output_option, N_(\"Show original linenumber (Default: off)\"), OUTPUT_SHOW_NUMBER),\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex 0836890..4daed0b 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -797,7 +797,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \t\tOPT_SET_INT( 0, \"set-upstream\",  &track, N_(\"change upstream info\"),\n \t\t\tBRANCH_TRACK_OVERRIDE),\n \t\tOPT_STRING('u', \"set-upstream-to\", &new_upstream, \"upstream\", \"change the upstream info\"),\n-\t\tOPT_BOOLEAN(0, \"unset-upstream\", &unset_upstream, \"Unset the upstream info\"),\n+\t\tOPT_BOOL(0, \"unset-upstream\", &unset_upstream, \"Unset the upstream info\"),\n \t\tOPT__COLOR(&branch_use_color, N_(\"use colored output\")),\n \t\tOPT_SET_INT('r', \"remotes\",     &kinds, N_(\"act on remote-tracking branches\"),\n \t\t\tREF_REMOTE_BRANCH),\n@@ -822,10 +822,10 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \t\tOPT_BIT('D', NULL, &delete, N_(\"delete branch (even if not merged)\"), 2),\n \t\tOPT_BIT('m', \"move\", &rename, N_(\"move/rename a branch and its reflog\"), 1),\n \t\tOPT_BIT('M', NULL, &rename, N_(\"move/rename a branch, even if target exists\"), 2),\n-\t\tOPT_BOOLEAN(0, \"list\", &list, N_(\"list branch names\")),\n-\t\tOPT_BOOLEAN('l', \"create-reflog\", &reflog, N_(\"create the branch's reflog\")),\n-\t\tOPT_BOOLEAN(0, \"edit-description\", &edit_description,\n-\t\t\t    N_(\"edit the description for the branch\")),\n+\t\tOPT_BOOL(0, \"list\", &list, N_(\"list branch names\")),\n+\t\tOPT_BOOL('l', \"create-reflog\", &reflog, N_(\"create the branch's reflog\")),\n+\t\tOPT_BOOL(0, \"edit-description\", &edit_description,\n+\t\t\t N_(\"edit the description for the branch\")),\n \t\tOPT__FORCE(&force_create, N_(\"force creation (when already exists)\")),\n \t\t{\n \t\t\tOPTION_CALLBACK, 0, \"no-merged\", &merge_filter_ref,\ndiff --git a/builtin/check-attr.c b/builtin/check-attr.c\nindex 075d01d..6e5cd88 100644\n--- a/builtin/check-attr.c\n+++ b/builtin/check-attr.c\n@@ -16,10 +16,10 @@ NULL\n static int null_term_line;\n \n static const struct option check_attr_options[] = {\n-\tOPT_BOOLEAN('a', \"all\", &all_attrs, N_(\"report all attributes set on file\")),\n-\tOPT_BOOLEAN(0,  \"cached\", &cached_attrs, N_(\"use .gitattributes only from the index\")),\n-\tOPT_BOOLEAN(0 , \"stdin\", &stdin_paths, N_(\"read file names from stdin\")),\n-\tOPT_BOOLEAN('z', NULL, &null_term_line,\n+\tOPT_BOOL('a', \"all\", &all_attrs, N_(\"report all attributes set on file\")),\n+\tOPT_BOOL(0,  \"cached\", &cached_attrs, N_(\"use .gitattributes only from the index\")),\n+\tOPT_BOOL(0 , \"stdin\", &stdin_paths, N_(\"read file names from stdin\")),\n+\tOPT_BOOL('z', NULL, &null_term_line,\n \t\tN_(\"input paths are terminated by a null character\")),\n \tOPT_END()\n };\ndiff --git a/builtin/check-ignore.c b/builtin/check-ignore.c\nindex 4a8fc70..c9f0c9b 100644\n--- a/builtin/check-ignore.c\n+++ b/builtin/check-ignore.c\n@@ -18,12 +18,12 @@ static const struct option check_ignore_options[] = {\n \tOPT__QUIET(&quiet, N_(\"suppress progress reporting\")),\n \tOPT__VERBOSE(&verbose, N_(\"be verbose\")),\n \tOPT_GROUP(\"\"),\n-\tOPT_BOOLEAN(0, \"stdin\", &stdin_paths,\n-\t\t    N_(\"read file names from stdin\")),\n-\tOPT_BOOLEAN('z', NULL, &null_term_line,\n-\t\t    N_(\"input paths are terminated by a null character\")),\n-\tOPT_BOOLEAN('n', \"non-matching\", &show_non_matching,\n-\t\t    N_(\"show non-matching input paths\")),\n+\tOPT_BOOL(0, \"stdin\", &stdin_paths,\n+\t\t N_(\"read file names from stdin\")),\n+\tOPT_BOOL('z', NULL, &null_term_line,\n+\t\t N_(\"input paths are terminated by a null character\")),\n+\tOPT_BOOL('n', \"non-matching\", &show_non_matching,\n+\t\t N_(\"show non-matching input paths\")),\n \tOPT_END()\n };\n \ndiff --git a/builtin/checkout-index.c b/builtin/checkout-index.c\nindex b1feda7..aa922ed 100644\n--- a/builtin/checkout-index.c\n+++ b/builtin/checkout-index.c\n@@ -183,7 +183,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)\n \tint prefix_length;\n \tint force = 0, quiet = 0, not_new = 0;\n \tstruct option builtin_checkout_index_options[] = {\n-\t\tOPT_BOOLEAN('a', \"all\", &all,\n+\t\tOPT_BOOL('a', \"all\", &all,\n \t\t\tN_(\"check out all files in the index\")),\n \t\tOPT__FORCE(&force, N_(\"force overwrite of existing files\")),\n \t\tOPT__QUIET(&quiet,\n@@ -196,9 +196,9 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)\n \t\t{ OPTION_CALLBACK, 'z', NULL, NULL, NULL,\n \t\t\tN_(\"paths are separated with NUL character\"),\n \t\t\tPARSE_OPT_NOARG, option_parse_z },\n-\t\tOPT_BOOLEAN(0, \"stdin\", &read_from_stdin,\n+\t\tOPT_BOOL(0, \"stdin\", &read_from_stdin,\n \t\t\tN_(\"read list of paths from the standard input\")),\n-\t\tOPT_BOOLEAN(0, \"temp\", &to_tempfile,\n+\t\tOPT_BOOL(0, \"temp\", &to_tempfile,\n \t\t\tN_(\"write the content to temporary files\")),\n \t\tOPT_CALLBACK(0, \"prefix\", NULL, N_(\"string\"),\n \t\t\tN_(\"when creating files, prepend <string>\"),\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex 646a475..8b48f4a 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -1056,8 +1056,8 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \t\t\t   N_(\"create and checkout a new branch\")),\n \t\tOPT_STRING('B', NULL, &opts.new_branch_force, N_(\"branch\"),\n \t\t\t   N_(\"create/reset and checkout a branch\")),\n-\t\tOPT_BOOLEAN('l', NULL, &opts.new_branch_log, N_(\"create reflog for new branch\")),\n-\t\tOPT_BOOLEAN(0, \"detach\", &opts.force_detach, N_(\"detach the HEAD at named commit\")),\n+\t\tOPT_BOOL('l', NULL, &opts.new_branch_log, N_(\"create reflog for new branch\")),\n+\t\tOPT_BOOL(0, \"detach\", &opts.force_detach, N_(\"detach the HEAD at named commit\")),\n \t\tOPT_SET_INT('t', \"track\",  &opts.track, N_(\"set upstream info for new branch\"),\n \t\t\tBRANCH_TRACK_EXPLICIT),\n \t\tOPT_STRING(0, \"orphan\", &opts.new_orphan_branch, N_(\"new branch\"), N_(\"new unparented branch\")),\n@@ -1066,11 +1066,11 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \t\tOPT_SET_INT('3', \"theirs\", &opts.writeout_stage, N_(\"checkout their version for unmerged files\"),\n \t\t\t    3),\n \t\tOPT__FORCE(&opts.force, N_(\"force checkout (throw away local modifications)\")),\n-\t\tOPT_BOOLEAN('m', \"merge\", &opts.merge, N_(\"perform a 3-way merge with the new branch\")),\n-\t\tOPT_BOOLEAN(0, \"overwrite-ignore\", &opts.overwrite_ignore, N_(\"update ignored files (default)\")),\n+\t\tOPT_BOOL('m', \"merge\", &opts.merge, N_(\"perform a 3-way merge with the new branch\")),\n+\t\tOPT_BOOL(0, \"overwrite-ignore\", &opts.overwrite_ignore, N_(\"update ignored files (default)\")),\n \t\tOPT_STRING(0, \"conflict\", &conflict_style, N_(\"style\"),\n \t\t\t   N_(\"conflict style (merge or diff3)\")),\n-\t\tOPT_BOOLEAN('p', \"patch\", &opts.patch_mode, N_(\"select hunks interactively\")),\n+\t\tOPT_BOOL('p', \"patch\", &opts.patch_mode, N_(\"select hunks interactively\")),\n \t\tOPT_BOOL(0, \"ignore-skip-worktree-bits\", &opts.ignore_skipworktree,\n \t\t\t N_(\"do not limit pathspecs to sparse entries only\")),\n \t\tOPT_HIDDEN_BOOL(0, \"guess\", &dwim_new_local_branch,\ndiff --git a/builtin/clean.c b/builtin/clean.c\nindex dba8387..df0f61e 100644\n--- a/builtin/clean.c\n+++ b/builtin/clean.c\n@@ -851,12 +851,12 @@ int cmd_clean(int argc, const char **argv, const char *prefix)\n \t\tOPT__DRY_RUN(&dry_run, N_(\"dry run\")),\n \t\tOPT__FORCE(&force, N_(\"force\")),\n \t\tOPT_BOOL('i', \"interactive\", &interactive, N_(\"interactive cleaning\")),\n-\t\tOPT_BOOLEAN('d', NULL, &remove_directories,\n+\t\tOPT_BOOL('d', NULL, &remove_directories,\n \t\t\t\tN_(\"remove whole directories\")),\n \t\t{ OPTION_CALLBACK, 'e', \"exclude\", &exclude_list, N_(\"pattern\"),\n \t\t  N_(\"add <pattern> to ignore rules\"), PARSE_OPT_NONEG, exclude_cb },\n-\t\tOPT_BOOLEAN('x', NULL, &ignored, N_(\"remove ignored files, too\")),\n-\t\tOPT_BOOLEAN('X', NULL, &ignored_only,\n+\t\tOPT_BOOL('x', NULL, &ignored, N_(\"remove ignored files, too\")),\n+\t\tOPT_BOOL('X', NULL, &ignored_only,\n \t\t\t\tN_(\"remove only ignored files\")),\n \t\tOPT_END()\n \t};\ndiff --git a/builtin/clone.c b/builtin/clone.c\nindex e7b0b13..ca3eb68 100644\n--- a/builtin/clone.c\n+++ b/builtin/clone.c\n@@ -62,22 +62,22 @@ static struct option builtin_clone_options[] = {\n \tOPT__VERBOSITY(&option_verbosity),\n \tOPT_BOOL(0, \"progress\", &option_progress,\n \t\t N_(\"force progress reporting\")),\n-\tOPT_BOOLEAN('n', \"no-checkout\", &option_no_checkout,\n-\t\t    N_(\"don't create a checkout\")),\n+\tOPT_BOOL('n', \"no-checkout\", &option_no_checkout,\n+\t\t N_(\"don't create a checkout\")),\n \tOPT_BOOL(0, \"bare\", &option_bare, N_(\"create a bare repository\")),\n \tOPT_HIDDEN_BOOL(0, \"naked\", &option_bare,\n \t\t\tN_(\"create a bare repository\")),\n-\tOPT_BOOLEAN(0, \"mirror\", &option_mirror,\n-\t\t    N_(\"create a mirror repository (implies bare)\")),\n+\tOPT_BOOL(0, \"mirror\", &option_mirror,\n+\t\t N_(\"create a mirror repository (implies bare)\")),\n \tOPT_BOOL('l', \"local\", &option_local,\n \t\tN_(\"to clone from a local repository\")),\n-\tOPT_BOOLEAN(0, \"no-hardlinks\", &option_no_hardlinks,\n+\tOPT_BOOL(0, \"no-hardlinks\", &option_no_hardlinks,\n \t\t    N_(\"don't use local hardlinks, always copy\")),\n-\tOPT_BOOLEAN('s', \"shared\", &option_shared,\n+\tOPT_BOOL('s', \"shared\", &option_shared,\n \t\t    N_(\"setup as shared repository\")),\n-\tOPT_BOOLEAN(0, \"recursive\", &option_recursive,\n+\tOPT_BOOL(0, \"recursive\", &option_recursive,\n \t\t    N_(\"initialize submodules in the clone\")),\n-\tOPT_BOOLEAN(0, \"recurse-submodules\", &option_recursive,\n+\tOPT_BOOL(0, \"recurse-submodules\", &option_recursive,\n \t\t    N_(\"initialize submodules in the clone\")),\n \tOPT_STRING(0, \"template\", &option_template, N_(\"template-directory\"),\n \t\t   N_(\"directory from which templates will be used\")),\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex b64a083..c20426b 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -1209,14 +1209,14 @@ int cmd_status(int argc, const char **argv, const char *prefix)\n \t\tOPT_SET_INT(0, \"long\", &status_format,\n \t\t\t    N_(\"show status in long format (default)\"),\n \t\t\t    STATUS_FORMAT_LONG),\n-\t\tOPT_BOOLEAN('z', \"null\", &s.null_termination,\n-\t\t\t    N_(\"terminate entries with NUL\")),\n+\t\tOPT_BOOL('z', \"null\", &s.null_termination,\n+\t\t\t N_(\"terminate entries with NUL\")),\n \t\t{ OPTION_STRING, 'u', \"untracked-files\", &untracked_files_arg,\n \t\t  N_(\"mode\"),\n \t\t  N_(\"show untracked files, optional modes: all, normal, no. (Default: all)\"),\n \t\t  PARSE_OPT_OPTARG, NULL, (intptr_t)\"all\" },\n-\t\tOPT_BOOLEAN(0, \"ignored\", &show_ignored_in_status,\n-\t\t\t    N_(\"show ignored files\")),\n+\t\tOPT_BOOL(0, \"ignored\", &show_ignored_in_status,\n+\t\t\t N_(\"show ignored files\")),\n \t\t{ OPTION_STRING, 0, \"ignore-submodules\", &ignore_submodule_arg, N_(\"when\"),\n \t\t  N_(\"ignore changes to submodules, optional when: all, dirty, untracked. (Default: all)\"),\n \t\t  PARSE_OPT_OPTARG, NULL, (intptr_t)\"all\" },\n@@ -1415,24 +1415,24 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \t\tOPT_STRING('C', \"reuse-message\", &use_message, N_(\"commit\"), N_(\"reuse message from specified commit\")),\n \t\tOPT_STRING(0, \"fixup\", &fixup_message, N_(\"commit\"), N_(\"use autosquash formatted message to fixup specified commit\")),\n \t\tOPT_STRING(0, \"squash\", &squash_message, N_(\"commit\"), N_(\"use autosquash formatted message to squash specified commit\")),\n-\t\tOPT_BOOLEAN(0, \"reset-author\", &renew_authorship, N_(\"the commit is authored by me now (used with -C/-c/--amend)\")),\n-\t\tOPT_BOOLEAN('s', \"signoff\", &signoff, N_(\"add Signed-off-by:\")),\n+\t\tOPT_BOOL(0, \"reset-author\", &renew_authorship, N_(\"the commit is authored by me now (used with -C/-c/--amend)\")),\n+\t\tOPT_BOOL('s', \"signoff\", &signoff, N_(\"add Signed-off-by:\")),\n \t\tOPT_FILENAME('t', \"template\", &template_file, N_(\"use specified template file\")),\n \t\tOPT_BOOL('e', \"edit\", &edit_flag, N_(\"force edit of commit\")),\n \t\tOPT_STRING(0, \"cleanup\", &cleanup_arg, N_(\"default\"), N_(\"how to strip spaces and #comments from message\")),\n-\t\tOPT_BOOLEAN(0, \"status\", &include_status, N_(\"include status in commit message template\")),\n+\t\tOPT_BOOL(0, \"status\", &include_status, N_(\"include status in commit message template\")),\n \t\t{ OPTION_STRING, 'S', \"gpg-sign\", &sign_commit, N_(\"key id\"),\n \t\t  N_(\"GPG sign commit\"), PARSE_OPT_OPTARG, NULL, (intptr_t) \"\" },\n \t\t/* end commit message options */\n \n \t\tOPT_GROUP(N_(\"Commit contents options\")),\n-\t\tOPT_BOOLEAN('a', \"all\", &all, N_(\"commit all changed files\")),\n-\t\tOPT_BOOLEAN('i', \"include\", &also, N_(\"add specified files to index for commit\")),\n-\t\tOPT_BOOLEAN(0, \"interactive\", &interactive, N_(\"interactively add files\")),\n-\t\tOPT_BOOLEAN('p', \"patch\", &patch_interactive, N_(\"interactively add changes\")),\n-\t\tOPT_BOOLEAN('o', \"only\", &only, N_(\"commit only specified files\")),\n-\t\tOPT_BOOLEAN('n', \"no-verify\", &no_verify, N_(\"bypass pre-commit hook\")),\n-\t\tOPT_BOOLEAN(0, \"dry-run\", &dry_run, N_(\"show what would be committed\")),\n+\t\tOPT_BOOL('a', \"all\", &all, N_(\"commit all changed files\")),\n+\t\tOPT_BOOL('i', \"include\", &also, N_(\"add specified files to index for commit\")),\n+\t\tOPT_BOOL(0, \"interactive\", &interactive, N_(\"interactively add files\")),\n+\t\tOPT_BOOL('p', \"patch\", &patch_interactive, N_(\"interactively add changes\")),\n+\t\tOPT_BOOL('o', \"only\", &only, N_(\"commit only specified files\")),\n+\t\tOPT_BOOL('n', \"no-verify\", &no_verify, N_(\"bypass pre-commit hook\")),\n+\t\tOPT_BOOL(0, \"dry-run\", &dry_run, N_(\"show what would be committed\")),\n \t\tOPT_SET_INT(0, \"short\", &status_format, N_(\"show status concisely\"),\n \t\t\t    STATUS_FORMAT_SHORT),\n \t\tOPT_BOOL(0, \"branch\", &s.show_branch, N_(\"show branch information\")),\n@@ -1441,10 +1441,10 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \t\tOPT_SET_INT(0, \"long\", &status_format,\n \t\t\t    N_(\"show status in long format (default)\"),\n \t\t\t    STATUS_FORMAT_LONG),\n-\t\tOPT_BOOLEAN('z', \"null\", &s.null_termination,\n-\t\t\t    N_(\"terminate entries with NUL\")),\n-\t\tOPT_BOOLEAN(0, \"amend\", &amend, N_(\"amend previous commit\")),\n-\t\tOPT_BOOLEAN(0, \"no-post-rewrite\", &no_post_rewrite, N_(\"bypass post-rewrite hook\")),\n+\t\tOPT_BOOL('z', \"null\", &s.null_termination,\n+\t\t\t N_(\"terminate entries with NUL\")),\n+\t\tOPT_BOOL(0, \"amend\", &amend, N_(\"amend previous commit\")),\n+\t\tOPT_BOOL(0, \"no-post-rewrite\", &no_post_rewrite, N_(\"bypass post-rewrite hook\")),\n \t\t{ 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\" },\n \t\t/* end commit contents options */\n \ndiff --git a/builtin/config.c b/builtin/config.c\nindex 4010c43..da12fdb 100644\n--- a/builtin/config.c\n+++ b/builtin/config.c\n@@ -75,7 +75,7 @@ static struct option builtin_config_options[] = {\n \tOPT_BIT(0, \"bool-or-int\", &types, N_(\"value is --bool or --int\"), TYPE_BOOL_OR_INT),\n \tOPT_BIT(0, \"path\", &types, N_(\"value is a path (file or directory name)\"), TYPE_PATH),\n \tOPT_GROUP(N_(\"Other\")),\n-\tOPT_BOOLEAN('z', \"null\", &end_null, N_(\"terminate values with NUL byte\")),\n+\tOPT_BOOL('z', \"null\", &end_null, N_(\"terminate values with NUL byte\")),\n \tOPT_BOOL(0, \"includes\", &respect_includes, N_(\"respect include directives on lookup\")),\n \tOPT_END(),\n };\ndiff --git a/builtin/describe.c b/builtin/describe.c\nindex 7d73722..c94e5c3 100644\n--- a/builtin/describe.c\n+++ b/builtin/describe.c\n@@ -406,12 +406,12 @@ int cmd_describe(int argc, const char **argv, const char *prefix)\n {\n \tint contains = 0;\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN(0, \"contains\",   &contains, N_(\"find the tag that comes after the commit\")),\n-\t\tOPT_BOOLEAN(0, \"debug\",      &debug, N_(\"debug search strategy on stderr\")),\n-\t\tOPT_BOOLEAN(0, \"all\",        &all, N_(\"use any ref\")),\n-\t\tOPT_BOOLEAN(0, \"tags\",       &tags, N_(\"use any tag, even unannotated\")),\n-\t\tOPT_BOOLEAN(0, \"long\",       &longformat, N_(\"always use long format\")),\n-\t\tOPT_BOOLEAN(0, \"first-parent\", &first_parent, N_(\"only follow first parent\")),\n+\t\tOPT_BOOL(0, \"contains\",   &contains, N_(\"find the tag that comes after the commit\")),\n+\t\tOPT_BOOL(0, \"debug\",      &debug, N_(\"debug search strategy on stderr\")),\n+\t\tOPT_BOOL(0, \"all\",        &all, N_(\"use any ref\")),\n+\t\tOPT_BOOL(0, \"tags\",       &tags, N_(\"use any tag, even unannotated\")),\n+\t\tOPT_BOOL(0, \"long\",       &longformat, N_(\"always use long format\")),\n+\t\tOPT_BOOL(0, \"first-parent\", &first_parent, N_(\"only follow first parent\")),\n \t\tOPT__ABBREV(&abbrev),\n \t\tOPT_SET_INT(0, \"exact-match\", &max_candidates,\n \t\t\t    N_(\"only output exact matches\"), 0),\n@@ -419,11 +419,11 @@ int cmd_describe(int argc, const char **argv, const char *prefix)\n \t\t\t    N_(\"consider <n> most recent tags (default: 10)\")),\n \t\tOPT_STRING(0, \"match\",       &pattern, N_(\"pattern\"),\n \t\t\t   N_(\"only consider tags matching <pattern>\")),\n-\t\tOPT_BOOLEAN(0, \"always\",     &always,\n-\t\t\t   N_(\"show abbreviated commit object as fallback\")),\n+\t\tOPT_BOOL(0, \"always\",        &always,\n+\t\t\tN_(\"show abbreviated commit object as fallback\")),\n \t\t{OPTION_STRING, 0, \"dirty\",  &dirty, N_(\"mark\"),\n-\t\t\t   N_(\"append <mark> on dirty working tree (default: \\\"-dirty\\\")\"),\n-\t\t PARSE_OPT_OPTARG, NULL, (intptr_t) \"-dirty\"},\n+\t\t\tN_(\"append <mark> on dirty working tree (default: \\\"-dirty\\\")\"),\n+\t\t\tPARSE_OPT_OPTARG, NULL, (intptr_t) \"-dirty\"},\n \t\tOPT_END(),\n \t};\n \ndiff --git a/builtin/fast-export.c b/builtin/fast-export.c\nindex d1d68e9..32b0c3f 100644\n--- a/builtin/fast-export.c\n+++ b/builtin/fast-export.c\n@@ -674,11 +674,11 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)\n \t\t\t     N_(\"Dump marks to this file\")),\n \t\tOPT_STRING(0, \"import-marks\", &import_filename, N_(\"file\"),\n \t\t\t     N_(\"Import marks from this file\")),\n-\t\tOPT_BOOLEAN(0, \"fake-missing-tagger\", &fake_missing_tagger,\n-\t\t\t     N_(\"Fake a tagger when tags lack one\")),\n-\t\tOPT_BOOLEAN(0, \"full-tree\", &full_tree,\n-\t\t\t     N_(\"Output full tree for each commit\")),\n-\t\tOPT_BOOLEAN(0, \"use-done-feature\", &use_done_feature,\n+\t\tOPT_BOOL(0, \"fake-missing-tagger\", &fake_missing_tagger,\n+\t\t\t N_(\"Fake a tagger when tags lack one\")),\n+\t\tOPT_BOOL(0, \"full-tree\", &full_tree,\n+\t\t\t N_(\"Output full tree for each commit\")),\n+\t\tOPT_BOOL(0, \"use-done-feature\", &use_done_feature,\n \t\t\t     N_(\"Use the done feature to terminate the stream\")),\n \t\tOPT_BOOL(0, \"no-data\", &no_data, N_(\"Skip output of blob data\")),\n \t\tOPT_END()\ndiff --git a/builtin/fetch.c b/builtin/fetch.c\nindex d784b2e..99afed0 100644\n--- a/builtin/fetch.c\n+++ b/builtin/fetch.c\n@@ -56,28 +56,28 @@ static int option_parse_recurse_submodules(const struct option *opt,\n \n static struct option builtin_fetch_options[] = {\n \tOPT__VERBOSITY(&verbosity),\n-\tOPT_BOOLEAN(0, \"all\", &all,\n-\t\t    N_(\"fetch from all remotes\")),\n-\tOPT_BOOLEAN('a', \"append\", &append,\n-\t\t    N_(\"append to .git/FETCH_HEAD instead of overwriting\")),\n+\tOPT_BOOL(0, \"all\", &all,\n+\t\t N_(\"fetch from all remotes\")),\n+\tOPT_BOOL('a', \"append\", &append,\n+\t\t N_(\"append to .git/FETCH_HEAD instead of overwriting\")),\n \tOPT_STRING(0, \"upload-pack\", &upload_pack, N_(\"path\"),\n \t\t   N_(\"path to upload pack on remote end\")),\n \tOPT__FORCE(&force, N_(\"force overwrite of local branch\")),\n-\tOPT_BOOLEAN('m', \"multiple\", &multiple,\n-\t\t    N_(\"fetch from multiple remotes\")),\n+\tOPT_BOOL('m', \"multiple\", &multiple,\n+\t\t N_(\"fetch from multiple remotes\")),\n \tOPT_SET_INT('t', \"tags\", &tags,\n \t\t    N_(\"fetch all tags and associated objects\"), TAGS_SET),\n \tOPT_SET_INT('n', NULL, &tags,\n \t\t    N_(\"do not fetch all tags (--no-tags)\"), TAGS_UNSET),\n-\tOPT_BOOLEAN('p', \"prune\", &prune,\n-\t\t    N_(\"prune remote-tracking branches no longer on remote\")),\n+\tOPT_BOOL('p', \"prune\", &prune,\n+\t\t N_(\"prune remote-tracking branches no longer on remote\")),\n \t{ OPTION_CALLBACK, 0, \"recurse-submodules\", NULL, N_(\"on-demand\"),\n \t\t    N_(\"control recursive fetching of submodules\"),\n \t\t    PARSE_OPT_OPTARG, option_parse_recurse_submodules },\n-\tOPT_BOOLEAN(0, \"dry-run\", &dry_run,\n-\t\t    N_(\"dry run\")),\n-\tOPT_BOOLEAN('k', \"keep\", &keep, N_(\"keep downloaded pack\")),\n-\tOPT_BOOLEAN('u', \"update-head-ok\", &update_head_ok,\n+\tOPT_BOOL(0, \"dry-run\", &dry_run,\n+\t\t N_(\"dry run\")),\n+\tOPT_BOOL('k', \"keep\", &keep, N_(\"keep downloaded pack\")),\n+\tOPT_BOOL('u', \"update-head-ok\", &update_head_ok,\n \t\t    N_(\"allow updating of HEAD ref\")),\n \tOPT_BOOL(0, \"progress\", &progress, N_(\"force progress reporting\")),\n \tOPT_STRING(0, \"depth\", &depth, N_(\"depth\"),\ndiff --git a/builtin/fsck.c b/builtin/fsck.c\nindex 9909b6d..39fa5e8 100644\n--- a/builtin/fsck.c\n+++ b/builtin/fsck.c\n@@ -611,15 +611,15 @@ static char const * const fsck_usage[] = {\n \n static struct option fsck_opts[] = {\n \tOPT__VERBOSE(&verbose, N_(\"be verbose\")),\n-\tOPT_BOOLEAN(0, \"unreachable\", &show_unreachable, N_(\"show unreachable objects\")),\n+\tOPT_BOOL(0, \"unreachable\", &show_unreachable, N_(\"show unreachable objects\")),\n \tOPT_BOOL(0, \"dangling\", &show_dangling, N_(\"show dangling objects\")),\n-\tOPT_BOOLEAN(0, \"tags\", &show_tags, N_(\"report tags\")),\n-\tOPT_BOOLEAN(0, \"root\", &show_root, N_(\"report root nodes\")),\n-\tOPT_BOOLEAN(0, \"cache\", &keep_cache_objects, N_(\"make index objects head nodes\")),\n-\tOPT_BOOLEAN(0, \"reflogs\", &include_reflogs, N_(\"make reflogs head nodes (default)\")),\n-\tOPT_BOOLEAN(0, \"full\", &check_full, N_(\"also consider packs and alternate objects\")),\n-\tOPT_BOOLEAN(0, \"strict\", &check_strict, N_(\"enable more strict checking\")),\n-\tOPT_BOOLEAN(0, \"lost-found\", &write_lost_and_found,\n+\tOPT_BOOL(0, \"tags\", &show_tags, N_(\"report tags\")),\n+\tOPT_BOOL(0, \"root\", &show_root, N_(\"report root nodes\")),\n+\tOPT_BOOL(0, \"cache\", &keep_cache_objects, N_(\"make index objects head nodes\")),\n+\tOPT_BOOL(0, \"reflogs\", &include_reflogs, N_(\"make reflogs head nodes (default)\")),\n+\tOPT_BOOL(0, \"full\", &check_full, N_(\"also consider packs and alternate objects\")),\n+\tOPT_BOOL(0, \"strict\", &check_strict, N_(\"enable more strict checking\")),\n+\tOPT_BOOL(0, \"lost-found\", &write_lost_and_found,\n \t\t\t\tN_(\"write dangling objects in .git/lost-found\")),\n \tOPT_BOOL(0, \"progress\", &show_progress, N_(\"show progress\")),\n \tOPT_END(),\ndiff --git a/builtin/gc.c b/builtin/gc.c\nindex 6be6c8d..c4f7390 100644\n--- a/builtin/gc.c\n+++ b/builtin/gc.c\n@@ -178,8 +178,8 @@ int cmd_gc(int argc, const char **argv, const char *prefix)\n \t\t{ OPTION_STRING, 0, \"prune\", &prune_expire, N_(\"date\"),\n \t\t\tN_(\"prune unreferenced objects\"),\n \t\t\tPARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire },\n-\t\tOPT_BOOLEAN(0, \"aggressive\", &aggressive, N_(\"be more thorough (increased runtime)\")),\n-\t\tOPT_BOOLEAN(0, \"auto\", &auto_gc, N_(\"enable auto-gc mode\")),\n+\t\tOPT_BOOL(0, \"aggressive\", &aggressive, N_(\"be more thorough (increased runtime)\")),\n+\t\tOPT_BOOL(0, \"auto\", &auto_gc, N_(\"enable auto-gc mode\")),\n \t\tOPT_END()\n \t};\n \ndiff --git a/builtin/grep.c b/builtin/grep.c\nindex d3b3b1d..7877e77 100644\n--- a/builtin/grep.c\n+++ b/builtin/grep.c\n@@ -638,20 +638,20 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \tint pattern_type_arg = GREP_PATTERN_TYPE_UNSPECIFIED;\n \n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN(0, \"cached\", &cached,\n+\t\tOPT_BOOL(0, \"cached\", &cached,\n \t\t\tN_(\"search in index instead of in the work tree\")),\n \t\tOPT_NEGBIT(0, \"no-index\", &use_index,\n \t\t\t N_(\"find in contents not managed by git\"), 1),\n-\t\tOPT_BOOLEAN(0, \"untracked\", &untracked,\n+\t\tOPT_BOOL(0, \"untracked\", &untracked,\n \t\t\tN_(\"search in both tracked and untracked files\")),\n \t\tOPT_SET_INT(0, \"exclude-standard\", &opt_exclude,\n \t\t\t    N_(\"search also in ignored files\"), 1),\n \t\tOPT_GROUP(\"\"),\n-\t\tOPT_BOOLEAN('v', \"invert-match\", &opt.invert,\n+\t\tOPT_BOOL('v', \"invert-match\", &opt.invert,\n \t\t\tN_(\"show non-matching lines\")),\n-\t\tOPT_BOOLEAN('i', \"ignore-case\", &opt.ignore_case,\n+\t\tOPT_BOOL('i', \"ignore-case\", &opt.ignore_case,\n \t\t\tN_(\"case insensitive matching\")),\n-\t\tOPT_BOOLEAN('w', \"word-regexp\", &opt.word_regexp,\n+\t\tOPT_BOOL('w', \"word-regexp\", &opt.word_regexp,\n \t\t\tN_(\"match patterns only at word boundaries\")),\n \t\tOPT_SET_INT('a', \"text\", &opt.binary,\n \t\t\tN_(\"process binary files as text\"), GREP_BINARY_TEXT),\n@@ -675,26 +675,26 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \t\t\t    N_(\"use Perl-compatible regular expressions\"),\n \t\t\t    GREP_PATTERN_TYPE_PCRE),\n \t\tOPT_GROUP(\"\"),\n-\t\tOPT_BOOLEAN('n', \"line-number\", &opt.linenum, N_(\"show line numbers\")),\n+\t\tOPT_BOOL('n', \"line-number\", &opt.linenum, N_(\"show line numbers\")),\n \t\tOPT_NEGBIT('h', NULL, &opt.pathname, N_(\"don't show filenames\"), 1),\n \t\tOPT_BIT('H', NULL, &opt.pathname, N_(\"show filenames\"), 1),\n \t\tOPT_NEGBIT(0, \"full-name\", &opt.relative,\n \t\t\tN_(\"show filenames relative to top directory\"), 1),\n-\t\tOPT_BOOLEAN('l', \"files-with-matches\", &opt.name_only,\n+\t\tOPT_BOOL('l', \"files-with-matches\", &opt.name_only,\n \t\t\tN_(\"show only filenames instead of matching lines\")),\n-\t\tOPT_BOOLEAN(0, \"name-only\", &opt.name_only,\n+\t\tOPT_BOOL(0, \"name-only\", &opt.name_only,\n \t\t\tN_(\"synonym for --files-with-matches\")),\n-\t\tOPT_BOOLEAN('L', \"files-without-match\",\n+\t\tOPT_BOOL('L', \"files-without-match\",\n \t\t\t&opt.unmatch_name_only,\n \t\t\tN_(\"show only the names of files without match\")),\n-\t\tOPT_BOOLEAN('z', \"null\", &opt.null_following_name,\n+\t\tOPT_BOOL('z', \"null\", &opt.null_following_name,\n \t\t\tN_(\"print NUL after filenames\")),\n-\t\tOPT_BOOLEAN('c', \"count\", &opt.count,\n+\t\tOPT_BOOL('c', \"count\", &opt.count,\n \t\t\tN_(\"show the number of matches instead of matching lines\")),\n \t\tOPT__COLOR(&opt.color, N_(\"highlight matches\")),\n-\t\tOPT_BOOLEAN(0, \"break\", &opt.file_break,\n+\t\tOPT_BOOL(0, \"break\", &opt.file_break,\n \t\t\tN_(\"print empty line between matches from different files\")),\n-\t\tOPT_BOOLEAN(0, \"heading\", &opt.heading,\n+\t\tOPT_BOOL(0, \"heading\", &opt.heading,\n \t\t\tN_(\"show filename only once above matches from same file\")),\n \t\tOPT_GROUP(\"\"),\n \t\tOPT_CALLBACK('C', \"context\", &opt, N_(\"n\"),\n@@ -706,9 +706,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \t\t\tN_(\"show <n> context lines after matches\")),\n \t\tOPT_NUMBER_CALLBACK(&opt, N_(\"shortcut for -C NUM\"),\n \t\t\tcontext_callback),\n-\t\tOPT_BOOLEAN('p', \"show-function\", &opt.funcname,\n+\t\tOPT_BOOL('p', \"show-function\", &opt.funcname,\n \t\t\tN_(\"show a line with the function name before matches\")),\n-\t\tOPT_BOOLEAN('W', \"function-context\", &opt.funcbody,\n+\t\tOPT_BOOL('W', \"function-context\", &opt.funcbody,\n \t\t\tN_(\"show the surrounding function\")),\n \t\tOPT_GROUP(\"\"),\n \t\tOPT_CALLBACK('f', NULL, &opt, N_(\"file\"),\n@@ -718,7 +718,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \t\t{ OPTION_CALLBACK, 0, \"and\", &opt, NULL,\n \t\t  N_(\"combine patterns specified with -e\"),\n \t\t  PARSE_OPT_NOARG | PARSE_OPT_NONEG, and_callback },\n-\t\tOPT_BOOLEAN(0, \"or\", &dummy, \"\"),\n+\t\tOPT_BOOL(0, \"or\", &dummy, \"\"),\n \t\t{ OPTION_CALLBACK, 0, \"not\", &opt, NULL, \"\",\n \t\t  PARSE_OPT_NOARG | PARSE_OPT_NONEG, not_callback },\n \t\t{ OPTION_CALLBACK, '(', NULL, &opt, NULL, \"\",\n@@ -729,7 +729,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \t\t  close_callback },\n \t\tOPT__QUIET(&opt.status_only,\n \t\t\t   N_(\"indicate hit with exit status without output\")),\n-\t\tOPT_BOOLEAN(0, \"all-match\", &opt.all_match,\n+\t\tOPT_BOOL(0, \"all-match\", &opt.all_match,\n \t\t\tN_(\"show only matches from files that match all patterns\")),\n \t\t{ OPTION_SET_INT, 0, \"debug\", &opt.debug, NULL,\n \t\t  N_(\"show parse tree for grep expression\"),\n@@ -738,8 +738,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \t\t{ OPTION_STRING, 'O', \"open-files-in-pager\", &show_in_pager,\n \t\t\tN_(\"pager\"), N_(\"show matching files in the pager\"),\n \t\t\tPARSE_OPT_OPTARG, NULL, (intptr_t)default_pager },\n-\t\tOPT_BOOLEAN(0, \"ext-grep\", &external_grep_allowed__ignored,\n-\t\t\t    N_(\"allow calling of grep(1) (ignored by this build)\")),\n+\t\tOPT_BOOL(0, \"ext-grep\", &external_grep_allowed__ignored,\n+\t\t\t N_(\"allow calling of grep(1) (ignored by this build)\")),\n \t\t{ OPTION_CALLBACK, 0, \"help-all\", &options, NULL, N_(\"show usage\"),\n \t\t  PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, help_callback },\n \t\tOPT_END()\ndiff --git a/builtin/hash-object.c b/builtin/hash-object.c\nindex 8d184f1..4aea5bb 100644\n--- a/builtin/hash-object.c\n+++ b/builtin/hash-object.c\n@@ -70,10 +70,10 @@ static const char *vpath;\n \n static const struct option hash_object_options[] = {\n \tOPT_STRING('t', NULL, &type, N_(\"type\"), N_(\"object type\")),\n-\tOPT_BOOLEAN('w', NULL, &write_object, N_(\"write the object into the object database\")),\n+\tOPT_BOOL('w', NULL, &write_object, N_(\"write the object into the object database\")),\n \tOPT_BOOLEAN( 0 , \"stdin\", &hashstdin, N_(\"read the object from stdin\")),\n-\tOPT_BOOLEAN( 0 , \"stdin-paths\", &stdin_paths, N_(\"read file names from stdin\")),\n-\tOPT_BOOLEAN( 0 , \"no-filters\", &no_filters, N_(\"store file as is without filters\")),\n+\tOPT_BOOL( 0 , \"stdin-paths\", &stdin_paths, N_(\"read file names from stdin\")),\n+\tOPT_BOOL( 0 , \"no-filters\", &no_filters, N_(\"store file as is without filters\")),\n \tOPT_STRING( 0 , \"path\", &vpath, N_(\"file\"), N_(\"process file as it were from this path\")),\n \tOPT_END()\n };\ndiff --git a/builtin/log.c b/builtin/log.c\nindex 05e374d..1dafbd0 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -1179,10 +1179,10 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t\t{ OPTION_CALLBACK, 'k', \"keep-subject\", &rev, NULL,\n \t\t\t    N_(\"don't strip/add [PATCH]\"),\n \t\t\t    PARSE_OPT_NOARG | PARSE_OPT_NONEG, keep_callback },\n-\t\tOPT_BOOLEAN(0, \"no-binary\", &no_binary_diff,\n-\t\t\t    N_(\"don't output binary diffs\")),\n-\t\tOPT_BOOLEAN(0, \"ignore-if-in-upstream\", &ignore_if_in_upstream,\n-\t\t\t    N_(\"don't include a patch matching a commit upstream\")),\n+\t\tOPT_BOOL(0, \"no-binary\", &no_binary_diff,\n+\t\t\t N_(\"don't output binary diffs\")),\n+\t\tOPT_BOOL(0, \"ignore-if-in-upstream\", &ignore_if_in_upstream,\n+\t\t\t N_(\"don't include a patch matching a commit upstream\")),\n \t\t{ OPTION_SET_INT, 'p', \"no-stat\", &use_patch_format, NULL,\n \t\t  N_(\"show patch format instead of default (patch + stat)\"),\n \t\t  PARSE_OPT_NONEG | PARSE_OPT_NOARG, NULL, 1},\ndiff --git a/builtin/ls-files.c b/builtin/ls-files.c\nindex 5cf3e31..963ccc9 100644\n--- a/builtin/ls-files.c\n+++ b/builtin/ls-files.c\n@@ -461,24 +461,24 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)\n \t\t{ OPTION_CALLBACK, 'z', NULL, NULL, NULL,\n \t\t\tN_(\"paths are separated with NUL character\"),\n \t\t\tPARSE_OPT_NOARG, option_parse_z },\n-\t\tOPT_BOOLEAN('t', NULL, &show_tag,\n+\t\tOPT_BOOL('t', NULL, &show_tag,\n \t\t\tN_(\"identify the file status with tags\")),\n-\t\tOPT_BOOLEAN('v', NULL, &show_valid_bit,\n+\t\tOPT_BOOL('v', NULL, &show_valid_bit,\n \t\t\tN_(\"use lowercase letters for 'assume unchanged' files\")),\n-\t\tOPT_BOOLEAN('c', \"cached\", &show_cached,\n+\t\tOPT_BOOL('c', \"cached\", &show_cached,\n \t\t\tN_(\"show cached files in the output (default)\")),\n-\t\tOPT_BOOLEAN('d', \"deleted\", &show_deleted,\n+\t\tOPT_BOOL('d', \"deleted\", &show_deleted,\n \t\t\tN_(\"show deleted files in the output\")),\n-\t\tOPT_BOOLEAN('m', \"modified\", &show_modified,\n+\t\tOPT_BOOL('m', \"modified\", &show_modified,\n \t\t\tN_(\"show modified files in the output\")),\n-\t\tOPT_BOOLEAN('o', \"others\", &show_others,\n+\t\tOPT_BOOL('o', \"others\", &show_others,\n \t\t\tN_(\"show other files in the output\")),\n \t\tOPT_BIT('i', \"ignored\", &dir.flags,\n \t\t\tN_(\"show ignored files in the output\"),\n \t\t\tDIR_SHOW_IGNORED),\n-\t\tOPT_BOOLEAN('s', \"stage\", &show_stage,\n+\t\tOPT_BOOL('s', \"stage\", &show_stage,\n \t\t\tN_(\"show staged contents' object name in the output\")),\n-\t\tOPT_BOOLEAN('k', \"killed\", &show_killed,\n+\t\tOPT_BOOL('k', \"killed\", &show_killed,\n \t\t\tN_(\"show files on the filesystem that need to be removed\")),\n \t\tOPT_BIT(0, \"directory\", &dir.flags,\n \t\t\tN_(\"show 'other' directories' name only\"),\n@@ -486,9 +486,9 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)\n \t\tOPT_NEGBIT(0, \"empty-directory\", &dir.flags,\n \t\t\tN_(\"don't show empty directories\"),\n \t\t\tDIR_HIDE_EMPTY_DIRECTORIES),\n-\t\tOPT_BOOLEAN('u', \"unmerged\", &show_unmerged,\n+\t\tOPT_BOOL('u', \"unmerged\", &show_unmerged,\n \t\t\tN_(\"show unmerged files in the output\")),\n-\t\tOPT_BOOLEAN(0, \"resolve-undo\", &show_resolve_undo,\n+\t\tOPT_BOOL(0, \"resolve-undo\", &show_resolve_undo,\n \t\t\t    N_(\"show resolve-undo information\")),\n \t\t{ OPTION_CALLBACK, 'x', \"exclude\", &exclude_list, N_(\"pattern\"),\n \t\t\tN_(\"skip files matching pattern\"),\n@@ -504,12 +504,12 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)\n \t\t{ OPTION_SET_INT, 0, \"full-name\", &prefix_len, NULL,\n \t\t\tN_(\"make the output relative to the project top directory\"),\n \t\t\tPARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL },\n-\t\tOPT_BOOLEAN(0, \"error-unmatch\", &error_unmatch,\n+\t\tOPT_BOOL(0, \"error-unmatch\", &error_unmatch,\n \t\t\tN_(\"if any <file> is not in the index, treat this as an error\")),\n \t\tOPT_STRING(0, \"with-tree\", &with_tree, N_(\"tree-ish\"),\n \t\t\tN_(\"pretend that paths removed since <tree-ish> are still present\")),\n \t\tOPT__ABBREV(&abbrev),\n-\t\tOPT_BOOLEAN(0, \"debug\", &debug_mode, N_(\"show debugging data\")),\n+\t\tOPT_BOOL(0, \"debug\", &debug_mode, N_(\"show debugging data\")),\n \t\tOPT_END()\n \t};\n \ndiff --git a/builtin/ls-tree.c b/builtin/ls-tree.c\nindex fb76e38..de88563 100644\n--- a/builtin/ls-tree.c\n+++ b/builtin/ls-tree.c\n@@ -138,9 +138,9 @@ int cmd_ls_tree(int argc, const char **argv, const char *prefix)\n \t\t\tLS_NAME_ONLY),\n \t\tOPT_SET_INT(0, \"full-name\", &chomp_prefix,\n \t\t\t    N_(\"use full path names\"), 0),\n-\t\tOPT_BOOLEAN(0, \"full-tree\", &full_tree,\n-\t\t\t    N_(\"list entire tree; not just current directory \"\n-\t\t\t       \"(implies --full-name)\")),\n+\t\tOPT_BOOL(0, \"full-tree\", &full_tree,\n+\t\t\t N_(\"list entire tree; not just current directory \"\n+\t\t\t    \"(implies --full-name)\")),\n \t\tOPT__ABBREV(&abbrev),\n \t\tOPT_END()\n \t};\ndiff --git a/builtin/merge-base.c b/builtin/merge-base.c\nindex 0c4cd2f..e88eb93 100644\n--- a/builtin/merge-base.c\n+++ b/builtin/merge-base.c\n@@ -95,11 +95,11 @@ int cmd_merge_base(int argc, const char **argv, const char *prefix)\n \tint is_ancestor = 0;\n \n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('a', \"all\", &show_all, N_(\"output all common ancestors\")),\n-\t\tOPT_BOOLEAN(0, \"octopus\", &octopus, N_(\"find ancestors for a single n-way merge\")),\n-\t\tOPT_BOOLEAN(0, \"independent\", &reduce, N_(\"list revs not reachable from others\")),\n-\t\tOPT_BOOLEAN(0, \"is-ancestor\", &is_ancestor,\n-\t\t\t    N_(\"is the first one ancestor of the other?\")),\n+\t\tOPT_BOOL('a', \"all\", &show_all, N_(\"output all common ancestors\")),\n+\t\tOPT_BOOL(0, \"octopus\", &octopus, N_(\"find ancestors for a single n-way merge\")),\n+\t\tOPT_BOOL(0, \"independent\", &reduce, N_(\"list revs not reachable from others\")),\n+\t\tOPT_BOOL(0, \"is-ancestor\", &is_ancestor,\n+\t\t\t N_(\"is the first one ancestor of the other?\")),\n \t\tOPT_END()\n \t};\n \ndiff --git a/builtin/merge-file.c b/builtin/merge-file.c\nindex c0570f2..844f84f 100644\n--- a/builtin/merge-file.c\n+++ b/builtin/merge-file.c\n@@ -30,7 +30,7 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)\n \tint quiet = 0;\n \tint prefixlen = 0;\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('p', \"stdout\", &to_stdout, N_(\"send results to standard output\")),\n+\t\tOPT_BOOL('p', \"stdout\", &to_stdout, N_(\"send results to standard output\")),\n \t\tOPT_SET_INT(0, \"diff3\", &xmp.style, N_(\"use a diff3 based merge\"), XDL_MERGE_DIFF3),\n \t\tOPT_SET_INT(0, \"ours\", &xmp.favor, N_(\"for conflicts, use our version\"),\n \t\t\t    XDL_MERGE_FAVOR_OURS),\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 34a6166..a8cf4a2 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -197,15 +197,15 @@ static struct option builtin_merge_options[] = {\n \t{ OPTION_CALLBACK, 'n', NULL, NULL, NULL,\n \t\tN_(\"do not show a diffstat at the end of the merge\"),\n \t\tPARSE_OPT_NOARG, option_parse_n },\n-\tOPT_BOOLEAN(0, \"stat\", &show_diffstat,\n+\tOPT_BOOL(0, \"stat\", &show_diffstat,\n \t\tN_(\"show a diffstat at the end of the merge\")),\n-\tOPT_BOOLEAN(0, \"summary\", &show_diffstat, N_(\"(synonym to --stat)\")),\n+\tOPT_BOOL(0, \"summary\", &show_diffstat, N_(\"(synonym to --stat)\")),\n \t{ OPTION_INTEGER, 0, \"log\", &shortlog_len, N_(\"n\"),\n \t  N_(\"add (at most <n>) entries from shortlog to merge commit message\"),\n \t  PARSE_OPT_OPTARG, NULL, DEFAULT_MERGE_LOG_LEN },\n-\tOPT_BOOLEAN(0, \"squash\", &squash,\n+\tOPT_BOOL(0, \"squash\", &squash,\n \t\tN_(\"create a single commit instead of doing a merge\")),\n-\tOPT_BOOLEAN(0, \"commit\", &option_commit,\n+\tOPT_BOOL(0, \"commit\", &option_commit,\n \t\tN_(\"perform a commit if the merge succeeds (default)\")),\n \tOPT_BOOL('e', \"edit\", &option_edit,\n \t\tN_(\"edit message before committing\")),\n@@ -224,12 +224,12 @@ static struct option builtin_merge_options[] = {\n \t\tN_(\"merge commit message (for a non-fast-forward merge)\"),\n \t\toption_parse_message),\n \tOPT__VERBOSITY(&verbosity),\n-\tOPT_BOOLEAN(0, \"abort\", &abort_current_merge,\n+\tOPT_BOOL(0, \"abort\", &abort_current_merge,\n \t\tN_(\"abort the current in-progress merge\")),\n \tOPT_SET_INT(0, \"progress\", &show_progress, N_(\"force progress reporting\"), 1),\n \t{ OPTION_STRING, 'S', \"gpg-sign\", &sign_commit, N_(\"key id\"),\n \t  N_(\"GPG sign commit\"), PARSE_OPT_OPTARG, NULL, (intptr_t) \"\" },\n-\tOPT_BOOLEAN(0, \"overwrite-ignore\", &overwrite_ignore, N_(\"update ignored files (default)\")),\n+\tOPT_BOOL(0, \"overwrite-ignore\", &overwrite_ignore, N_(\"update ignored files (default)\")),\n \tOPT_END()\n };\n \ndiff --git a/builtin/mv.c b/builtin/mv.c\nindex 034fec9..be6fa77 100644\n--- a/builtin/mv.c\n+++ b/builtin/mv.c\n@@ -62,7 +62,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \t\tOPT__VERBOSE(&verbose, N_(\"be verbose\")),\n \t\tOPT__DRY_RUN(&show_only, N_(\"dry run\")),\n \t\tOPT__FORCE(&force, N_(\"force move/rename even if target exists\")),\n-\t\tOPT_BOOLEAN('k', NULL, &ignore_errors, N_(\"skip move/rename errors\")),\n+\t\tOPT_BOOL('k', NULL, &ignore_errors, N_(\"skip move/rename errors\")),\n \t\tOPT_END(),\n \t};\n \tconst char **source, **destination, **dest_path;\ndiff --git a/builtin/name-rev.c b/builtin/name-rev.c\nindex 0aaa19e..a908a34 100644\n--- a/builtin/name-rev.c\n+++ b/builtin/name-rev.c\n@@ -310,15 +310,15 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)\n \tint all = 0, transform_stdin = 0, allow_undefined = 1, always = 0, peel_tag = 0;\n \tstruct name_ref_data data = { 0, 0, NULL };\n \tstruct option opts[] = {\n-\t\tOPT_BOOLEAN(0, \"name-only\", &data.name_only, N_(\"print only names (no SHA-1)\")),\n-\t\tOPT_BOOLEAN(0, \"tags\", &data.tags_only, N_(\"only use tags to name the commits\")),\n+\t\tOPT_BOOL(0, \"name-only\", &data.name_only, N_(\"print only names (no SHA-1)\")),\n+\t\tOPT_BOOL(0, \"tags\", &data.tags_only, N_(\"only use tags to name the commits\")),\n \t\tOPT_STRING(0, \"refs\", &data.ref_filter, N_(\"pattern\"),\n \t\t\t\t   N_(\"only use refs matching <pattern>\")),\n \t\tOPT_GROUP(\"\"),\n-\t\tOPT_BOOLEAN(0, \"all\", &all, N_(\"list all commits reachable from all refs\")),\n-\t\tOPT_BOOLEAN(0, \"stdin\", &transform_stdin, N_(\"read from stdin\")),\n-\t\tOPT_BOOLEAN(0, \"undefined\", &allow_undefined, N_(\"allow to print `undefined` names\")),\n-\t\tOPT_BOOLEAN(0, \"always\",     &always,\n+\t\tOPT_BOOL(0, \"all\", &all, N_(\"list all commits reachable from all refs\")),\n+\t\tOPT_BOOL(0, \"stdin\", &transform_stdin, N_(\"read from stdin\")),\n+\t\tOPT_BOOL(0, \"undefined\", &allow_undefined, N_(\"allow to print `undefined` names (default)\")),\n+\t\tOPT_BOOL(0, \"always\",     &always,\n \t\t\t   N_(\"show abbreviated commit object as fallback\")),\n \t\t{\n \t\t\t/* A Hidden OPT_BOOL */\ndiff --git a/builtin/notes.c b/builtin/notes.c\nindex 8f63cb2..d459e23 100644\n--- a/builtin/notes.c\n+++ b/builtin/notes.c\n@@ -483,7 +483,7 @@ static int copy(int argc, const char **argv, const char *prefix)\n \tconst char *rewrite_cmd = NULL;\n \tstruct option options[] = {\n \t\tOPT__FORCE(&force, N_(\"replace existing notes\")),\n-\t\tOPT_BOOLEAN(0, \"stdin\", &from_stdin, N_(\"read objects from stdin\")),\n+\t\tOPT_BOOL(0, \"stdin\", &from_stdin, N_(\"read objects from stdin\")),\n \t\tOPT_STRING(0, \"for-rewrite\", &rewrite_cmd, N_(\"command\"),\n \t\t\t   N_(\"load rewriting config for <command> (implies \"\n \t\t\t      \"--stdin)\")),\n@@ -853,7 +853,7 @@ static int remove_cmd(int argc, const char **argv, const char *prefix)\n \t\tOPT_BIT(0, \"ignore-missing\", &flag,\n \t\t\tN_(\"attempt to remove non-existent note is not an error\"),\n \t\t\tIGNORE_MISSING),\n-\t\tOPT_BOOLEAN(0, \"stdin\", &from_stdin,\n+\t\tOPT_BOOL(0, \"stdin\", &from_stdin,\n \t\t\t    N_(\"read object names from the standard input\")),\n \t\tOPT_END()\n \t};\ndiff --git a/builtin/push.c b/builtin/push.c\nindex 6d36c24..bebaf3d 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -446,15 +446,15 @@ int cmd_push(int argc, const char **argv, const char *prefix)\n \t\tOPT_BIT( 0 , \"all\", &flags, N_(\"push all refs\"), TRANSPORT_PUSH_ALL),\n \t\tOPT_BIT( 0 , \"mirror\", &flags, N_(\"mirror all refs\"),\n \t\t\t    (TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE)),\n-\t\tOPT_BOOLEAN( 0, \"delete\", &deleterefs, N_(\"delete refs\")),\n-\t\tOPT_BOOLEAN( 0 , \"tags\", &tags, N_(\"push tags (can't be used with --all or --mirror)\")),\n+\t\tOPT_BOOL( 0, \"delete\", &deleterefs, N_(\"delete refs\")),\n+\t\tOPT_BOOL( 0 , \"tags\", &tags, N_(\"push tags (can't be used with --all or --mirror)\")),\n \t\tOPT_BIT('n' , \"dry-run\", &flags, N_(\"dry run\"), TRANSPORT_PUSH_DRY_RUN),\n \t\tOPT_BIT( 0,  \"porcelain\", &flags, N_(\"machine-readable output\"), TRANSPORT_PUSH_PORCELAIN),\n \t\tOPT_BIT('f', \"force\", &flags, N_(\"force updates\"), TRANSPORT_PUSH_FORCE),\n \t\t{ OPTION_CALLBACK, 0, \"recurse-submodules\", &flags, N_(\"check\"),\n \t\t\tN_(\"control recursive pushing of submodules\"),\n \t\t\tPARSE_OPT_OPTARG, option_parse_recurse_submodules },\n-\t\tOPT_BOOLEAN( 0 , \"thin\", &thin, N_(\"use thin pack\")),\n+\t\tOPT_BOOL( 0 , \"thin\", &thin, N_(\"use thin pack\")),\n \t\tOPT_STRING( 0 , \"receive-pack\", &receivepack, \"receive-pack\", N_(\"receive pack program\")),\n \t\tOPT_STRING( 0 , \"exec\", &receivepack, \"receive-pack\", N_(\"receive pack program\")),\n \t\tOPT_BIT('u', \"set-upstream\", &flags, N_(\"set upstream for git pull/status\"),\ndiff --git a/builtin/remote.c b/builtin/remote.c\nindex 5e54d36..eaac3e2 100644\n--- a/builtin/remote.c\n+++ b/builtin/remote.c\n@@ -160,7 +160,7 @@ static int add(int argc, const char **argv)\n \tint i;\n \n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('f', \"fetch\", &fetch, N_(\"fetch the remote branches\")),\n+\t\tOPT_BOOL('f', \"fetch\", &fetch, N_(\"fetch the remote branches\")),\n \t\tOPT_SET_INT(0, \"tags\", &fetch_tags,\n \t\t\t    N_(\"import all tags and associated objects when fetching\"),\n \t\t\t    TAGS_SET),\n@@ -1088,7 +1088,7 @@ static int show(int argc, const char **argv)\n {\n \tint no_query = 0, result = 0, query_flag = 0;\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('n', NULL, &no_query, N_(\"do not query remotes\")),\n+\t\tOPT_BOOL('n', NULL, &no_query, N_(\"do not query remotes\")),\n \t\tOPT_END()\n \t};\n \tstruct ref_states states;\n@@ -1195,10 +1195,10 @@ static int set_head(int argc, const char **argv)\n \tchar *head_name = NULL;\n \n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('a', \"auto\", &opt_a,\n-\t\t\t    N_(\"set refs/remotes/<name>/HEAD according to remote\")),\n-\t\tOPT_BOOLEAN('d', \"delete\", &opt_d,\n-\t\t\t    N_(\"delete refs/remotes/<name>/HEAD\")),\n+\t\tOPT_BOOL('a', \"auto\", &opt_a,\n+\t\t\t N_(\"set refs/remotes/<name>/HEAD according to remote\")),\n+\t\tOPT_BOOL('d', \"delete\", &opt_d,\n+\t\t\t N_(\"delete refs/remotes/<name>/HEAD\")),\n \t\tOPT_END()\n \t};\n \targc = parse_options(argc, argv, NULL, options, builtin_remote_sethead_usage,\n@@ -1317,8 +1317,8 @@ static int update(int argc, const char **argv)\n {\n \tint i, prune = 0;\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('p', \"prune\", &prune,\n-\t\t\t    N_(\"prune remotes after fetching\")),\n+\t\tOPT_BOOL('p', \"prune\", &prune,\n+\t\t\t N_(\"prune remotes after fetching\")),\n \t\tOPT_END()\n \t};\n \tconst char **fetch_argv;\n@@ -1404,7 +1404,7 @@ static int set_branches(int argc, const char **argv)\n {\n \tint add_mode = 0;\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('\\0', \"add\", &add_mode, N_(\"add branch\")),\n+\t\tOPT_BOOL('\\0', \"add\", &add_mode, N_(\"add branch\")),\n \t\tOPT_END()\n \t};\n \n@@ -1432,11 +1432,11 @@ static int set_url(int argc, const char **argv)\n \tint urlset_nr;\n \tstruct strbuf name_buf = STRBUF_INIT;\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('\\0', \"push\", &push_mode,\n-\t\t\t    N_(\"manipulate push URLs\")),\n-\t\tOPT_BOOLEAN('\\0', \"add\", &add_mode,\n-\t\t\t    N_(\"add URL\")),\n-\t\tOPT_BOOLEAN('\\0', \"delete\", &delete_mode,\n+\t\tOPT_BOOL('\\0', \"push\", &push_mode,\n+\t\t\t N_(\"manipulate push URLs\")),\n+\t\tOPT_BOOL('\\0', \"add\", &add_mode,\n+\t\t\t N_(\"add URL\")),\n+\t\tOPT_BOOL('\\0', \"delete\", &delete_mode,\n \t\t\t    N_(\"delete URLs\")),\n \t\tOPT_END()\n \t};\ndiff --git a/builtin/replace.c b/builtin/replace.c\nindex 59d3115..11b0a55 100644\n--- a/builtin/replace.c\n+++ b/builtin/replace.c\n@@ -118,9 +118,9 @@ int cmd_replace(int argc, const char **argv, const char *prefix)\n {\n \tint list = 0, delete = 0, force = 0;\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('l', NULL, &list, N_(\"list replace refs\")),\n-\t\tOPT_BOOLEAN('d', NULL, &delete, N_(\"delete replace refs\")),\n-\t\tOPT_BOOLEAN('f', NULL, &force, N_(\"replace the ref if it exists\")),\n+\t\tOPT_BOOL('l', NULL, &list, N_(\"list replace refs\")),\n+\t\tOPT_BOOL('d', NULL, &delete, N_(\"delete replace refs\")),\n+\t\tOPT_BOOL('f', NULL, &force, N_(\"replace the ref if it exists\")),\n \t\tOPT_END()\n \t};\n \ndiff --git a/builtin/reset.c b/builtin/reset.c\nindex afa6e02..0905815 100644\n--- a/builtin/reset.c\n+++ b/builtin/reset.c\n@@ -258,7 +258,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)\n \t\t\t\tN_(\"reset HEAD, index and working tree\"), MERGE),\n \t\tOPT_SET_INT(0, \"keep\", &reset_type,\n \t\t\t\tN_(\"reset HEAD but keep local changes\"), KEEP),\n-\t\tOPT_BOOLEAN('p', \"patch\", &patch_mode, N_(\"select hunks interactively\")),\n+\t\tOPT_BOOL('p', \"patch\", &patch_mode, N_(\"select hunks interactively\")),\n \t\tOPT_END()\n \t};\n \ndiff --git a/builtin/rev-parse.c b/builtin/rev-parse.c\nindex de894c7..67e8ccf 100644\n--- a/builtin/rev-parse.c\n+++ b/builtin/rev-parse.c\n@@ -346,9 +346,9 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix)\n \t\tNULL\n \t};\n \tstatic struct option parseopt_opts[] = {\n-\t\tOPT_BOOLEAN(0, \"keep-dashdash\", &keep_dashdash,\n+\t\tOPT_BOOL(0, \"keep-dashdash\", &keep_dashdash,\n \t\t\t\t\tN_(\"keep the `--` passed as an arg\")),\n-\t\tOPT_BOOLEAN(0, \"stop-at-non-option\", &stop_at_non_option,\n+\t\tOPT_BOOL(0, \"stop-at-non-option\", &stop_at_non_option,\n \t\t\t\t\tN_(\"stop parsing after the \"\n \t\t\t\t\t   \"first non-option argument\")),\n \t\tOPT_END(),\ndiff --git a/builtin/rm.c b/builtin/rm.c\nindex 18916e0..ce28fa9 100644\n--- a/builtin/rm.c\n+++ b/builtin/rm.c\n@@ -268,10 +268,10 @@ static int ignore_unmatch = 0;\n static struct option builtin_rm_options[] = {\n \tOPT__DRY_RUN(&show_only, N_(\"dry run\")),\n \tOPT__QUIET(&quiet, N_(\"do not list removed files\")),\n-\tOPT_BOOLEAN( 0 , \"cached\",         &index_only, N_(\"only remove from the index\")),\n+\tOPT_BOOL( 0 , \"cached\",         &index_only, N_(\"only remove from the index\")),\n \tOPT__FORCE(&force, N_(\"override the up-to-date check\")),\n-\tOPT_BOOLEAN('r', NULL,             &recursive,  N_(\"allow recursive removal\")),\n-\tOPT_BOOLEAN( 0 , \"ignore-unmatch\", &ignore_unmatch,\n+\tOPT_BOOL('r', NULL,             &recursive,  N_(\"allow recursive removal\")),\n+\tOPT_BOOL( 0 , \"ignore-unmatch\", &ignore_unmatch,\n \t\t\t\tN_(\"exit with a zero status even if nothing matched\")),\n \tOPT_END(),\n };\ndiff --git a/builtin/shortlog.c b/builtin/shortlog.c\nindex 1434f8f..ae73d17 100644\n--- a/builtin/shortlog.c\n+++ b/builtin/shortlog.c\n@@ -224,12 +224,12 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix)\n \tint nongit = !startup_info->have_repository;\n \n \tstatic const struct option options[] = {\n-\t\tOPT_BOOLEAN('n', \"numbered\", &log.sort_by_number,\n-\t\t\t    N_(\"sort output according to the number of commits per author\")),\n-\t\tOPT_BOOLEAN('s', \"summary\", &log.summary,\n-\t\t\t    N_(\"Suppress commit descriptions, only provides commit count\")),\n-\t\tOPT_BOOLEAN('e', \"email\", &log.email,\n-\t\t\t    N_(\"Show the email address of each author\")),\n+\t\tOPT_BOOL('n', \"numbered\", &log.sort_by_number,\n+\t\t\t N_(\"sort output according to the number of commits per author\")),\n+\t\tOPT_BOOL('s', \"summary\", &log.summary,\n+\t\t\t N_(\"Suppress commit descriptions, only provides commit count\")),\n+\t\tOPT_BOOL('e', \"email\", &log.email,\n+\t\t\t N_(\"Show the email address of each author\")),\n \t\t{ OPTION_CALLBACK, 'w', NULL, &log, N_(\"w[,i1[,i2]]\"),\n \t\t\tN_(\"Linewrap output\"), PARSE_OPT_OPTARG, &parse_wrap_args },\n \t\tOPT_END(),\ndiff --git a/builtin/show-branch.c b/builtin/show-branch.c\nindex 9788eb1..001f29c 100644\n--- a/builtin/show-branch.c\n+++ b/builtin/show-branch.c\n@@ -646,30 +646,30 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)\n \tint dense = 1;\n \tconst char *reflog_base = NULL;\n \tstruct option builtin_show_branch_options[] = {\n-\t\tOPT_BOOLEAN('a', \"all\", &all_heads,\n-\t\t\t    N_(\"show remote-tracking and local branches\")),\n-\t\tOPT_BOOLEAN('r', \"remotes\", &all_remotes,\n-\t\t\t    N_(\"show remote-tracking branches\")),\n+\t\tOPT_BOOL('a', \"all\", &all_heads,\n+\t\t\t N_(\"show remote-tracking and local branches\")),\n+\t\tOPT_BOOL('r', \"remotes\", &all_remotes,\n+\t\t\t N_(\"show remote-tracking branches\")),\n \t\tOPT__COLOR(&showbranch_use_color,\n \t\t\t    N_(\"color '*!+-' corresponding to the branch\")),\n \t\t{ OPTION_INTEGER, 0, \"more\", &extra, N_(\"n\"),\n \t\t\t    N_(\"show <n> more commits after the common ancestor\"),\n \t\t\t    PARSE_OPT_OPTARG, NULL, (intptr_t)1 },\n \t\tOPT_SET_INT(0, \"list\", &extra, N_(\"synonym to more=-1\"), -1),\n-\t\tOPT_BOOLEAN(0, \"no-name\", &no_name, N_(\"suppress naming strings\")),\n-\t\tOPT_BOOLEAN(0, \"current\", &with_current_branch,\n-\t\t\t    N_(\"include the current branch\")),\n-\t\tOPT_BOOLEAN(0, \"sha1-name\", &sha1_name,\n-\t\t\t    N_(\"name commits with their object names\")),\n-\t\tOPT_BOOLEAN(0, \"merge-base\", &merge_base,\n-\t\t\t    N_(\"show possible merge bases\")),\n-\t\tOPT_BOOLEAN(0, \"independent\", &independent,\n+\t\tOPT_BOOL(0, \"no-name\", &no_name, N_(\"suppress naming strings\")),\n+\t\tOPT_BOOL(0, \"current\", &with_current_branch,\n+\t\t\t N_(\"include the current branch\")),\n+\t\tOPT_BOOL(0, \"sha1-name\", &sha1_name,\n+\t\t\t N_(\"name commits with their object names\")),\n+\t\tOPT_BOOL(0, \"merge-base\", &merge_base,\n+\t\t\t N_(\"show possible merge bases\")),\n+\t\tOPT_BOOL(0, \"independent\", &independent,\n \t\t\t    N_(\"show refs unreachable from any other ref\")),\n \t\tOPT_SET_INT(0, \"topo-order\", &sort_order,\n \t\t\t    N_(\"show commits in topological order\"),\n \t\t\t    REV_SORT_IN_GRAPH_ORDER),\n-\t\tOPT_BOOLEAN(0, \"topics\", &topics,\n-\t\t\t    N_(\"show only commits not on the first branch\")),\n+\t\tOPT_BOOL(0, \"topics\", &topics,\n+\t\t\t N_(\"show only commits not on the first branch\")),\n \t\tOPT_SET_INT(0, \"sparse\", &dense,\n \t\t\t    N_(\"show merges reachable from only one tip\"), 0),\n \t\tOPT_SET_INT(0, \"date-order\", &sort_order,\ndiff --git a/builtin/show-ref.c b/builtin/show-ref.c\nindex 18680bb..9f3f5e3 100644\n--- a/builtin/show-ref.c\n+++ b/builtin/show-ref.c\n@@ -165,15 +165,15 @@ static int help_callback(const struct option *opt, const char *arg, int unset)\n }\n \n static const struct option show_ref_options[] = {\n-\tOPT_BOOLEAN(0, \"tags\", &tags_only, N_(\"only show tags (can be combined with heads)\")),\n-\tOPT_BOOLEAN(0, \"heads\", &heads_only, N_(\"only show heads (can be combined with tags)\")),\n-\tOPT_BOOLEAN(0, \"verify\", &verify, N_(\"stricter reference checking, \"\n+\tOPT_BOOL(0, \"tags\", &tags_only, N_(\"only show tags (can be combined with heads)\")),\n+\tOPT_BOOL(0, \"heads\", &heads_only, N_(\"only show heads (can be combined with tags)\")),\n+\tOPT_BOOL(0, \"verify\", &verify, N_(\"stricter reference checking, \"\n \t\t    \"requires exact ref path\")),\n \tOPT_HIDDEN_BOOL('h', NULL, &show_head,\n \t\t\tN_(\"show the HEAD reference, even if it would be filtered out\")),\n-\tOPT_BOOLEAN(0, \"head\", &show_head,\n+\tOPT_BOOL(0, \"head\", &show_head,\n \t  N_(\"show the HEAD reference, even if it would be filtered out\")),\n-\tOPT_BOOLEAN('d', \"dereference\", &deref_tags,\n+\tOPT_BOOL('d', \"dereference\", &deref_tags,\n \t\t    N_(\"dereference tags into object IDs\")),\n \t{ OPTION_CALLBACK, 's', \"hash\", &abbrev, N_(\"n\"),\n \t  N_(\"only show SHA1 hash using <n> digits\"),\ndiff --git a/builtin/tag.c b/builtin/tag.c\nindex d8ae5aa..b577af5 100644\n--- a/builtin/tag.c\n+++ b/builtin/tag.c\n@@ -450,12 +450,12 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \t\tOPT_CMDMODE('v', \"verify\", &cmdmode, N_(\"verify tags\"), 'v'),\n \n \t\tOPT_GROUP(N_(\"Tag creation options\")),\n-\t\tOPT_BOOLEAN('a', \"annotate\", &annotate,\n+\t\tOPT_BOOL('a', \"annotate\", &annotate,\n \t\t\t\t\tN_(\"annotated tag, needs a message\")),\n \t\tOPT_CALLBACK('m', \"message\", &msg, N_(\"message\"),\n \t\t\t     N_(\"tag message\"), parse_msg_arg),\n \t\tOPT_FILENAME('F', \"file\", &msgfile, N_(\"read message from file\")),\n-\t\tOPT_BOOLEAN('s', \"sign\", &opt.sign, N_(\"annotated and GPG-signed tag\")),\n+\t\tOPT_BOOL('s', \"sign\", &opt.sign, N_(\"annotated and GPG-signed tag\")),\n \t\tOPT_STRING(0, \"cleanup\", &cleanup_arg, N_(\"mode\"),\n \t\t\tN_(\"how to strip spaces and #comments from message\")),\n \t\tOPT_STRING('u', \"local-user\", &keyid, N_(\"key id\"),\ndiff --git a/builtin/update-ref.c b/builtin/update-ref.c\nindex 51d2684..7484d36 100644\n--- a/builtin/update-ref.c\n+++ b/builtin/update-ref.c\n@@ -16,8 +16,8 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)\n \tint delete = 0, no_deref = 0, flags = 0;\n \tstruct option options[] = {\n \t\tOPT_STRING( 'm', NULL, &msg, N_(\"reason\"), N_(\"reason of the update\")),\n-\t\tOPT_BOOLEAN('d', NULL, &delete, N_(\"delete the reference\")),\n-\t\tOPT_BOOLEAN( 0 , \"no-deref\", &no_deref,\n+\t\tOPT_BOOL('d', NULL, &delete, N_(\"delete the reference\")),\n+\t\tOPT_BOOL( 0 , \"no-deref\", &no_deref,\n \t\t\t\t\tN_(\"update <refname> not the one it points to\")),\n \t\tOPT_END(),\n \t};\n-- \n1.8.4.rc0.1.g8f6a3e5\n"},{"id":"224359","messageId":"1375288117-1576-4-git-send-email-stefanbeller@googlemail.com","threadId":"34575","inReplyTo":"1375288117-1576-1-git-send-email-stefanbeller@googlemail.com","subject":"[PATCHv2 3/9] log, format-patch: parsing uses OPT__QUIET","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-07-31T16:28:31Z","receivedAt":"2013-07-31T16:28:31Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"This patch allows users to use the short form -q on\nlog and format-patch, which was non possible before.\n\nSigned-off-by: Stefan Beller <stefanbeller@googlemail.com>\n---\n builtin/log.c | 5 ++---\n 1 file changed, 2 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/log.c b/builtin/log.c\nindex 1dafbd0..ed4dec4 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -121,7 +121,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,\n \tstatic struct line_opt_callback_data line_cb = {NULL, NULL, STRING_LIST_INIT_DUP};\n \n \tconst struct option builtin_log_options[] = {\n-\t\tOPT_BOOL(0, \"quiet\", &quiet, N_(\"suppress diff output\")),\n+\t\tOPT__QUIET(&quiet, N_(\"suppress diff output\")),\n \t\tOPT_BOOL(0, \"source\", &source, N_(\"show source\")),\n \t\tOPT_BOOL(0, \"use-mailmap\", &mailmap, N_(\"Use mail map file\")),\n \t\t{ OPTION_CALLBACK, 0, \"decorate\", NULL, NULL, N_(\"decorate options\"),\n@@ -1210,8 +1210,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t\t\t    PARSE_OPT_OPTARG, thread_callback },\n \t\tOPT_STRING(0, \"signature\", &signature, N_(\"signature\"),\n \t\t\t    N_(\"add a signature\")),\n-\t\tOPT_BOOLEAN(0, \"quiet\", &quiet,\n-\t\t\t    N_(\"don't print the patch filenames\")),\n+\t\tOPT__QUIET(&quiet, N_(\"don't print the patch filenames\")),\n \t\tOPT_END()\n \t};\n \n-- \n1.8.4.rc0.1.g8f6a3e5\n"},{"id":"224353","messageId":"1375288117-1576-5-git-send-email-stefanbeller@googlemail.com","threadId":"34575","inReplyTo":"1375288117-1576-1-git-send-email-stefanbeller@googlemail.com","subject":"[PATCHv2 4/9] checkout: remove superfluous local variable","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-07-31T16:28:32Z","receivedAt":"2013-07-31T16:28:32Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>\n---\n builtin/checkout.c | 12 +++++-------\n 1 file changed, 5 insertions(+), 7 deletions(-)\n\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex 8b48f4a..ed39cec 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -228,8 +228,6 @@ static int checkout_paths(const struct checkout_opts *opts,\n \tint flag;\n \tstruct commit *head;\n \tint errs = 0;\n-\tint stage = opts->writeout_stage;\n-\tint merge = opts->merge;\n \tint newfd;\n \tstruct lock_file *lock_file;\n \n@@ -327,8 +325,8 @@ static int checkout_paths(const struct checkout_opts *opts,\n \t\t\t\tcontinue;\n \t\t\tif (opts->force) {\n \t\t\t\twarning(_(\"path '%s' is unmerged\"), ce->name);\n-\t\t\t} else if (stage) {\n-\t\t\t\terrs |= check_stage(stage, ce, pos);\n+\t\t\t} else if (opts->writeout_stage) {\n+\t\t\t\terrs |= check_stage(opts->writeout_stage, ce, pos);\n \t\t\t} else if (opts->merge) {\n \t\t\t\terrs |= check_stages((1<<2) | (1<<3), ce, pos);\n \t\t\t} else {\n@@ -352,9 +350,9 @@ static int checkout_paths(const struct checkout_opts *opts,\n \t\t\t\terrs |= checkout_entry(ce, &state, NULL);\n \t\t\t\tcontinue;\n \t\t\t}\n-\t\t\tif (stage)\n-\t\t\t\terrs |= checkout_stage(stage, ce, pos, &state);\n-\t\t\telse if (merge)\n+\t\t\tif (opts->writeout_stage)\n+\t\t\t\terrs |= checkout_stage(opts->writeout_stage, ce, pos, &state);\n+\t\t\telse if (opts->merge)\n \t\t\t\terrs |= checkout_merged(pos, &state);\n \t\t\tpos = skip_same_name(ce, pos) - 1;\n \t\t}\n-- \n1.8.4.rc0.1.g8f6a3e5\n"},{"id":"224356","messageId":"1375288117-1576-6-git-send-email-stefanbeller@googlemail.com","threadId":"34575","inReplyTo":"1375288117-1576-1-git-send-email-stefanbeller@googlemail.com","subject":"[PATCHv2 5/9] branch, commit, name-rev: ease up boolean conditions","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-07-31T16:28:33Z","receivedAt":"2013-07-31T16:28:33Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"Now that the variables are readin by OPT_BOOL, which makes sure\nto have the values being 0 or 1 after reading, we do not need\nthe double negation to map any other value to 1 for integer\nvariables.\n\nSigned-off-by: Stefan Beller <stefanbeller@googlemail.com>\n---\n builtin/branch.c   | 3 ++-\n builtin/commit.c   | 2 +-\n builtin/name-rev.c | 2 +-\n 3 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex 4daed0b..33ba1fb 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -872,7 +872,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \tif (with_commit || merge_filter != NO_FILTER)\n \t\tlist = 1;\n \n-\tif (!!delete + !!rename + !!force_create + !!list + !!new_upstream + !!unset_upstream > 1)\n+\tif (delete + rename + force_create + list + unset_upstream +\n+\t    !!new_upstream > 1)\n \t\tusage_with_options(builtin_branch_usage, options);\n \n \tif (abbrev == -1)\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex c20426b..b0f86c8 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -1072,7 +1072,7 @@ static int parse_and_validate_options(int argc, const char *argv[],\n \tif (patch_interactive)\n \t\tinteractive = 1;\n \n-\tif (!!also + !!only + !!all + !!interactive > 1)\n+\tif (also + only + all + interactive > 1)\n \t\tdie(_(\"Only one of --include/--only/--all/--interactive/--patch can be used.\"));\n \tif (argc == 0 && (also || (only && !amend)))\n \t\tdie(_(\"No paths with --include/--only does not make sense.\"));\ndiff --git a/builtin/name-rev.c b/builtin/name-rev.c\nindex a908a34..20fcf8c 100644\n--- a/builtin/name-rev.c\n+++ b/builtin/name-rev.c\n@@ -331,7 +331,7 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)\n \n \tgit_config(git_default_config, NULL);\n \targc = parse_options(argc, argv, prefix, opts, name_rev_usage, 0);\n-\tif (!!all + !!transform_stdin + !!argc > 1) {\n+\tif (all + transform_stdin + !!argc > 1) {\n \t\terror(\"Specify either a list, or --all, not both!\");\n \t\tusage_with_options(name_rev_usage, opts);\n \t}\n-- \n1.8.4.rc0.1.g8f6a3e5\n"},{"id":"224355","messageId":"1375288117-1576-7-git-send-email-stefanbeller@googlemail.com","threadId":"34575","inReplyTo":"1375288117-1576-1-git-send-email-stefanbeller@googlemail.com","subject":"[PATCHv2 6/9] hash-object: Replace stdin parsing OPT_BOOLEAN by OPT_COUNTUP","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-07-31T16:28:34Z","receivedAt":"2013-07-31T16:28:34Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"This task emerged from b04ba2bb (parse-options: deprecate OPT_BOOLEAN,\n2011-09-27). hash-object is a plumbing layer command, so better\nnot change the input/output behavior for now.\n\nUnfortunately we have these lines relying on the count up mechanism of\nOPT_BOOLEAN:\n\n\tif (hashstdin > 1)\n\t\terrstr = \"Multiple --stdin arguments are not supported\";\n\nMaybe later, when the plumbing is refined (git 2.0?) we can drop that\nerrormessage and replace the OPT_COUNTUP by OPT_BOOL.\n\nSigned-off-by: Stefan Beller <stefanbeller@googlemail.com>\n---\n builtin/hash-object.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/hash-object.c b/builtin/hash-object.c\nindex 4aea5bb..d7fcf4c 100644\n--- a/builtin/hash-object.c\n+++ b/builtin/hash-object.c\n@@ -71,7 +71,7 @@ static const char *vpath;\n static const struct option hash_object_options[] = {\n \tOPT_STRING('t', NULL, &type, N_(\"type\"), N_(\"object type\")),\n \tOPT_BOOL('w', NULL, &write_object, N_(\"write the object into the object database\")),\n-\tOPT_BOOLEAN( 0 , \"stdin\", &hashstdin, N_(\"read the object from stdin\")),\n+\tOPT_COUNTUP( 0 , \"stdin\", &hashstdin, N_(\"read the object from stdin\")),\n \tOPT_BOOL( 0 , \"stdin-paths\", &stdin_paths, N_(\"read file names from stdin\")),\n \tOPT_BOOL( 0 , \"no-filters\", &no_filters, N_(\"store file as is without filters\")),\n \tOPT_STRING( 0 , \"path\", &vpath, N_(\"file\"), N_(\"process file as it were from this path\")),\n-- \n1.8.4.rc0.1.g8f6a3e5\n"},{"id":"224354","messageId":"1375288117-1576-8-git-send-email-stefanbeller@googlemail.com","threadId":"34575","inReplyTo":"1375288117-1576-1-git-send-email-stefanbeller@googlemail.com","subject":"[PATCHv2 7/9] config: parsing options: config file flag multiple times","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-07-31T16:28:35Z","receivedAt":"2013-07-31T16:28:35Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"This task emerged from b04ba2bb (parse-options: deprecate OPT_BOOLEAN,\n2011-09-27).\n\nThis commit introduces a change for the users, after this patch\nyou can pass one of the config level flags multiple times:\nBefore:\n\t$ git config --global --global --list\n\terror: only one config file at a time.\n\tusage: ...\n\nAfterwards this will work. This is due to the following check in the code:\n\tif (use_global_config + use_system_config + use_local_config +\n\t    !!given_config_file + !!given_config_blob > 1) {\n\t\terror(\"only one config file at a time.\");\n\t\tusage_with_options(builtin_config_usage, builtin_config_options);\n\t}\n\nWith OPT_BOOL instead of OPT_BOOLEAN the variables use_global_config,\nuse_system_config, use_local_config will only have the value 0 if the\ncommand line option was not passed or 1 no matter how often the\nrespective command line option was passed.\n\nSigned-off-by: Stefan Beller <stefanbeller@googlemail.com>\n---\n builtin/config.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/config.c b/builtin/config.c\nindex da12fdb..4ab9e9a 100644\n--- a/builtin/config.c\n+++ b/builtin/config.c\n@@ -50,9 +50,9 @@ static int respect_includes = -1;\n \n static struct option builtin_config_options[] = {\n \tOPT_GROUP(N_(\"Config file location\")),\n-\tOPT_BOOLEAN(0, \"global\", &use_global_config, N_(\"use global config file\")),\n-\tOPT_BOOLEAN(0, \"system\", &use_system_config, N_(\"use system config file\")),\n-\tOPT_BOOLEAN(0, \"local\", &use_local_config, N_(\"use repository config file\")),\n+\tOPT_BOOL(0, \"global\", &use_global_config, N_(\"use global config file\")),\n+\tOPT_BOOL(0, \"system\", &use_system_config, N_(\"use system config file\")),\n+\tOPT_BOOL(0, \"local\", &use_local_config, N_(\"use repository config file\")),\n \tOPT_STRING('f', \"file\", &given_config_file, N_(\"file\"), N_(\"use given config file\")),\n \tOPT_STRING(0, \"blob\", &given_config_blob, N_(\"blob-id\"), N_(\"read config from given blob object\")),\n \tOPT_GROUP(N_(\"Action\")),\n-- \n1.8.4.rc0.1.g8f6a3e5\n"},{"id":"224357","messageId":"1375288117-1576-9-git-send-email-stefanbeller@googlemail.com","threadId":"34575","inReplyTo":"1375288117-1576-1-git-send-email-stefanbeller@googlemail.com","subject":"[PATCHv2 8/9] checkout-index: Fix negations of even numbers of -n","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-07-31T16:28:36Z","receivedAt":"2013-07-31T16:28:36Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"The --no-create was parsed with OPT_BOOLEAN, which has a counting up\nlogic implemented. Since b04ba2bb (parse-options: deprecate OPT_BOOLEAN,\n2011-09-27) the OPT_BOOLEAN is deprecated and is only a define:\n\t/* Deprecated synonym */\n\t#define OPTION_BOOLEAN OPTION_COUNTUP\n\nHowever the variable not_new, which can be counted up by giving multiple\n--no-create multiple times, is used to set a bit in the struct checkout\nbitfield (defined in cache.h:969, declared at builtin/checkout-index.c:19):\n\n\tstate.not_new = not_new;\n\nWhen assigning a value other than 0 or 1 to a bit, all leading digits but\nthe last are ignored and only the last bit is used for setting the bit\nvariable.\n\nHence the following:\n\t# in git.git:\n\t$ git status\n\t# working directory clean\n\trm COPYING\n\t$ git status\n\t# deleted:    COPYING\n\t$ git checkout-index -a -n\n\t# deleted:    COPYING\n\t# which is expected as we're telling git to not restore or create\n\t# files, however:\n\t$ git checkout-index -a -n -n\n\t$ git status\n\t# working directory clean, COPYING is restored again!\n\t# That's the bug, we're fixing here.\n\nBy restraining the variable not_new to a value being definitely 0 or 1\nby the macro OPT_BOOL the bug is fixed.\n\nSigned-off-by: Stefan Beller <stefanbeller@googlemail.com>\n---\n builtin/checkout-index.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/checkout-index.c b/builtin/checkout-index.c\nindex aa922ed..69e167b 100644\n--- a/builtin/checkout-index.c\n+++ b/builtin/checkout-index.c\n@@ -188,7 +188,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)\n \t\tOPT__FORCE(&force, N_(\"force overwrite of existing files\")),\n \t\tOPT__QUIET(&quiet,\n \t\t\tN_(\"no warning for existing files and files not in index\")),\n-\t\tOPT_BOOLEAN('n', \"no-create\", &not_new,\n+\t\tOPT_BOOL('n', \"no-create\", &not_new,\n \t\t\tN_(\"don't checkout new files\")),\n \t\t{ OPTION_CALLBACK, 'u', \"index\", &newfd, NULL,\n \t\t\tN_(\"update stat information in the index file\"),\n-- \n1.8.4.rc0.1.g8f6a3e5\n"},{"id":"224358","messageId":"1375288117-1576-10-git-send-email-stefanbeller@googlemail.com","threadId":"34575","inReplyTo":"1375288117-1576-1-git-send-email-stefanbeller@googlemail.com","subject":"[PATCHv2 9/9] revert: use the OPT_CMDMODE for parsing, reducing code","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-07-31T16:28:37Z","receivedAt":"2013-07-31T16:28:37Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"The revert command comes with their own implementation of checking\nfor exclusiveness of parameters.\nNow that the OPT_CMDMODE is in place, we can also rely on that macro\ninstead of cooking that solution for each command itself.\n\nThis commit also replaces OPT_BOOLEAN, which was deprecated by b04ba2bb\n(parse-options: deprecate OPT_BOOLEAN, 2011-09-27). Instead OPT_BOOL is\nused.\n\nSigned-off-by: Stefan Beller <stefanbeller@googlemail.com>\n---\n builtin/revert.c | 62 ++++++++++++++------------------------------------------\n 1 file changed, 15 insertions(+), 47 deletions(-)\n\ndiff --git a/builtin/revert.c b/builtin/revert.c\nindex 1d2648b..8e87acd 100644\n--- a/builtin/revert.c\n+++ b/builtin/revert.c\n@@ -71,44 +71,19 @@ static void verify_opt_compatible(const char *me, const char *base_opt, ...)\n \t\tdie(_(\"%s: %s cannot be used with %s\"), me, this_opt, base_opt);\n }\n \n-LAST_ARG_MUST_BE_NULL\n-static void verify_opt_mutually_compatible(const char *me, ...)\n-{\n-\tconst char *opt1, *opt2 = NULL;\n-\tva_list ap;\n-\n-\tva_start(ap, me);\n-\twhile ((opt1 = va_arg(ap, const char *))) {\n-\t\tif (va_arg(ap, int))\n-\t\t\tbreak;\n-\t}\n-\tif (opt1) {\n-\t\twhile ((opt2 = va_arg(ap, const char *))) {\n-\t\t\tif (va_arg(ap, int))\n-\t\t\t\tbreak;\n-\t\t}\n-\t}\n-\tva_end(ap);\n-\n-\tif (opt1 && opt2)\n-\t\tdie(_(\"%s: %s cannot be used with %s\"),\tme, opt1, opt2);\n-}\n-\n static void parse_args(int argc, const char **argv, struct replay_opts *opts)\n {\n \tconst char * const * usage_str = revert_or_cherry_pick_usage(opts);\n \tconst char *me = action_name(opts);\n-\tint remove_state = 0;\n-\tint contin = 0;\n-\tint rollback = 0;\n+\tint cmd = 0;\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN(0, \"quit\", &remove_state, N_(\"end revert or cherry-pick sequence\")),\n-\t\tOPT_BOOLEAN(0, \"continue\", &contin, N_(\"resume revert or cherry-pick sequence\")),\n-\t\tOPT_BOOLEAN(0, \"abort\", &rollback, N_(\"cancel revert or cherry-pick sequence\")),\n-\t\tOPT_BOOLEAN('n', \"no-commit\", &opts->no_commit, N_(\"don't automatically commit\")),\n-\t\tOPT_BOOLEAN('e', \"edit\", &opts->edit, N_(\"edit the commit message\")),\n+\t\tOPT_CMDMODE(0, \"quit\", &cmd, N_(\"end revert or cherry-pick sequence\"), 'q'),\n+\t\tOPT_CMDMODE(0, \"continue\", &cmd, N_(\"resume revert or cherry-pick sequence\"), 'c'),\n+\t\tOPT_CMDMODE(0, \"abort\", &cmd, N_(\"cancel revert or cherry-pick sequence\"), 'a'),\n+\t\tOPT_BOOL('n', \"no-commit\", &opts->no_commit, N_(\"don't automatically commit\")),\n+\t\tOPT_BOOL('e', \"edit\", &opts->edit, N_(\"edit the commit message\")),\n \t\tOPT_NOOP_NOARG('r', NULL),\n-\t\tOPT_BOOLEAN('s', \"signoff\", &opts->signoff, N_(\"add Signed-off-by:\")),\n+\t\tOPT_BOOL('s', \"signoff\", &opts->signoff, N_(\"add Signed-off-by:\")),\n \t\tOPT_INTEGER('m', \"mainline\", &opts->mainline, N_(\"parent number\")),\n \t\tOPT_RERERE_AUTOUPDATE(&opts->allow_rerere_auto),\n \t\tOPT_STRING(0, \"strategy\", &opts->strategy, N_(\"strategy\"), N_(\"merge strategy\")),\n@@ -124,11 +99,11 @@ static void parse_args(int argc, const char **argv, struct replay_opts *opts)\n \n \tif (opts->action == REPLAY_PICK) {\n \t\tstruct option cp_extra[] = {\n-\t\t\tOPT_BOOLEAN('x', NULL, &opts->record_origin, N_(\"append commit name\")),\n-\t\t\tOPT_BOOLEAN(0, \"ff\", &opts->allow_ff, N_(\"allow fast-forward\")),\n-\t\t\tOPT_BOOLEAN(0, \"allow-empty\", &opts->allow_empty, N_(\"preserve initially empty commits\")),\n-\t\t\tOPT_BOOLEAN(0, \"allow-empty-message\", &opts->allow_empty_message, N_(\"allow commits with empty messages\")),\n-\t\t\tOPT_BOOLEAN(0, \"keep-redundant-commits\", &opts->keep_redundant_commits, N_(\"keep redundant, empty commits\")),\n+\t\t\tOPT_BOOL('x', NULL, &opts->record_origin, N_(\"append commit name\")),\n+\t\t\tOPT_BOOL(0, \"ff\", &opts->allow_ff, N_(\"allow fast-forward\")),\n+\t\t\tOPT_BOOL(0, \"allow-empty\", &opts->allow_empty, N_(\"preserve initially empty commits\")),\n+\t\t\tOPT_BOOL(0, \"allow-empty-message\", &opts->allow_empty_message, N_(\"allow commits with empty messages\")),\n+\t\t\tOPT_BOOL(0, \"keep-redundant-commits\", &opts->keep_redundant_commits, N_(\"keep redundant, empty commits\")),\n \t\t\tOPT_END(),\n \t\t};\n \t\tif (parse_options_concat(options, ARRAY_SIZE(options), cp_extra))\n@@ -139,23 +114,16 @@ static void parse_args(int argc, const char **argv, struct replay_opts *opts)\n \t\t\tPARSE_OPT_KEEP_ARGV0 |\n \t\t\tPARSE_OPT_KEEP_UNKNOWN);\n \n-\t/* Check for incompatible subcommands */\n-\tverify_opt_mutually_compatible(me,\n-\t\t\t\t\"--quit\", remove_state,\n-\t\t\t\t\"--continue\", contin,\n-\t\t\t\t\"--abort\", rollback,\n-\t\t\t\tNULL);\n-\n \t/* implies allow_empty */\n \tif (opts->keep_redundant_commits)\n \t\topts->allow_empty = 1;\n \n \t/* Set the subcommand */\n-\tif (remove_state)\n+\tif (cmd == 'q')\n \t\topts->subcommand = REPLAY_REMOVE_STATE;\n-\telse if (contin)\n+\telse if (cmd == 'c')\n \t\topts->subcommand = REPLAY_CONTINUE;\n-\telse if (rollback)\n+\telse if (cmd == 'a')\n \t\topts->subcommand = REPLAY_ROLLBACK;\n \telse\n \t\topts->subcommand = REPLAY_NONE;\n-- \n1.8.4.rc0.1.g8f6a3e5\n"},{"id":"224366","messageId":"CAPig+cSazYJDP40zqkr47iuJ925bH-eFEjp2kzb_D3efgqggNw@mail.gmail.com","threadId":"34575","inReplyTo":"1375288117-1576-4-git-send-email-stefanbeller@googlemail.com","subject":"Re: [PATCHv2 3/9] log, format-patch: parsing uses OPT__QUIET","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2013-07-31T17:08:48Z","receivedAt":"2013-07-31T17:08:48Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Jul 31, 2013 at 12:28 PM, Stefan Beller\n<stefanbeller@googlemail.com> wrote:\n> This patch allows users to use the short form -q on\n> log and format-patch, which was non possible before.\n\nIt would make sense for documentation updates to accompany these changes.\n\n> Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>\n> ---\n>  builtin/log.c | 5 ++---\n>  1 file changed, 2 insertions(+), 3 deletions(-)\n>\n> diff --git a/builtin/log.c b/builtin/log.c\n> index 1dafbd0..ed4dec4 100644\n> --- a/builtin/log.c\n> +++ b/builtin/log.c\n> @@ -121,7 +121,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,\n>         static struct line_opt_callback_data line_cb = {NULL, NULL, STRING_LIST_INIT_DUP};\n>\n>         const struct option builtin_log_options[] = {\n> -               OPT_BOOL(0, \"quiet\", &quiet, N_(\"suppress diff output\")),\n> +               OPT__QUIET(&quiet, N_(\"suppress diff output\")),\n>                 OPT_BOOL(0, \"source\", &source, N_(\"show source\")),\n>                 OPT_BOOL(0, \"use-mailmap\", &mailmap, N_(\"Use mail map file\")),\n>                 { OPTION_CALLBACK, 0, \"decorate\", NULL, NULL, N_(\"decorate options\"),\n> @@ -1210,8 +1210,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n>                             PARSE_OPT_OPTARG, thread_callback },\n>                 OPT_STRING(0, \"signature\", &signature, N_(\"signature\"),\n>                             N_(\"add a signature\")),\n> -               OPT_BOOLEAN(0, \"quiet\", &quiet,\n> -                           N_(\"don't print the patch filenames\")),\n> +               OPT__QUIET(&quiet, N_(\"don't print the patch filenames\")),\n>                 OPT_END()\n>         };\n>\n> --\n> 1.8.4.rc0.1.g8f6a3e5\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"224367","messageId":"CAPig+cSHmZcov5NRxkvRhdqB0XB72LW+K04f4ayfMq2VZrb8CA@mail.gmail.com","threadId":"34575","inReplyTo":"1375288117-1576-7-git-send-email-stefanbeller@googlemail.com","subject":"Re: [PATCHv2 6/9] hash-object: Replace stdin parsing OPT_BOOLEAN by OPT_COUNTUP","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2013-07-31T17:12:56Z","receivedAt":"2013-07-31T17:12:56Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Jul 31, 2013 at 12:28 PM, Stefan Beller\n<stefanbeller@googlemail.com> wrote:\n> This task emerged from b04ba2bb (parse-options: deprecate OPT_BOOLEAN,\n> 2011-09-27). hash-object is a plumbing layer command, so better\n> not change the input/output behavior for now.\n>\n> Unfortunately we have these lines relying on the count up mechanism of\n> OPT_BOOLEAN:\n>\n>         if (hashstdin > 1)\n>                 errstr = \"Multiple --stdin arguments are not supported\";\n>\n> Maybe later, when the plumbing is refined (git 2.0?) we can drop that\n> errormessage and replace the OPT_COUNTUP by OPT_BOOL.\n\ns/errormessage/error message/\n\n> Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>\n"},{"id":"224368","messageId":"CAPig+cTQV=2OFg_4OSFzkYWE8Uxz0ErWgXKOoV6mUWEMT65F4w@mail.gmail.com","threadId":"34575","inReplyTo":"1375288117-1576-9-git-send-email-stefanbeller@googlemail.com","subject":"Re: [PATCHv2 8/9] checkout-index: Fix negations of even numbers of -n","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2013-07-31T17:16:39Z","receivedAt":"2013-07-31T17:16:39Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Jul 31, 2013 at 12:28 PM, Stefan Beller\n<stefanbeller@googlemail.com> wrote:\n> The --no-create was parsed with OPT_BOOLEAN, which has a counting up\n> logic implemented. Since b04ba2bb (parse-options: deprecate OPT_BOOLEAN,\n> 2011-09-27) the OPT_BOOLEAN is deprecated and is only a define:\n>         /* Deprecated synonym */\n>         #define OPTION_BOOLEAN OPTION_COUNTUP\n>\n> However the variable not_new, which can be counted up by giving multiple\n> --no-create multiple times, is used to set a bit in the struct checkout\n\ns/multiple --no-create multiple times/--no-create multiple times/\n\n> bitfield (defined in cache.h:969, declared at builtin/checkout-index.c:19):\n>\n>         state.not_new = not_new;\n>\n> When assigning a value other than 0 or 1 to a bit, all leading digits but\n> the last are ignored and only the last bit is used for setting the bit\n> variable.\n>\n> Hence the following:\n>         # in git.git:\n>         $ git status\n>         # working directory clean\n>         rm COPYING\n>         $ git status\n>         # deleted:    COPYING\n>         $ git checkout-index -a -n\n>         # deleted:    COPYING\n>         # which is expected as we're telling git to not restore or create\n>         # files, however:\n>         $ git checkout-index -a -n -n\n>         $ git status\n>         # working directory clean, COPYING is restored again!\n>         # That's the bug, we're fixing here.\n>\n> By restraining the variable not_new to a value being definitely 0 or 1\n> by the macro OPT_BOOL the bug is fixed.\n>\n> Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>\n"},{"id":"224369","messageId":"CAPig+cTfDnQEt72ON1g+T9UpHt9drJ8OmbuszPt4uU49Gj2Bow@mail.gmail.com","threadId":"34575","inReplyTo":"1375288117-1576-9-git-send-email-stefanbeller@googlemail.com","subject":"Re: [PATCHv2 8/9] checkout-index: Fix negations of even numbers of -n","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2013-07-31T17:21:48Z","receivedAt":"2013-07-31T17:21:48Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Jul 31, 2013 at 12:28 PM, Stefan Beller\n<stefanbeller@googlemail.com> wrote:\n> The --no-create was parsed with OPT_BOOLEAN, which has a counting up\n> logic implemented. Since b04ba2bb (parse-options: deprecate OPT_BOOLEAN,\n> 2011-09-27) the OPT_BOOLEAN is deprecated and is only a define:\n>         /* Deprecated synonym */\n>         #define OPTION_BOOLEAN OPTION_COUNTUP\n>\n> However the variable not_new, which can be counted up by giving multiple\n> --no-create multiple times, is used to set a bit in the struct checkout\n> bitfield (defined in cache.h:969, declared at builtin/checkout-index.c:19):\n>\n>         state.not_new = not_new;\n>\n> When assigning a value other than 0 or 1 to a bit, all leading digits but\n> the last are ignored and only the last bit is used for setting the bit\n> variable.\n>\n> Hence the following:\n>         # in git.git:\n>         $ git status\n>         # working directory clean\n>         rm COPYING\n>         $ git status\n>         # deleted:    COPYING\n>         $ git checkout-index -a -n\n\nMissing \"$ git status\" at this point in example.\n\n>         # deleted:    COPYING\n>         # which is expected as we're telling git to not restore or create\n>         # files, however:\n>         $ git checkout-index -a -n -n\n>         $ git status\n>         # working directory clean, COPYING is restored again!\n>         # That's the bug, we're fixing here.\n>\n> By restraining the variable not_new to a value being definitely 0 or 1\n> by the macro OPT_BOOL the bug is fixed.\n>\n> Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>\n"}]}