builtin/*: update usage format

According to the guidelines in parse-options.h, we should not end in a full stop or start with a capital letter. Fix old error and usage messages to match this expectation. Signed-off-by: ZheNing Hu <adlternative@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

ZheNing Hu committed Jan 6, 2021 at 14:44 UTC e73fe3dd028ad830bb44b3ad7de15901834e557f
7 files changed +61 -61
builtin/am.c
+2 -2
@@ -2284,10 +2284,10 @@ int cmd_am(int argc, const char **argv, const char *prefix)
2284 N_("skip the current patch"),
2285 RESUME_SKIP),
2286 OPT_CMDMODE(0, "abort", &resume.mode,
2287 - N_("restore the original branch and abort the patching operation."),
2287 + N_("restore the original branch and abort the patching operation"),
2288 RESUME_ABORT),
2289 OPT_CMDMODE(0, "quit", &resume.mode,
2290 - N_("abort the patching operation but keep HEAD where it is."),
2290 + N_("abort the patching operation but keep HEAD where it is"),
2291 RESUME_QUIT),
2292 { OPTION_CALLBACK, 0, "show-current-patch", &resume.mode,
2293 "(diff|raw)",
builtin/blame.c
+24 -24
@@ -866,33 +866,33 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
866 const char *revs_file = NULL;
867 const char *contents_from = NULL;
868 const struct option options[] = {
869 - OPT_BOOL(0, "incremental", &incremental, N_("Show blame entries as we find them, incrementally")),
870 - OPT_BOOL('b', NULL, &blank_boundary, N_("Do not show object names of boundary commits (Default: off)")),
871 - OPT_BOOL(0, "root", &show_root, N_("Do not treat root commits as boundaries (Default: off)")),
872 - OPT_BOOL(0, "show-stats", &show_stats, N_("Show work cost statistics")),
873 - OPT_BOOL(0, "progress", &show_progress, N_("Force progress reporting")),
874 - OPT_BIT(0, "score-debug", &output_option, N_("Show output score for blame entries"), OUTPUT_SHOW_SCORE),
875 - OPT_BIT('f', "show-name", &output_option, N_("Show original filename (Default: auto)"), OUTPUT_SHOW_NAME),
876 - OPT_BIT('n', "show-number", &output_option, N_("Show original linenumber (Default: off)"), OUTPUT_SHOW_NUMBER),
877 - OPT_BIT('p', "porcelain", &output_option, N_("Show in a format designed for machine consumption"), OUTPUT_PORCELAIN),
878 - OPT_BIT(0, "line-porcelain", &output_option, N_("Show porcelain format with per-line commit information"), OUTPUT_PORCELAIN|OUTPUT_LINE_PORCELAIN),
879 - OPT_BIT('c', NULL, &output_option, N_("Use the same output mode as git-annotate (Default: off)"), OUTPUT_ANNOTATE_COMPAT),
880 - OPT_BIT('t', NULL, &output_option, N_("Show raw timestamp (Default: off)"), OUTPUT_RAW_TIMESTAMP),
881 - OPT_BIT('l', NULL, &output_option, N_("Show long commit SHA1 (Default: off)"), OUTPUT_LONG_OBJECT_NAME),
882 - OPT_BIT('s', NULL, &output_option, N_("Suppress author name and timestamp (Default: off)"), OUTPUT_NO_AUTHOR),
883 - OPT_BIT('e', "show-email", &output_option, N_("Show author email instead of name (Default: off)"), OUTPUT_SHOW_EMAIL),
884 - OPT_BIT('w', NULL, &xdl_opts, N_("Ignore whitespace differences"), XDF_IGNORE_WHITESPACE),
885 - OPT_STRING_LIST(0, "ignore-rev", &ignore_rev_list, N_("rev"), N_("Ignore <rev> when blaming")),
886 - OPT_STRING_LIST(0, "ignore-revs-file", &ignore_revs_file_list, N_("file"), N_("Ignore revisions from <file>")),
869 + OPT_BOOL(0, "incremental", &incremental, N_("show blame entries as we find them, incrementally")),
870 + OPT_BOOL('b', NULL, &blank_boundary, N_("do not show object names of boundary commits (Default: off)")),
871 + OPT_BOOL(0, "root", &show_root, N_("do not treat root commits as boundaries (Default: off)")),
872 + OPT_BOOL(0, "show-stats", &show_stats, N_("show work cost statistics")),
873 + OPT_BOOL(0, "progress", &show_progress, N_("force progress reporting")),
874 + OPT_BIT(0, "score-debug", &output_option, N_("show output score for blame entries"), OUTPUT_SHOW_SCORE),
875 + OPT_BIT('f', "show-name", &output_option, N_("show original filename (Default: auto)"), OUTPUT_SHOW_NAME),
876 + OPT_BIT('n', "show-number", &output_option, N_("show original linenumber (Default: off)"), OUTPUT_SHOW_NUMBER),
877 + OPT_BIT('p', "porcelain", &output_option, N_("show in a format designed for machine consumption"), OUTPUT_PORCELAIN),
878 + OPT_BIT(0, "line-porcelain", &output_option, N_("show porcelain format with per-line commit information"), OUTPUT_PORCELAIN|OUTPUT_LINE_PORCELAIN),
879 + OPT_BIT('c', NULL, &output_option, N_("use the same output mode as git-annotate (Default: off)"), OUTPUT_ANNOTATE_COMPAT),
880 + OPT_BIT('t', NULL, &output_option, N_("show raw timestamp (Default: off)"), OUTPUT_RAW_TIMESTAMP),
881 + OPT_BIT('l', NULL, &output_option, N_("show long commit SHA1 (Default: off)"), OUTPUT_LONG_OBJECT_NAME),
882 + OPT_BIT('s', NULL, &output_option, N_("suppress author name and timestamp (Default: off)"), OUTPUT_NO_AUTHOR),
883 + OPT_BIT('e', "show-email", &output_option, N_("show author email instead of name (Default: off)"), OUTPUT_SHOW_EMAIL),
884 + OPT_BIT('w', NULL, &xdl_opts, N_("ignore whitespace differences"), XDF_IGNORE_WHITESPACE),
885 + OPT_STRING_LIST(0, "ignore-rev", &ignore_rev_list, N_("rev"), N_("ignore <rev> when blaming")),
886 + OPT_STRING_LIST(0, "ignore-revs-file", &ignore_revs_file_list, N_("file"), N_("ignore revisions from <file>")),
887 OPT_BIT(0, "color-lines", &output_option, N_("color redundant metadata from previous line differently"), OUTPUT_COLOR_LINE),
888 OPT_BIT(0, "color-by-age", &output_option, N_("color lines by age"), OUTPUT_SHOW_AGE_WITH_COLOR),
889 - OPT_BIT(0, "minimal", &xdl_opts, N_("Spend extra cycles to find better match"), XDF_NEED_MINIMAL),
890 - OPT_STRING('S', NULL, &revs_file, N_("file"), N_("Use revisions from <file> instead of calling git-rev-list")),
891 - OPT_STRING(0, "contents", &contents_from, N_("file"), N_("Use <file>'s contents as the final image")),
892 - OPT_CALLBACK_F('C', NULL, &opt, N_("score"), N_("Find line copies within and across files"), PARSE_OPT_OPTARG, blame_copy_callback),
893 - OPT_CALLBACK_F('M', NULL, &opt, N_("score"), N_("Find line movements within and across files"), PARSE_OPT_OPTARG, blame_move_callback),
889 + OPT_BIT(0, "minimal", &xdl_opts, N_("spend extra cycles to find better match"), XDF_NEED_MINIMAL),
890 + OPT_STRING('S', NULL, &revs_file, N_("file"), N_("use revisions from <file> instead of calling git-rev-list")),
891 + OPT_STRING(0, "contents", &contents_from, N_("file"), N_("use <file>'s contents as the final image")),
892 + OPT_CALLBACK_F('C', NULL, &opt, N_("score"), N_("find line copies within and across files"), PARSE_OPT_OPTARG, blame_copy_callback),
893 + OPT_CALLBACK_F('M', NULL, &opt, N_("score"), N_("find line movements within and across files"), PARSE_OPT_OPTARG, blame_move_callback),
894 OPT_STRING_LIST('L', NULL, &range_list, N_("range"),
895 - N_("Process only line range <start>,<end> or function :<funcname>")),
895 + N_("process only line range <start>,<end> or function :<funcname>")),
896 OPT__ABBREV(&abbrev),
897 OPT_END()
898 };
builtin/commit-graph.c
+3 -3
@@ -78,7 +78,7 @@ static int graph_verify(int argc, const char **argv)
78 static struct option builtin_commit_graph_verify_options[] = {
79 OPT_STRING(0, "object-dir", &opts.obj_dir,
80 N_("dir"),
81 - N_("The object directory to store the graph")),
81 + N_("the object directory to store the graph")),
82 OPT_BOOL(0, "shallow", &opts.shallow,
83 N_("if the commit-graph is split, only verify the tip file")),
84 OPT_BOOL(0, "progress", &opts.progress, N_("force progress reporting")),
@@ -208,7 +208,7 @@ static int graph_write(int argc, const char **argv)
208 static struct option builtin_commit_graph_write_options[] = {
209 OPT_STRING(0, "object-dir", &opts.obj_dir,
210 N_("dir"),
211 - N_("The object directory to store the graph")),
211 + N_("the object directory to store the graph")),
212 OPT_BOOL(0, "reachable", &opts.reachable,
213 N_("start walk at all refs")),
214 OPT_BOOL(0, "stdin-packs", &opts.stdin_packs,
@@ -314,7 +314,7 @@ int cmd_commit_graph(int argc, const char **argv, const char *prefix)
314 static struct option builtin_commit_graph_options[] = {
315 OPT_STRING(0, "object-dir", &opts.obj_dir,
316 N_("dir"),
317 - N_("The object directory to store the graph")),
317 + N_("the object directory to store the graph")),
318 OPT_END(),
319 };
320
builtin/fast-export.c
+11 -11
@@ -1205,32 +1205,32 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
1205 N_("select handling of commit messages in an alternate encoding"),
1206 parse_opt_reencode_mode),
1207 OPT_STRING(0, "export-marks", &export_filename, N_("file"),
1208 - N_("Dump marks to this file")),
1208 + N_("dump marks to this file")),
1209 OPT_STRING(0, "import-marks", &import_filename, N_("file"),
1210 - N_("Import marks from this file")),
1210 + N_("import marks from this file")),
1211 OPT_STRING(0, "import-marks-if-exists",
1212 &import_filename_if_exists,
1213 N_("file"),
1214 - N_("Import marks from this file if it exists")),
1214 + N_("import marks from this file if it exists")),
1215 OPT_BOOL(0, "fake-missing-tagger", &fake_missing_tagger,
1216 - N_("Fake a tagger when tags lack one")),
1216 + N_("fake a tagger when tags lack one")),
1217 OPT_BOOL(0, "full-tree", &full_tree,
1218 - N_("Output full tree for each commit")),
1218 + N_("output full tree for each commit")),
1219 OPT_BOOL(0, "use-done-feature", &use_done_feature,
1220 - N_("Use the done feature to terminate the stream")),
1221 - OPT_BOOL(0, "no-data", &no_data, N_("Skip output of blob data")),
1220 + N_("use the done feature to terminate the stream")),
1221 + OPT_BOOL(0, "no-data", &no_data, N_("skip output of blob data")),
1222 OPT_STRING_LIST(0, "refspec", &refspecs_list, N_("refspec"),
1223 - N_("Apply refspec to exported refs")),
1223 + N_("apply refspec to exported refs")),
1224 OPT_BOOL(0, "anonymize", &anonymize, N_("anonymize output")),
1225 OPT_CALLBACK_F(0, "anonymize-map", &anonymized_seeds, N_("from:to"),
1226 N_("convert <from> to <to> in anonymized output"),
1227 PARSE_OPT_NONEG, parse_opt_anonymize_map),
1228 OPT_BOOL(0, "reference-excluded-parents",
1229 - &reference_excluded_commits, N_("Reference parents which are not in fast-export stream by object id")),
1229 + &reference_excluded_commits, N_("reference parents which are not in fast-export stream by object id")),
1230 OPT_BOOL(0, "show-original-ids", &show_original_ids,
1231 - N_("Show original object ids of blobs/commits")),
1231 + N_("show original object ids of blobs/commits")),
1232 OPT_BOOL(0, "mark-tags", &mark_tags,
1233 - N_("Label tags with mark ids")),
1233 + N_("label tags with mark ids")),
1234
1235 OPT_END()
1236 };
builtin/log.c
+4 -4
@@ -177,7 +177,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
177 const struct option builtin_log_options[] = {
178 OPT__QUIET(&quiet, N_("suppress diff output")),
179 OPT_BOOL(0, "source", &source, N_("show source")),
180 - OPT_BOOL(0, "use-mailmap", &mailmap, N_("Use mail map file")),
180 + OPT_BOOL(0, "use-mailmap", &mailmap, N_("use mail map file")),
181 OPT_ALIAS(0, "mailmap", "use-mailmap"),
182 OPT_STRING_LIST(0, "decorate-refs", &decorate_refs_include,
183 N_("pattern"), N_("only decorate refs that match <pattern>")),
@@ -186,7 +186,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
186 OPT_CALLBACK_F(0, "decorate", NULL, NULL, N_("decorate options"),
187 PARSE_OPT_OPTARG, decorate_callback),
188 OPT_CALLBACK('L', NULL, &line_cb, "range:file",
189 - N_("Trace the evolution of line range <start>,<end> or function :<funcname> in <file>"),
189 + N_("trace the evolution of line range <start>,<end> or function :<funcname> in <file>"),
190 log_line_range_callback),
191 OPT_END()
192 };
@@ -1757,13 +1757,13 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
1757 OPT_INTEGER(0, "filename-max-length", &fmt_patch_name_max,
1758 N_("max length of output filename")),
1759 OPT_CALLBACK_F(0, "rfc", &rev, NULL,
1760 - N_("Use [RFC PATCH] instead of [PATCH]"),
1760 + N_("use [RFC PATCH] instead of [PATCH]"),
1761 PARSE_OPT_NOARG | PARSE_OPT_NONEG, rfc_callback),
1762 OPT_STRING(0, "cover-from-description", &cover_from_description_arg,
1763 N_("cover-from-description-mode"),
1764 N_("generate parts of a cover letter based on a branch's description")),
1765 OPT_CALLBACK_F(0, "subject-prefix", &rev, N_("prefix"),
1766 - N_("Use [<prefix>] instead of [PATCH]"),
1766 + N_("use [<prefix>] instead of [PATCH]"),
1767 PARSE_OPT_NONEG, subject_prefix_callback),
1768 OPT_CALLBACK_F('o', "output-directory", &output_directory,
1769 N_("dir"), N_("store resulting files in <dir>"),
builtin/shortlog.c
+5 -5
@@ -360,19 +360,19 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix)
360
361 const struct option options[] = {
362 OPT_BIT('c', "committer", &log.groups,
363 - N_("Group by committer rather than author"),
363 + N_("group by committer rather than author"),
364 SHORTLOG_GROUP_COMMITTER),
365 OPT_BOOL('n', "numbered", &log.sort_by_number,
366 N_("sort output according to the number of commits per author")),
367 OPT_BOOL('s', "summary", &log.summary,
368 - N_("Suppress commit descriptions, only provides commit count")),
368 + N_("suppress commit descriptions, only provides commit count")),
369 OPT_BOOL('e', "email", &log.email,
370 - N_("Show the email address of each author")),
370 + N_("show the email address of each author")),
371 OPT_CALLBACK_F('w', NULL, &log, N_("<w>[,<i1>[,<i2>]]"),
372 - N_("Linewrap output"), PARSE_OPT_OPTARG,
372 + N_("linewrap output"), PARSE_OPT_OPTARG,
373 &parse_wrap_args),
374 OPT_CALLBACK(0, "group", &log, N_("field"),
375 - N_("Group by field"), parse_group_option),
375 + N_("group by field"), parse_group_option),
376 OPT_END(),
377 };
378
builtin/submodule--helper.c
+12 -12
@@ -562,9 +562,9 @@ static int module_foreach(int argc, const char **argv, const char *prefix)
562 struct module_list list = MODULE_LIST_INIT;
563
564 struct option module_foreach_options[] = {
565 - OPT__QUIET(&info.quiet, N_("Suppress output of entering each submodule command")),
565 + OPT__QUIET(&info.quiet, N_("suppress output of entering each submodule command")),
566 OPT_BOOL(0, "recursive", &info.recursive,
567 - N_("Recurse into nested submodules")),
567 + N_("recurse into nested submodules")),
568 OPT_END()
569 };
570
@@ -706,7 +706,7 @@ static int module_init(int argc, const char **argv, const char *prefix)
706 int quiet = 0;
707
708 struct option module_init_options[] = {
709 - OPT__QUIET(&quiet, N_("Suppress output for initializing a submodule")),
709 + OPT__QUIET(&quiet, N_("suppress output for initializing a submodule")),
710 OPT_END()
711 };
712
@@ -883,8 +883,8 @@ static int module_status(int argc, const char **argv, const char *prefix)
883 int quiet = 0;
884
885 struct option module_status_options[] = {
886 - OPT__QUIET(&quiet, N_("Suppress submodule status output")),
887 - OPT_BIT(0, "cached", &info.flags, N_("Use commit stored in the index instead of the one stored in the submodule HEAD"), OPT_CACHED),
886 + OPT__QUIET(&quiet, N_("suppress submodule status output")),
887 + OPT_BIT(0, "cached", &info.flags, N_("use commit stored in the index instead of the one stored in the submodule HEAD"), OPT_CACHED),
888 OPT_BIT(0, "recursive", &info.flags, N_("recurse into nested submodules"), OPT_RECURSIVE),
889 OPT_END()
890 };
@@ -1482,9 +1482,9 @@ static int module_sync(int argc, const char **argv, const char *prefix)
1482 int recursive = 0;
1483
1484 struct option module_sync_options[] = {
1485 - OPT__QUIET(&quiet, N_("Suppress output of synchronizing submodule url")),
1485 + OPT__QUIET(&quiet, N_("suppress output of synchronizing submodule url")),
1486 OPT_BOOL(0, "recursive", &recursive,
1487 - N_("Recurse into nested submodules")),
1487 + N_("recurse into nested submodules")),
1488 OPT_END()
1489 };
1490
@@ -1620,9 +1620,9 @@ static int module_deinit(int argc, const char **argv, const char *prefix)
1620 int all = 0;
1621
1622 struct option module_deinit_options[] = {
1623 - OPT__QUIET(&quiet, N_("Suppress submodule status output")),
1624 - OPT__FORCE(&force, N_("Remove submodule working trees even if they contain local changes"), 0),
1625 - OPT_BOOL(0, "all", &all, N_("Unregister all submodules")),
1623 + OPT__QUIET(&quiet, N_("suppress submodule status output")),
1624 + OPT__FORCE(&force, N_("remove submodule working trees even if they contain local changes"), 0),
1625 + OPT_BOOL(0, "all", &all, N_("unregister all submodules")),
1626 OPT_END()
1627 };
1628
@@ -2337,7 +2337,7 @@ static int update_clone(int argc, const char **argv, const char *prefix)
2337 OPT_BOOL(0, "dissociate", &suc.dissociate,
2338 N_("use --reference only while cloning")),
2339 OPT_STRING(0, "depth", &suc.depth, "<depth>",
2340 - N_("Create a shallow clone truncated to the "
2340 + N_("create a shallow clone truncated to the "
2341 "specified number of revisions")),
2342 OPT_INTEGER('j', "jobs", &suc.max_jobs,
2343 N_("parallel jobs")),
@@ -2678,7 +2678,7 @@ static int module_set_url(int argc, const char **argv, const char *prefix)
2678 char *config_name;
2679
2680 struct option options[] = {
2681 - OPT__QUIET(&quiet, N_("Suppress output for setting url of a submodule")),
2681 + OPT__QUIET(&quiet, N_("suppress output for setting url of a submodule")),
2682 OPT_END()
2683 };
2684 const char *const usage[] = {