{"thread":{"id":"25675","subject":"[PATCH 0/7] add description parameter to standard option macros","startedAt":"2010-11-08T17:53:27Z","lastAt":"2010-11-08T21:06:42Z","messageCount":12,"participants":["René Scharfe","Jeff King","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":7},"messages":[{"id":"155394","messageId":"4CD83917.3040801@lsrfire.ath.cx","threadId":"25675","inReplyTo":null,"subject":"[PATCH 0/7] add description parameter to standard option macros","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-11-08T17:53:27Z","receivedAt":"2010-11-08T17:53:27Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"This patch series is meant to improve the command line help texts\nfor standard options.\n\nThe first three patches add a description parameter to three helper\nmacros.  This allows command specific help texts to be defined for them\ninstead of enforcing ones that just repeat the option name.\n\n\t[PATCH 1/7] add description parameter to OPT__VERBOSE\n\t[PATCH 2/7] add description parameter to OPT__DRY_RUN\n\t[PATCH 3/7] add description parameter to OPT__QUIET\n\nThe next patch adds a similar helper macro for -f/--force.  It makes\nit easier to define such an option in a consistent way.\n\n\t[PATCH 4/7] add OPT__FORCE\n\nThe last three patches depend on the first one and replace the standard\nhelp text with a (hopefully) better explanation.\n\n\t[PATCH 5/7] archive: improve --verbose description\n\t[PATCH 6/7] branch: improve --verbose description\n\t[PATCH 7/7] verify-tag: document --verbose\n\nFurther patches to improve the remaining occurrences of \"be verbose\"\netc. are encouraged. :-)\n\n Documentation/git-verify-tag.txt              |    4 ++++\n Documentation/technical/api-parse-options.txt |    9 ++++++---\n archive.c                                     |    2 +-\n builtin/add.c                                 |    6 +++---\n builtin/apply.c                               |    2 +-\n builtin/branch.c                              |    5 +++--\n builtin/checkout-index.c                      |    5 ++---\n builtin/checkout.c                            |    4 ++--\n builtin/clean.c                               |    6 +++---\n builtin/commit.c                              |    6 +++---\n builtin/count-objects.c                       |    2 +-\n builtin/fetch.c                               |    3 +--\n builtin/fsck.c                                |    2 +-\n builtin/gc.c                                  |    2 +-\n builtin/grep.c                                |    4 ++--\n builtin/log.c                                 |    2 +-\n builtin/merge-file.c                          |    2 +-\n builtin/mv.c                                  |    4 ++--\n builtin/notes.c                               |    9 ++++-----\n builtin/prune.c                               |    5 ++---\n builtin/read-tree.c                           |    2 +-\n builtin/remote.c                              |    4 ++--\n builtin/reset.c                               |    2 +-\n builtin/rm.c                                  |    6 +++---\n builtin/show-ref.c                            |    2 +-\n builtin/symbolic-ref.c                        |    2 +-\n builtin/tag.c                                 |    2 +-\n builtin/update-server-info.c                  |    3 +--\n builtin/verify-tag.c                          |    2 +-\n parse-options.h                               |    7 ++++---\n test-parse-options.c                          |    6 +++---\n test-sha1.sh                                  |   14 ++++++++------\n 32 files changed, 71 insertions(+), 65 deletions(-)\n"},{"id":"155396","messageId":"4CD83A5B.1010601@lsrfire.ath.cx","threadId":"25675","inReplyTo":"4CD83917.3040801@lsrfire.ath.cx","subject":"[PATCH 2/7] add description parameter to OPT__DRY_RUN","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-11-08T17:58:51Z","receivedAt":"2010-11-08T17:58:51Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Allows better help text to be defined than \"dry run\".  Also make use\nof the macro in places that already had a different description.  No\nobject code changes intended.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n Documentation/technical/api-parse-options.txt |    2 +-\n builtin/add.c                                 |    2 +-\n builtin/clean.c                               |    2 +-\n builtin/mv.c                                  |    2 +-\n builtin/notes.c                               |    3 +--\n builtin/prune.c                               |    3 +--\n builtin/remote.c                              |    2 +-\n builtin/rm.c                                  |    2 +-\n parse-options.h                               |    2 +-\n test-parse-options.c                          |    2 +-\n 10 files changed, 10 insertions(+), 12 deletions(-)\n\ndiff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt\nindex 969489b..00c447c 100644\n--- a/Documentation/technical/api-parse-options.txt\n+++ b/Documentation/technical/api-parse-options.txt\n@@ -118,7 +118,7 @@ There are some macros to easily define options:\n `OPT__COLOR(&int_var, description)`::\n \tAdd `\\--color[=<when>]` and `--no-color`.\n \n-`OPT__DRY_RUN(&int_var)`::\n+`OPT__DRY_RUN(&int_var, description)`::\n \tAdd `-n, \\--dry-run`.\n \n `OPT__QUIET(&int_var)`::\ndiff --git a/builtin/add.c b/builtin/add.c\nindex fbf1403..9625cee 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -313,7 +313,7 @@ static int verbose = 0, show_only = 0, ignored_too = 0, refresh_only = 0;\n static int ignore_add_errors, addremove, intent_to_add, ignore_missing = 0;\n \n static struct option builtin_add_options[] = {\n-\tOPT__DRY_RUN(&show_only),\n+\tOPT__DRY_RUN(&show_only, \"dry run\"),\n \tOPT__VERBOSE(&verbose, \"be verbose\"),\n \tOPT_GROUP(\"\"),\n \tOPT_BOOLEAN('i', \"interactive\", &add_interactive, \"interactive picking\"),\ndiff --git a/builtin/clean.c b/builtin/clean.c\nindex c8798f5..17ecbe6 100644\n--- a/builtin/clean.c\n+++ b/builtin/clean.c\n@@ -49,7 +49,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)\n \tchar *seen = NULL;\n \tstruct option options[] = {\n \t\tOPT__QUIET(&quiet),\n-\t\tOPT__DRY_RUN(&show_only),\n+\t\tOPT__DRY_RUN(&show_only, \"dry run\"),\n \t\tOPT_BOOLEAN('f', \"force\", &force, \"force\"),\n \t\tOPT_BOOLEAN('d', NULL, &remove_directories,\n \t\t\t\t\"remove whole directories\"),\ndiff --git a/builtin/mv.c b/builtin/mv.c\nindex cdbb094..8677bd2 100644\n--- a/builtin/mv.c\n+++ b/builtin/mv.c\n@@ -55,7 +55,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \tint i, newfd;\n \tint verbose = 0, show_only = 0, force = 0, ignore_errors = 0;\n \tstruct option builtin_mv_options[] = {\n-\t\tOPT__DRY_RUN(&show_only),\n+\t\tOPT__DRY_RUN(&show_only, \"dry run\"),\n \t\tOPT_BOOLEAN('f', \"force\", &force, \"force move/rename even if target exists\"),\n \t\tOPT_BOOLEAN('k', NULL, &ignore_errors, \"skip move/rename errors\"),\n \t\tOPT_END(),\ndiff --git a/builtin/notes.c b/builtin/notes.c\nindex e0a1f62..2ab070f 100644\n--- a/builtin/notes.c\n+++ b/builtin/notes.c\n@@ -804,8 +804,7 @@ static int prune(int argc, const char **argv, const char *prefix)\n \tstruct notes_tree *t;\n \tint show_only = 0, verbose = 0;\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('n', \"dry-run\", &show_only,\n-\t\t\t    \"do not remove, show only\"),\n+\t\tOPT__DRY_RUN(&show_only, \"do not remove, show only\"),\n \t\tOPT__VERBOSE(&verbose, \"report pruned notes\"),\n \t\tOPT_END()\n \t};\ndiff --git a/builtin/prune.c b/builtin/prune.c\nindex 8b770af..e65690b 100644\n--- a/builtin/prune.c\n+++ b/builtin/prune.c\n@@ -125,8 +125,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)\n {\n \tstruct rev_info revs;\n \tconst struct option options[] = {\n-\t\tOPT_BOOLEAN('n', \"dry-run\", &show_only,\n-\t\t\t    \"do not remove, show only\"),\n+\t\tOPT__DRY_RUN(&show_only, \"do not remove, show only\"),\n \t\tOPT__VERBOSE(&verbose, \"report pruned objects\"),\n \t\tOPT_DATE(0, \"expire\", &expire,\n \t\t\t \"expire objects older than <time>\"),\ndiff --git a/builtin/remote.c b/builtin/remote.c\nindex b944b91..30b9922 100644\n--- a/builtin/remote.c\n+++ b/builtin/remote.c\n@@ -1200,7 +1200,7 @@ static int prune(int argc, const char **argv)\n {\n \tint dry_run = 0, result = 0;\n \tstruct option options[] = {\n-\t\tOPT__DRY_RUN(&dry_run),\n+\t\tOPT__DRY_RUN(&dry_run, \"dry run\"),\n \t\tOPT_END()\n \t};\n \ndiff --git a/builtin/rm.c b/builtin/rm.c\nindex f3772c8..26b7412 100644\n--- a/builtin/rm.c\n+++ b/builtin/rm.c\n@@ -139,7 +139,7 @@ static int show_only = 0, force = 0, index_only = 0, recursive = 0, quiet = 0;\n static int ignore_unmatch = 0;\n \n static struct option builtin_rm_options[] = {\n-\tOPT__DRY_RUN(&show_only),\n+\tOPT__DRY_RUN(&show_only, \"dry run\"),\n \tOPT__QUIET(&quiet),\n \tOPT_BOOLEAN( 0 , \"cached\",         &index_only, \"only remove from the index\"),\n \tOPT_BOOLEAN('f', \"force\",          &force,      \"override the up-to-date check\"),\ndiff --git a/parse-options.h b/parse-options.h\nindex 14918b1..69ce094 100644\n--- a/parse-options.h\n+++ b/parse-options.h\n@@ -205,7 +205,7 @@ extern int parse_opt_tertiary(const struct option *, const char *, int);\n \t  PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 }, \\\n \t{ OPTION_CALLBACK, 'q', \"quiet\", (var), NULL, \"be more quiet\", \\\n \t  PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 }\n-#define OPT__DRY_RUN(var)  OPT_BOOLEAN('n', \"dry-run\", (var), \"dry run\")\n+#define OPT__DRY_RUN(var, h)  OPT_BOOLEAN('n', \"dry-run\", (var), (h))\n #define OPT__ABBREV(var)  \\\n \t{ OPTION_CALLBACK, 0, \"abbrev\", (var), \"n\", \\\n \t  \"use <n> digits to display SHA-1s\", \\\ndiff --git a/test-parse-options.c b/test-parse-options.c\nindex bd7b8a4..cddd106 100644\n--- a/test-parse-options.c\n+++ b/test-parse-options.c\n@@ -67,7 +67,7 @@ int main(int argc, const char **argv)\n \t\tOPT_GROUP(\"Standard options\"),\n \t\tOPT__ABBREV(&abbrev),\n \t\tOPT__VERBOSE(&verbose, \"be verbose\"),\n-\t\tOPT__DRY_RUN(&dry_run),\n+\t\tOPT__DRY_RUN(&dry_run, \"dry run\"),\n \t\tOPT__QUIET(&quiet),\n \t\tOPT_END(),\n \t};\n-- \n1.7.3\n"},{"id":"155397","messageId":"4CD83ABD.30804@lsrfire.ath.cx","threadId":"25675","inReplyTo":"4CD83917.3040801@lsrfire.ath.cx","subject":"[PATCH 3/7] add description parameter to OPT__QUIET","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-11-08T18:00:29Z","receivedAt":"2010-11-08T18:00:29Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Allows better help text to be defined than \"be quiet\".  Also make use\nof the macro in a place that already had a different description.  No\nobject code changes intended.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n Documentation/technical/api-parse-options.txt |    2 +-\n builtin/checkout-index.c                      |    2 +-\n builtin/checkout.c                            |    2 +-\n builtin/clean.c                               |    2 +-\n builtin/commit.c                              |    2 +-\n builtin/gc.c                                  |    2 +-\n builtin/grep.c                                |    4 ++--\n builtin/merge-file.c                          |    2 +-\n builtin/reset.c                               |    2 +-\n builtin/rm.c                                  |    2 +-\n builtin/show-ref.c                            |    2 +-\n builtin/symbolic-ref.c                        |    2 +-\n parse-options.h                               |    2 +-\n test-parse-options.c                          |    2 +-\n 14 files changed, 15 insertions(+), 15 deletions(-)\n\ndiff --git a/Documentation/technical/api-parse-options.txt\nb/Documentation/technical/api-parse-options.txt\nindex 00c447c..248a66d 100644\n--- a/Documentation/technical/api-parse-options.txt\n+++ b/Documentation/technical/api-parse-options.txt\n@@ -121,7 +121,7 @@ There are some macros to easily define options:\n `OPT__DRY_RUN(&int_var, description)`::\n \tAdd `-n, \\--dry-run`.\n\n-`OPT__QUIET(&int_var)`::\n+`OPT__QUIET(&int_var, description)`::\n \tAdd `-q, \\--quiet`.\n\n `OPT__VERBOSE(&int_var, description)`::\ndiff --git a/builtin/checkout-index.c b/builtin/checkout-index.c\nindex 65cbee0..7ba0913 100644\n--- a/builtin/checkout-index.c\n+++ b/builtin/checkout-index.c\n@@ -219,7 +219,7 @@ int cmd_checkout_index(int argc, const char **argv,\nconst char *prefix)\n \t\t\t\"checks out all files in the index\"),\n \t\tOPT_BOOLEAN('f', \"force\", &force,\n \t\t\t\"forces overwrite of existing files\"),\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT_BOOLEAN('n', \"no-create\", &not_new,\n \t\t\t\"don't checkout new files\"),\n \t\t{ OPTION_CALLBACK, 'u', \"index\", &newfd, NULL,\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex 9240faf..a952477 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -686,7 +686,7 @@ int cmd_checkout(int argc, const char **argv, const\nchar *prefix)\n \tint patch_mode = 0;\n \tint dwim_new_local_branch = 1;\n \tstruct option options[] = {\n-\t\tOPT__QUIET(&opts.quiet),\n+\t\tOPT__QUIET(&opts.quiet, \"be quiet\"),\n \t\tOPT_STRING('b', NULL, &opts.new_branch, \"branch\",\n \t\t\t   \"create and checkout a new branch\"),\n \t\tOPT_STRING('B', NULL, &opts.new_branch_force, \"branch\",\ndiff --git a/builtin/clean.c b/builtin/clean.c\nindex 17ecbe6..449d2a3 100644\n--- a/builtin/clean.c\n+++ b/builtin/clean.c\n@@ -48,7 +48,7 @@ int cmd_clean(int argc, const char **argv, const char\n*prefix)\n \tconst char *qname;\n \tchar *seen = NULL;\n \tstruct option options[] = {\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT__DRY_RUN(&show_only, \"dry run\"),\n \t\tOPT_BOOLEAN('f', \"force\", &force, \"force\"),\n \t\tOPT_BOOLEAN('d', NULL, &remove_directories,\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex 9cbc4ea..97ae1bc 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -114,7 +114,7 @@ static int opt_parse_m(const struct option *opt,\nconst char *arg, int unset)\n }\n\n static struct option builtin_commit_options[] = {\n-\tOPT__QUIET(&quiet),\n+\tOPT__QUIET(&quiet, \"be quiet\"),\n \tOPT__VERBOSE(&verbose, \"be verbose\"),\n\n \tOPT_GROUP(\"Commit message options\"),\ndiff --git a/builtin/gc.c b/builtin/gc.c\nindex c304638..8f67325 100644\n--- a/builtin/gc.c\n+++ b/builtin/gc.c\n@@ -180,7 +180,7 @@ int cmd_gc(int argc, const char **argv, const char\n*prefix)\n \tchar buf[80];\n\n \tstruct option builtin_gc_options[] = {\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\t{ OPTION_STRING, 0, \"prune\", &prune_expire, \"date\",\n \t\t\t\"prune unreferenced objects\",\n \t\t\tPARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire },\ndiff --git a/builtin/grep.c b/builtin/grep.c\nindex 3d5f6ac..adb5424 100644\n--- a/builtin/grep.c\n+++ b/builtin/grep.c\n@@ -915,8 +915,8 @@ int cmd_grep(int argc, const char **argv, const char\n*prefix)\n \t\t{ OPTION_CALLBACK, ')', NULL, &opt, NULL, \"\",\n \t\t  PARSE_OPT_NOARG | PARSE_OPT_NONEG | PARSE_OPT_NODASH,\n \t\t  close_callback },\n-\t\tOPT_BOOLEAN('q', \"quiet\", &opt.status_only,\n-\t\t\t    \"indicate hit with exit status without output\"),\n+\t\tOPT__QUIET(&opt.status_only,\n+\t\t\t   \"indicate hit with exit status without output\"),\n \t\tOPT_BOOLEAN(0, \"all-match\", &opt.all_match,\n \t\t\t\"show only matches from files that match all patterns\"),\n \t\tOPT_GROUP(\"\"),\ndiff --git a/builtin/merge-file.c b/builtin/merge-file.c\nindex b6664d4..58e4731 100644\n--- a/builtin/merge-file.c\n+++ b/builtin/merge-file.c\n@@ -39,7 +39,7 @@ int cmd_merge_file(int argc, const char **argv, const\nchar *prefix)\n \t\t\t    XDL_MERGE_FAVOR_UNION),\n \t\tOPT_INTEGER(0, \"marker-size\", &xmp.marker_size,\n \t\t\t    \"for conflicts, use this marker size\"),\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT_CALLBACK('L', NULL, names, \"name\",\n \t\t\t     \"set labels for file1/orig_file/file2\", &label_cb),\n \t\tOPT_END(),\ndiff --git a/builtin/reset.c b/builtin/reset.c\nindex 0037be4..d624207 100644\n--- a/builtin/reset.c\n+++ b/builtin/reset.c\n@@ -243,7 +243,7 @@ int cmd_reset(int argc, const char **argv, const\nchar *prefix)\n \tstruct commit *commit;\n \tchar *reflog_action, msg[1024];\n \tconst struct option options[] = {\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT_SET_INT(0, \"mixed\", &reset_type,\n \t\t\t\t\t\t\"reset HEAD and index\", MIXED),\n \t\tOPT_SET_INT(0, \"soft\", &reset_type, \"reset only HEAD\", SOFT),\ndiff --git a/builtin/rm.c b/builtin/rm.c\nindex 26b7412..49461b6 100644\n--- a/builtin/rm.c\n+++ b/builtin/rm.c\n@@ -140,7 +140,7 @@ static int ignore_unmatch = 0;\n\n static struct option builtin_rm_options[] = {\n \tOPT__DRY_RUN(&show_only, \"dry run\"),\n-\tOPT__QUIET(&quiet),\n+\tOPT__QUIET(&quiet, \"be quiet\"),\n \tOPT_BOOLEAN( 0 , \"cached\",         &index_only, \"only remove from the\nindex\"),\n \tOPT_BOOLEAN('f', \"force\",          &force,      \"override the\nup-to-date check\"),\n \tOPT_BOOLEAN('r', NULL,             &recursive,  \"allow recursive\nremoval\"),\ndiff --git a/builtin/show-ref.c b/builtin/show-ref.c\nindex be9b512..6507f03 100644\n--- a/builtin/show-ref.c\n+++ b/builtin/show-ref.c\n@@ -193,7 +193,7 @@ static const struct option show_ref_options[] = {\n \t  \"only show SHA1 hash using <n> digits\",\n \t  PARSE_OPT_OPTARG, &hash_callback },\n \tOPT__ABBREV(&abbrev),\n-\tOPT__QUIET(&quiet),\n+\tOPT__QUIET(&quiet, \"be quiet\"),\n \t{ OPTION_CALLBACK, 0, \"exclude-existing\", &exclude_existing_arg,\n \t  \"pattern\", \"show refs from stdin that aren't in local repository\",\n \t  PARSE_OPT_OPTARG | PARSE_OPT_NONEG, exclude_existing_callback },\ndiff --git a/builtin/symbolic-ref.c b/builtin/symbolic-ref.c\nindex ca855a5..1b28425 100644\n--- a/builtin/symbolic-ref.c\n+++ b/builtin/symbolic-ref.c\n@@ -30,7 +30,7 @@ int cmd_symbolic_ref(int argc, const char **argv,\nconst char *prefix)\n \tint quiet = 0;\n \tconst char *msg = NULL;\n \tstruct option options[] = {\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT_STRING('m', NULL, &msg, \"reason\", \"reason of the update\"),\n \t\tOPT_END(),\n \t};\ndiff --git a/parse-options.h b/parse-options.h\nindex 69ce094..3dd3a94 100644\n--- a/parse-options.h\n+++ b/parse-options.h\n@@ -199,7 +199,7 @@ extern int parse_opt_with_commit(const struct option\n*, const char *, int);\n extern int parse_opt_tertiary(const struct option *, const char *, int);\n\n #define OPT__VERBOSE(var, h)  OPT_BOOLEAN('v', \"verbose\", (var), (h))\n-#define OPT__QUIET(var)    OPT_BOOLEAN('q', \"quiet\",   (var), \"be quiet\")\n+#define OPT__QUIET(var, h)    OPT_BOOLEAN('q', \"quiet\",   (var), (h))\n #define OPT__VERBOSITY(var) \\\n \t{ OPTION_CALLBACK, 'v', \"verbose\", (var), NULL, \"be more verbose\", \\\n \t  PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 }, \\\ndiff --git a/test-parse-options.c b/test-parse-options.c\nindex cddd106..0828592 100644\n--- a/test-parse-options.c\n+++ b/test-parse-options.c\n@@ -68,7 +68,7 @@ int main(int argc, const char **argv)\n \t\tOPT__ABBREV(&abbrev),\n \t\tOPT__VERBOSE(&verbose, \"be verbose\"),\n \t\tOPT__DRY_RUN(&dry_run, \"dry run\"),\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT_END(),\n \t};\n \tint i;\n-- \n1.7.3\n"},{"id":"155399","messageId":"4CD83B12.8050205@lsrfire.ath.cx","threadId":"25675","inReplyTo":"4CD83917.3040801@lsrfire.ath.cx","subject":"[PATCH 4/7] add OPT__FORCE","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-11-08T18:01:54Z","receivedAt":"2010-11-08T18:01:54Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Add OPT__FORCE as a helper macro in the same spirit as OPT__VERBOSE\net.al. to simplify defining -f/--force options.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lstfire.ath.cx>\n---\n Documentation/technical/api-parse-options.txt |    3 +++\n builtin/add.c                                 |    2 +-\n builtin/branch.c                              |    2 +-\n builtin/checkout-index.c                      |    3 +--\n builtin/checkout.c                            |    2 +-\n builtin/clean.c                               |    2 +-\n builtin/fetch.c                               |    3 +--\n builtin/mv.c                                  |    2 +-\n builtin/notes.c                               |    4 ++--\n builtin/rm.c                                  |    2 +-\n builtin/tag.c                                 |    2 +-\n builtin/update-server-info.c                  |    3 +--\n parse-options.h                               |    1 +\n 13 files changed, 16 insertions(+), 15 deletions(-)\n\ndiff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt\nindex 248a66d..f6a4a36 100644\n--- a/Documentation/technical/api-parse-options.txt\n+++ b/Documentation/technical/api-parse-options.txt\n@@ -121,6 +121,9 @@ There are some macros to easily define options:\n `OPT__DRY_RUN(&int_var, description)`::\n \tAdd `-n, \\--dry-run`.\n \n+`OPT__FORCE(&int_var, description)`::\n+\tAdd `-f, \\--force`.\n+\n `OPT__QUIET(&int_var, description)`::\n \tAdd `-q, \\--quiet`.\n \ndiff --git a/builtin/add.c b/builtin/add.c\nindex 9625cee..71f9b04 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -319,7 +319,7 @@ static struct option builtin_add_options[] = {\n \tOPT_BOOLEAN('i', \"interactive\", &add_interactive, \"interactive picking\"),\n \tOPT_BOOLEAN('p', \"patch\", &patch_interactive, \"interactive patching\"),\n \tOPT_BOOLEAN('e', \"edit\", &edit_interactive, \"edit current diff and apply\"),\n-\tOPT_BOOLEAN('f', \"force\", &ignored_too, \"allow adding otherwise ignored files\"),\n+\tOPT__FORCE(&ignored_too, \"allow adding otherwise ignored files\"),\n \tOPT_BOOLEAN('u', \"update\", &take_worktree_changes, \"update tracked files\"),\n \tOPT_BOOLEAN('N', \"intent-to-add\", &intent_to_add, \"record only the fact that the path will be added later\"),\n \tOPT_BOOLEAN('A', \"all\", &addremove, \"add all, noticing removal of tracked files\"),\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex 10788fc..e388edc 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -651,7 +651,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \t\tOPT_BIT('m', NULL, &rename, \"move/rename a branch and its reflog\", 1),\n \t\tOPT_BIT('M', NULL, &rename, \"move/rename a branch, even if target exists\", 2),\n \t\tOPT_BOOLEAN('l', NULL, &reflog, \"create the branch's reflog\"),\n-\t\tOPT_BOOLEAN('f', \"force\", &force_create, \"force creation (when already exists)\"),\n+\t\tOPT__FORCE(&force_create, \"force creation (when already exists)\"),\n \t\t{\n \t\t\tOPTION_CALLBACK, 0, \"no-merged\", &merge_filter_ref,\n \t\t\t\"commit\", \"print only not merged branches\",\ndiff --git a/builtin/checkout-index.c b/builtin/checkout-index.c\nindex 7ba0913..91fb9bf 100644\n--- a/builtin/checkout-index.c\n+++ b/builtin/checkout-index.c\n@@ -217,8 +217,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)\n \tstruct option builtin_checkout_index_options[] = {\n \t\tOPT_BOOLEAN('a', \"all\", &all,\n \t\t\t\"checks out all files in the index\"),\n-\t\tOPT_BOOLEAN('f', \"force\", &force,\n-\t\t\t\"forces overwrite of existing files\"),\n+\t\tOPT__FORCE(&force, \"forces overwrite of existing files\"),\n \t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT_BOOLEAN('n', \"no-create\", &not_new,\n \t\t\t\"don't checkout new files\"),\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex a952477..f275570 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -699,7 +699,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \t\t\t    2),\n \t\tOPT_SET_INT('3', \"theirs\", &opts.writeout_stage, \"checkout their version for unmerged files\",\n \t\t\t    3),\n-\t\tOPT_BOOLEAN('f', \"force\", &opts.force, \"force checkout (throw away local modifications)\"),\n+\t\tOPT__FORCE(&opts.force, \"force checkout (throw away local modifications)\"),\n \t\tOPT_BOOLEAN('m', \"merge\", &opts.merge, \"perform a 3-way merge with the new branch\"),\n \t\tOPT_STRING(0, \"conflict\", &conflict_style, \"style\",\n \t\t\t   \"conflict style (merge or diff3)\"),\ndiff --git a/builtin/clean.c b/builtin/clean.c\nindex 449d2a3..9146bf3 100644\n--- a/builtin/clean.c\n+++ b/builtin/clean.c\n@@ -50,7 +50,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)\n \tstruct option options[] = {\n \t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT__DRY_RUN(&show_only, \"dry run\"),\n-\t\tOPT_BOOLEAN('f', \"force\", &force, \"force\"),\n+\t\tOPT__FORCE(&force, \"force\"),\n \t\tOPT_BOOLEAN('d', NULL, &remove_directories,\n \t\t\t\t\"remove whole directories\"),\n \t\t{ OPTION_CALLBACK, 'e', \"exclude\", &exclude_list, \"pattern\",\ndiff --git a/builtin/fetch.c b/builtin/fetch.c\nindex d35f000..6aaf8e9 100644\n--- a/builtin/fetch.c\n+++ b/builtin/fetch.c\n@@ -43,8 +43,7 @@ static struct option builtin_fetch_options[] = {\n \t\t    \"append to .git/FETCH_HEAD instead of overwriting\"),\n \tOPT_STRING(0, \"upload-pack\", &upload_pack, \"PATH\",\n \t\t   \"path to upload pack on remote end\"),\n-\tOPT_BOOLEAN('f', \"force\", &force,\n-\t\t    \"force overwrite of local branch\"),\n+\tOPT__FORCE(&force, \"force overwrite of local branch\"),\n \tOPT_BOOLEAN('m', \"multiple\", &multiple,\n \t\t    \"fetch from multiple remotes\"),\n \tOPT_SET_INT('t', \"tags\", &tags,\ndiff --git a/builtin/mv.c b/builtin/mv.c\nindex 8677bd2..93e8995 100644\n--- a/builtin/mv.c\n+++ b/builtin/mv.c\n@@ -56,7 +56,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \tint verbose = 0, show_only = 0, force = 0, ignore_errors = 0;\n \tstruct option builtin_mv_options[] = {\n \t\tOPT__DRY_RUN(&show_only, \"dry run\"),\n-\t\tOPT_BOOLEAN('f', \"force\", &force, \"force move/rename even if target exists\"),\n+\t\tOPT__FORCE(&force, \"force move/rename even if target exists\"),\n \t\tOPT_BOOLEAN('k', NULL, &ignore_errors, \"skip move/rename errors\"),\n \t\tOPT_END(),\n \t};\ndiff --git a/builtin/notes.c b/builtin/notes.c\nindex 2ab070f..c85cbf5 100644\n--- a/builtin/notes.c\n+++ b/builtin/notes.c\n@@ -538,7 +538,7 @@ static int add(int argc, const char **argv, const char *prefix)\n \t\t{ OPTION_CALLBACK, 'C', \"reuse-message\", &msg, \"OBJECT\",\n \t\t\t\"reuse specified note object\", PARSE_OPT_NONEG,\n \t\t\tparse_reuse_arg},\n-\t\tOPT_BOOLEAN('f', \"force\", &force, \"replace existing notes\"),\n+\t\tOPT__FORCE(&force, \"replace existing notes\"),\n \t\tOPT_END()\n \t};\n \n@@ -594,7 +594,7 @@ static int copy(int argc, const char **argv, const char *prefix)\n \tstruct notes_tree *t;\n \tconst char *rewrite_cmd = NULL;\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('f', \"force\", &force, \"replace existing notes\"),\n+\t\tOPT__FORCE(&force, \"replace existing notes\"),\n \t\tOPT_BOOLEAN(0, \"stdin\", &from_stdin, \"read objects from stdin\"),\n \t\tOPT_STRING(0, \"for-rewrite\", &rewrite_cmd, \"command\",\n \t\t\t   \"load rewriting config for <command> (implies \"\ndiff --git a/builtin/rm.c b/builtin/rm.c\nindex 49461b6..9a59905 100644\n--- a/builtin/rm.c\n+++ b/builtin/rm.c\n@@ -142,7 +142,7 @@ static struct option builtin_rm_options[] = {\n \tOPT__DRY_RUN(&show_only, \"dry run\"),\n \tOPT__QUIET(&quiet, \"be quiet\"),\n \tOPT_BOOLEAN( 0 , \"cached\",         &index_only, \"only remove from the index\"),\n-\tOPT_BOOLEAN('f', \"force\",          &force,      \"override the up-to-date check\"),\n+\tOPT__FORCE(&force, \"override the up-to-date check\"),\n \tOPT_BOOLEAN('r', NULL,             &recursive,  \"allow recursive removal\"),\n \tOPT_BOOLEAN( 0 , \"ignore-unmatch\", &ignore_unmatch,\n \t\t\t\t\"exit with a zero status even if nothing matched\"),\ndiff --git a/builtin/tag.c b/builtin/tag.c\nindex d311491..d1d7d87 100644\n--- a/builtin/tag.c\n+++ b/builtin/tag.c\n@@ -390,7 +390,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \t\tOPT_BOOLEAN('s', NULL, &sign, \"annotated and GPG-signed tag\"),\n \t\tOPT_STRING('u', NULL, &keyid, \"key-id\",\n \t\t\t\t\t\"use another key to sign the tag\"),\n-\t\tOPT_BOOLEAN('f', \"force\", &force, \"replace the tag if exists\"),\n+\t\tOPT__FORCE(&force, \"replace the tag if exists\"),\n \n \t\tOPT_GROUP(\"Tag listing options\"),\n \t\t{\ndiff --git a/builtin/update-server-info.c b/builtin/update-server-info.c\nindex 2b3fddc..b90dce6 100644\n--- a/builtin/update-server-info.c\n+++ b/builtin/update-server-info.c\n@@ -11,8 +11,7 @@ int cmd_update_server_info(int argc, const char **argv, const char *prefix)\n {\n \tint force = 0;\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('f', \"force\", &force,\n-\t\t\t\"update the info files from scratch\"),\n+\t\tOPT__FORCE(&force, \"update the info files from scratch\"),\n \t\tOPT_END()\n \t};\n \ndiff --git a/parse-options.h b/parse-options.h\nindex 3dd3a94..ae8647d 100644\n--- a/parse-options.h\n+++ b/parse-options.h\n@@ -206,6 +206,7 @@ extern int parse_opt_tertiary(const struct option *, const char *, int);\n \t{ OPTION_CALLBACK, 'q', \"quiet\", (var), NULL, \"be more quiet\", \\\n \t  PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 }\n #define OPT__DRY_RUN(var, h)  OPT_BOOLEAN('n', \"dry-run\", (var), (h))\n+#define OPT__FORCE(var, h)    OPT_BOOLEAN('f', \"force\",   (var), (h))\n #define OPT__ABBREV(var)  \\\n \t{ OPTION_CALLBACK, 0, \"abbrev\", (var), \"n\", \\\n \t  \"use <n> digits to display SHA-1s\", \\\n-- \n1.7.3\n"},{"id":"155400","messageId":"4CD83B51.7000306@lsrfire.ath.cx","threadId":"25675","inReplyTo":"4CD83917.3040801@lsrfire.ath.cx","subject":"[PATCH 5/7] archive: improve --verbose description","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-11-08T18:02:57Z","receivedAt":"2010-11-08T18:02:57Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n archive.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/archive.c b/archive.c\nindex 78a67f0..1944ed4 100644\n--- a/archive.c\n+++ b/archive.c\n@@ -314,7 +314,7 @@ static int parse_archive_args(int argc, const char **argv,\n \t\t\t\"write the archive to this file\"),\n \t\tOPT_BOOLEAN(0, \"worktree-attributes\", &worktree_attributes,\n \t\t\t\"read .gitattributes in working directory\"),\n-\t\tOPT__VERBOSE(&verbose, \"be verbose\"),\n+\t\tOPT__VERBOSE(&verbose, \"report archived files on stderr\"),\n \t\tOPT__COMPR('0', &compression_level, \"store only\", 0),\n \t\tOPT__COMPR('1', &compression_level, \"compress faster\", 1),\n \t\tOPT__COMPR_HIDDEN('2', &compression_level, 2),\n-- \n1.7.3\n"},{"id":"155401","messageId":"4CD83B8E.1060204@lsrfire.ath.cx","threadId":"25675","inReplyTo":"4CD83917.3040801@lsrfire.ath.cx","subject":"[PATCH 6/7] branch: improve --verbose description","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-11-08T18:03:58Z","receivedAt":"2010-11-08T18:03:58Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n builtin/branch.c |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex e388edc..807355a 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -621,7 +621,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \n \tstruct option options[] = {\n \t\tOPT_GROUP(\"Generic options\"),\n-\t\tOPT__VERBOSE(&verbose, \"be verbose\"),\n+\t\tOPT__VERBOSE(&verbose,\n+\t\t\t\"show hash and subject, give twice for upstream branch\"),\n \t\tOPT_SET_INT('t', \"track\",  &track, \"set up tracking mode (see git-pull(1))\",\n \t\t\tBRANCH_TRACK_EXPLICIT),\n \t\tOPT_SET_INT( 0, \"set-upstream\",  &track, \"change upstream info\",\n-- \n1.7.3\n"},{"id":"155403","messageId":"4CD83BC3.6000606@lsrfire.ath.cx","threadId":"25675","inReplyTo":"4CD83917.3040801@lsrfire.ath.cx","subject":"[PATCH 7/7] verify-tag: document --verbose","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-11-08T18:04:51Z","receivedAt":"2010-11-08T18:04:51Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n Documentation/git-verify-tag.txt |    4 ++++\n builtin/verify-tag.c             |    2 +-\n 2 files changed, 5 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-verify-tag.txt b/Documentation/git-verify-tag.txt\nindex dada212..7112197 100644\n--- a/Documentation/git-verify-tag.txt\n+++ b/Documentation/git-verify-tag.txt\n@@ -15,6 +15,10 @@ Validates the gpg signature created by 'git tag'.\n \n OPTIONS\n -------\n+-v::\n+--verbose::\n+\tPrint the contents of the tag object before validating it.\n+\n <tag>...::\n \tSHA1 identifiers of git tag objects.\n \ndiff --git a/builtin/verify-tag.c b/builtin/verify-tag.c\nindex 6784846..8136dba 100644\n--- a/builtin/verify-tag.c\n+++ b/builtin/verify-tag.c\n@@ -93,7 +93,7 @@ int cmd_verify_tag(int argc, const char **argv, const char *prefix)\n {\n \tint i = 1, verbose = 0, had_error = 0;\n \tconst struct option verify_tag_options[] = {\n-\t\tOPT__VERBOSE(&verbose, \"be verbose\"),\n+\t\tOPT__VERBOSE(&verbose, \"print tag contents\"),\n \t\tOPT_END()\n \t};\n \n-- \n1.7.3\n"},{"id":"155404","messageId":"4CD83C3E.6080502@lsrfire.ath.cx","threadId":"25675","inReplyTo":"4CD83ABD.30804@lsrfire.ath.cx","subject":"Re: [PATCH 3/7] add description parameter to OPT__QUIET","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-11-08T18:06:54Z","receivedAt":"2010-11-08T18:06:54Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"And now without line wrap breakage..  Sorry.\n-- >8 --\nAllows better help text to be defined than \"be quiet\".  Also make use\nof the macro in a place that already had a different description.  No\nobject code changes intended.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n Documentation/technical/api-parse-options.txt |    2 +-\n builtin/checkout-index.c                      |    2 +-\n builtin/checkout.c                            |    2 +-\n builtin/clean.c                               |    2 +-\n builtin/commit.c                              |    2 +-\n builtin/gc.c                                  |    2 +-\n builtin/grep.c                                |    4 ++--\n builtin/merge-file.c                          |    2 +-\n builtin/reset.c                               |    2 +-\n builtin/rm.c                                  |    2 +-\n builtin/show-ref.c                            |    2 +-\n builtin/symbolic-ref.c                        |    2 +-\n parse-options.h                               |    2 +-\n test-parse-options.c                          |    2 +-\n 14 files changed, 15 insertions(+), 15 deletions(-)\n\ndiff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt\nindex 00c447c..248a66d 100644\n--- a/Documentation/technical/api-parse-options.txt\n+++ b/Documentation/technical/api-parse-options.txt\n@@ -121,7 +121,7 @@ There are some macros to easily define options:\n `OPT__DRY_RUN(&int_var, description)`::\n \tAdd `-n, \\--dry-run`.\n \n-`OPT__QUIET(&int_var)`::\n+`OPT__QUIET(&int_var, description)`::\n \tAdd `-q, \\--quiet`.\n \n `OPT__VERBOSE(&int_var, description)`::\ndiff --git a/builtin/checkout-index.c b/builtin/checkout-index.c\nindex 65cbee0..7ba0913 100644\n--- a/builtin/checkout-index.c\n+++ b/builtin/checkout-index.c\n@@ -219,7 +219,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)\n \t\t\t\"checks out all files in the index\"),\n \t\tOPT_BOOLEAN('f', \"force\", &force,\n \t\t\t\"forces overwrite of existing files\"),\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT_BOOLEAN('n', \"no-create\", &not_new,\n \t\t\t\"don't checkout new files\"),\n \t\t{ OPTION_CALLBACK, 'u', \"index\", &newfd, NULL,\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex 9240faf..a952477 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -686,7 +686,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \tint patch_mode = 0;\n \tint dwim_new_local_branch = 1;\n \tstruct option options[] = {\n-\t\tOPT__QUIET(&opts.quiet),\n+\t\tOPT__QUIET(&opts.quiet, \"be quiet\"),\n \t\tOPT_STRING('b', NULL, &opts.new_branch, \"branch\",\n \t\t\t   \"create and checkout a new branch\"),\n \t\tOPT_STRING('B', NULL, &opts.new_branch_force, \"branch\",\ndiff --git a/builtin/clean.c b/builtin/clean.c\nindex 17ecbe6..449d2a3 100644\n--- a/builtin/clean.c\n+++ b/builtin/clean.c\n@@ -48,7 +48,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)\n \tconst char *qname;\n \tchar *seen = NULL;\n \tstruct option options[] = {\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT__DRY_RUN(&show_only, \"dry run\"),\n \t\tOPT_BOOLEAN('f', \"force\", &force, \"force\"),\n \t\tOPT_BOOLEAN('d', NULL, &remove_directories,\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex 9cbc4ea..97ae1bc 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -114,7 +114,7 @@ static int opt_parse_m(const struct option *opt, const char *arg, int unset)\n }\n \n static struct option builtin_commit_options[] = {\n-\tOPT__QUIET(&quiet),\n+\tOPT__QUIET(&quiet, \"be quiet\"),\n \tOPT__VERBOSE(&verbose, \"be verbose\"),\n \n \tOPT_GROUP(\"Commit message options\"),\ndiff --git a/builtin/gc.c b/builtin/gc.c\nindex c304638..8f67325 100644\n--- a/builtin/gc.c\n+++ b/builtin/gc.c\n@@ -180,7 +180,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)\n \tchar buf[80];\n \n \tstruct option builtin_gc_options[] = {\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\t{ OPTION_STRING, 0, \"prune\", &prune_expire, \"date\",\n \t\t\t\"prune unreferenced objects\",\n \t\t\tPARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire },\ndiff --git a/builtin/grep.c b/builtin/grep.c\nindex 3d5f6ac..adb5424 100644\n--- a/builtin/grep.c\n+++ b/builtin/grep.c\n@@ -915,8 +915,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \t\t{ OPTION_CALLBACK, ')', NULL, &opt, NULL, \"\",\n \t\t  PARSE_OPT_NOARG | PARSE_OPT_NONEG | PARSE_OPT_NODASH,\n \t\t  close_callback },\n-\t\tOPT_BOOLEAN('q', \"quiet\", &opt.status_only,\n-\t\t\t    \"indicate hit with exit status without output\"),\n+\t\tOPT__QUIET(&opt.status_only,\n+\t\t\t   \"indicate hit with exit status without output\"),\n \t\tOPT_BOOLEAN(0, \"all-match\", &opt.all_match,\n \t\t\t\"show only matches from files that match all patterns\"),\n \t\tOPT_GROUP(\"\"),\ndiff --git a/builtin/merge-file.c b/builtin/merge-file.c\nindex b6664d4..58e4731 100644\n--- a/builtin/merge-file.c\n+++ b/builtin/merge-file.c\n@@ -39,7 +39,7 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)\n \t\t\t    XDL_MERGE_FAVOR_UNION),\n \t\tOPT_INTEGER(0, \"marker-size\", &xmp.marker_size,\n \t\t\t    \"for conflicts, use this marker size\"),\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT_CALLBACK('L', NULL, names, \"name\",\n \t\t\t     \"set labels for file1/orig_file/file2\", &label_cb),\n \t\tOPT_END(),\ndiff --git a/builtin/reset.c b/builtin/reset.c\nindex 0037be4..d624207 100644\n--- a/builtin/reset.c\n+++ b/builtin/reset.c\n@@ -243,7 +243,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)\n \tstruct commit *commit;\n \tchar *reflog_action, msg[1024];\n \tconst struct option options[] = {\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT_SET_INT(0, \"mixed\", &reset_type,\n \t\t\t\t\t\t\"reset HEAD and index\", MIXED),\n \t\tOPT_SET_INT(0, \"soft\", &reset_type, \"reset only HEAD\", SOFT),\ndiff --git a/builtin/rm.c b/builtin/rm.c\nindex 26b7412..49461b6 100644\n--- a/builtin/rm.c\n+++ b/builtin/rm.c\n@@ -140,7 +140,7 @@ static int ignore_unmatch = 0;\n \n static struct option builtin_rm_options[] = {\n \tOPT__DRY_RUN(&show_only, \"dry run\"),\n-\tOPT__QUIET(&quiet),\n+\tOPT__QUIET(&quiet, \"be quiet\"),\n \tOPT_BOOLEAN( 0 , \"cached\",         &index_only, \"only remove from the index\"),\n \tOPT_BOOLEAN('f', \"force\",          &force,      \"override the up-to-date check\"),\n \tOPT_BOOLEAN('r', NULL,             &recursive,  \"allow recursive removal\"),\ndiff --git a/builtin/show-ref.c b/builtin/show-ref.c\nindex be9b512..6507f03 100644\n--- a/builtin/show-ref.c\n+++ b/builtin/show-ref.c\n@@ -193,7 +193,7 @@ static const struct option show_ref_options[] = {\n \t  \"only show SHA1 hash using <n> digits\",\n \t  PARSE_OPT_OPTARG, &hash_callback },\n \tOPT__ABBREV(&abbrev),\n-\tOPT__QUIET(&quiet),\n+\tOPT__QUIET(&quiet, \"be quiet\"),\n \t{ OPTION_CALLBACK, 0, \"exclude-existing\", &exclude_existing_arg,\n \t  \"pattern\", \"show refs from stdin that aren't in local repository\",\n \t  PARSE_OPT_OPTARG | PARSE_OPT_NONEG, exclude_existing_callback },\ndiff --git a/builtin/symbolic-ref.c b/builtin/symbolic-ref.c\nindex ca855a5..1b28425 100644\n--- a/builtin/symbolic-ref.c\n+++ b/builtin/symbolic-ref.c\n@@ -30,7 +30,7 @@ int cmd_symbolic_ref(int argc, const char **argv, const char *prefix)\n \tint quiet = 0;\n \tconst char *msg = NULL;\n \tstruct option options[] = {\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT_STRING('m', NULL, &msg, \"reason\", \"reason of the update\"),\n \t\tOPT_END(),\n \t};\ndiff --git a/parse-options.h b/parse-options.h\nindex 69ce094..3dd3a94 100644\n--- a/parse-options.h\n+++ b/parse-options.h\n@@ -199,7 +199,7 @@ extern int parse_opt_with_commit(const struct option *, const char *, int);\n extern int parse_opt_tertiary(const struct option *, const char *, int);\n \n #define OPT__VERBOSE(var, h)  OPT_BOOLEAN('v', \"verbose\", (var), (h))\n-#define OPT__QUIET(var)    OPT_BOOLEAN('q', \"quiet\",   (var), \"be quiet\")\n+#define OPT__QUIET(var, h)    OPT_BOOLEAN('q', \"quiet\",   (var), (h))\n #define OPT__VERBOSITY(var) \\\n \t{ OPTION_CALLBACK, 'v', \"verbose\", (var), NULL, \"be more verbose\", \\\n \t  PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 }, \\\ndiff --git a/test-parse-options.c b/test-parse-options.c\nindex cddd106..0828592 100644\n--- a/test-parse-options.c\n+++ b/test-parse-options.c\n@@ -68,7 +68,7 @@ int main(int argc, const char **argv)\n \t\tOPT__ABBREV(&abbrev),\n \t\tOPT__VERBOSE(&verbose, \"be verbose\"),\n \t\tOPT__DRY_RUN(&dry_run, \"dry run\"),\n-\t\tOPT__QUIET(&quiet),\n+\t\tOPT__QUIET(&quiet, \"be quiet\"),\n \t\tOPT_END(),\n \t};\n \tint i;\n-- \n1.7.3\n"},{"id":"155405","messageId":"20101108181801.GB30428@sigill.intra.peff.net","threadId":"25675","inReplyTo":"4CD83ABD.30804@lsrfire.ath.cx","subject":"Re: [PATCH 3/7] add description parameter to OPT__QUIET","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-11-08T18:18:01Z","receivedAt":"2010-11-08T18:18:01Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Nov 08, 2010 at 07:00:29PM +0100, René Scharfe wrote:\n\n> Allows better help text to be defined than \"be quiet\".  Also make use\n> of the macro in a place that already had a different description.  No\n> object code changes intended.\n\nMaybe my \"don't repeat yourself\" spider sense is over-reacting, but of\n12 callsites, 11 of them will continue to use \"be quiet\". Maybe instead\nof:\n\n> -#define OPT__QUIET(var)    OPT_BOOLEAN('q', \"quiet\",   (var), \"be quiet\")\n> +#define OPT__QUIET(var, h)    OPT_BOOLEAN('q', \"quiet\",   (var), (h))\n\nwe could have:\n\n  #define OPT__QUIET_H(var, h) OPT_BOOLEAN('q', \"quiet\", (var), (h))\n  #define OPT__QUIET(var) OPT__QUIET_H(var, \"be quiet\")\n\nwhich would limit your patch to changing a single callsite.\n\n-Peff\n"},{"id":"155420","messageId":"20101108195448.GA12660@burratino","threadId":"25675","inReplyTo":"20101108181801.GB30428@sigill.intra.peff.net","subject":"Re: [PATCH 3/7] add description parameter to OPT__QUIET","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-11-08T19:54:48Z","receivedAt":"2010-11-08T19:54:48Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jeff King wrote:\n\n> Maybe my \"don't repeat yourself\" spider sense is over-reacting, but of\n> 12 callsites, 11 of them will continue to use \"be quiet\".\n\nMaybe something like this would help alleviate the smell.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n builtin/checkout-index.c |    3 ++-\n builtin/checkout.c       |    2 +-\n builtin/clean.c          |    2 +-\n builtin/commit.c         |    4 ++--\n builtin/gc.c             |    2 +-\n builtin/merge-file.c     |    2 +-\n builtin/reset.c          |    2 +-\n builtin/rm.c             |    2 +-\n builtin/show-ref.c       |    3 ++-\n builtin/symbolic-ref.c   |    3 ++-\n 10 files changed, 14 insertions(+), 11 deletions(-)\n\ndiff --git a/builtin/checkout-index.c b/builtin/checkout-index.c\nindex 91fb9bf..1ee3044 100644\n--- a/builtin/checkout-index.c\n+++ b/builtin/checkout-index.c\n@@ -218,7 +218,8 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)\n \t\tOPT_BOOLEAN('a', \"all\", &all,\n \t\t\t\"checks out all files in the index\"),\n \t\tOPT__FORCE(&force, \"forces overwrite of existing files\"),\n-\t\tOPT__QUIET(&quiet, \"be quiet\"),\n+\t\tOPT__QUIET(&quiet,\n+\t\t\t\"no warning for existing files and files not in index\"),\n \t\tOPT_BOOLEAN('n', \"no-create\", &not_new,\n \t\t\t\"don't checkout new files\"),\n \t\t{ OPTION_CALLBACK, 'u', \"index\", &newfd, NULL,\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex ab935fd..07530d7 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -686,7 +686,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \tint patch_mode = 0;\n \tint dwim_new_local_branch = 1;\n \tstruct option options[] = {\n-\t\tOPT__QUIET(&opts.quiet, \"be quiet\"),\n+\t\tOPT__QUIET(&opts.quiet, \"suppress progress reporting\"),\n \t\tOPT_STRING('b', NULL, &opts.new_branch, \"branch\",\n \t\t\t   \"create and checkout a new branch\"),\n \t\tOPT_STRING('B', NULL, &opts.new_branch_force, \"branch\",\ndiff --git a/builtin/clean.c b/builtin/clean.c\nindex 9146bf3..5e47c53 100644\n--- a/builtin/clean.c\n+++ b/builtin/clean.c\n@@ -48,7 +48,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)\n \tconst char *qname;\n \tchar *seen = NULL;\n \tstruct option options[] = {\n-\t\tOPT__QUIET(&quiet, \"be quiet\"),\n+\t\tOPT__QUIET(&quiet, \"do not print names of files removed\"),\n \t\tOPT__DRY_RUN(&show_only, \"dry run\"),\n \t\tOPT__FORCE(&force, \"force\"),\n \t\tOPT_BOOLEAN('d', NULL, &remove_directories,\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex 97ae1bc..4fd1a16 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -114,8 +114,8 @@ static int opt_parse_m(const struct option *opt, const char *arg, int unset)\n }\n \n static struct option builtin_commit_options[] = {\n-\tOPT__QUIET(&quiet, \"be quiet\"),\n-\tOPT__VERBOSE(&verbose, \"be verbose\"),\n+\tOPT__QUIET(&quiet, \"suppress summary after successful commit\"),\n+\tOPT__VERBOSE(&verbose, \"show diff in commit message template\"),\n \n \tOPT_GROUP(\"Commit message options\"),\n \tOPT_FILENAME('F', \"file\", &logfile, \"read log from file\"),\ndiff --git a/builtin/gc.c b/builtin/gc.c\nindex 8f67325..397a1e6 100644\n--- a/builtin/gc.c\n+++ b/builtin/gc.c\n@@ -180,7 +180,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)\n \tchar buf[80];\n \n \tstruct option builtin_gc_options[] = {\n-\t\tOPT__QUIET(&quiet, \"be quiet\"),\n+\t\tOPT__QUIET(&quiet, \"suppress progress reporting\"),\n \t\t{ OPTION_STRING, 0, \"prune\", &prune_expire, \"date\",\n \t\t\t\"prune unreferenced objects\",\n \t\t\tPARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire },\ndiff --git a/builtin/merge-file.c b/builtin/merge-file.c\nindex 58e4731..9d75ed4 100644\n--- a/builtin/merge-file.c\n+++ b/builtin/merge-file.c\n@@ -39,7 +39,7 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)\n \t\t\t    XDL_MERGE_FAVOR_UNION),\n \t\tOPT_INTEGER(0, \"marker-size\", &xmp.marker_size,\n \t\t\t    \"for conflicts, use this marker size\"),\n-\t\tOPT__QUIET(&quiet, \"be quiet\"),\n+\t\tOPT__QUIET(&quiet, \"do not warn about conflicts\"),\n \t\tOPT_CALLBACK('L', NULL, names, \"name\",\n \t\t\t     \"set labels for file1/orig_file/file2\", &label_cb),\n \t\tOPT_END(),\ndiff --git a/builtin/reset.c b/builtin/reset.c\nindex d624207..5de2bce 100644\n--- a/builtin/reset.c\n+++ b/builtin/reset.c\n@@ -243,7 +243,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)\n \tstruct commit *commit;\n \tchar *reflog_action, msg[1024];\n \tconst struct option options[] = {\n-\t\tOPT__QUIET(&quiet, \"be quiet\"),\n+\t\tOPT__QUIET(&quiet, \"be quiet, only report errors\"),\n \t\tOPT_SET_INT(0, \"mixed\", &reset_type,\n \t\t\t\t\t\t\"reset HEAD and index\", MIXED),\n \t\tOPT_SET_INT(0, \"soft\", &reset_type, \"reset only HEAD\", SOFT),\ndiff --git a/builtin/rm.c b/builtin/rm.c\nindex 9a59905..c7b7bb3 100644\n--- a/builtin/rm.c\n+++ b/builtin/rm.c\n@@ -140,7 +140,7 @@ static int ignore_unmatch = 0;\n \n static struct option builtin_rm_options[] = {\n \tOPT__DRY_RUN(&show_only, \"dry run\"),\n-\tOPT__QUIET(&quiet, \"be quiet\"),\n+\tOPT__QUIET(&quiet, \"do not list removed files\"),\n \tOPT_BOOLEAN( 0 , \"cached\",         &index_only, \"only remove from the index\"),\n \tOPT__FORCE(&force, \"override the up-to-date check\"),\n \tOPT_BOOLEAN('r', NULL,             &recursive,  \"allow recursive removal\"),\ndiff --git a/builtin/show-ref.c b/builtin/show-ref.c\nindex 6507f03..45f0340 100644\n--- a/builtin/show-ref.c\n+++ b/builtin/show-ref.c\n@@ -193,7 +193,8 @@ static const struct option show_ref_options[] = {\n \t  \"only show SHA1 hash using <n> digits\",\n \t  PARSE_OPT_OPTARG, &hash_callback },\n \tOPT__ABBREV(&abbrev),\n-\tOPT__QUIET(&quiet, \"be quiet\"),\n+\tOPT__QUIET(&quiet,\n+\t\t   \"do not print results to stdout (useful with --verify)\"),\n \t{ OPTION_CALLBACK, 0, \"exclude-existing\", &exclude_existing_arg,\n \t  \"pattern\", \"show refs from stdin that aren't in local repository\",\n \t  PARSE_OPT_OPTARG | PARSE_OPT_NONEG, exclude_existing_callback },\ndiff --git a/builtin/symbolic-ref.c b/builtin/symbolic-ref.c\nindex 1b28425..dea849c 100644\n--- a/builtin/symbolic-ref.c\n+++ b/builtin/symbolic-ref.c\n@@ -30,7 +30,8 @@ int cmd_symbolic_ref(int argc, const char **argv, const char *prefix)\n \tint quiet = 0;\n \tconst char *msg = NULL;\n \tstruct option options[] = {\n-\t\tOPT__QUIET(&quiet, \"be quiet\"),\n+\t\tOPT__QUIET(&quiet,\n+\t\t\t\"suppress error message for non-symbolic (detached) refs\"),\n \t\tOPT_STRING('m', NULL, &msg, \"reason\", \"reason of the update\"),\n \t\tOPT_END(),\n \t};\n-- \n1.7.2.3.557.gab647.dirty\n"},{"id":"155421","messageId":"20101108195752.GA31270@sigill.intra.peff.net","threadId":"25675","inReplyTo":"20101108195448.GA12660@burratino","subject":"Re: [PATCH 3/7] add description parameter to OPT__QUIET","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-11-08T19:57:52Z","receivedAt":"2010-11-08T19:57:52Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Nov 08, 2010 at 01:54:48PM -0600, Jonathan Nieder wrote:\n\n> Jeff King wrote:\n> \n> > Maybe my \"don't repeat yourself\" spider sense is over-reacting, but of\n> > 12 callsites, 11 of them will continue to use \"be quiet\".\n> \n> Maybe something like this would help alleviate the smell.\n> [patch with actual per-command descriptions of quiet mode]\n\nYeah, that is even better.\n\n-Peff\n"},{"id":"155432","messageId":"4CD86662.2050102@lsrfire.ath.cx","threadId":"25675","inReplyTo":"20101108195448.GA12660@burratino","subject":"Re: [PATCH 3/7] add description parameter to OPT__QUIET","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-11-08T21:06:42Z","receivedAt":"2010-11-08T21:06:42Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 08.11.2010 20:54, schrieb Jonathan Nieder:\n> Jeff King wrote:\n> \n>> Maybe my \"don't repeat yourself\" spider sense is over-reacting, but of\n>> 12 callsites, 11 of them will continue to use \"be quiet\".\n> \n> Maybe something like this would help alleviate the smell.\n\nYes, patches like yours were what I was hoping for. :)\n\nThanks,\nRené\n"}]}