standardize usage info string format

This patch puts the usage info strings that were not already in docopt- like format into docopt-like format, which will be a litle easier for end users and a lot easier for translators. Changes include: - Placing angle brackets around fill-in-the-blank parameters - Putting dashes in multiword parameter names - Adding spaces to [-f|--foobar] to make [-f | --foobar] - Replacing <foobar>* with [<foobar>...] Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Alex Henrie committed Jan 13, 2015 at 00:44 UTC 9c9b4f2f8b7f27f3984e80d053106d5d41cbb03b
64 files changed +109 -105
Documentation/CodingGuidelines
+6 -2
@@ -441,6 +441,10 @@ Writing Documentation:
441 --sort=<key>
442 --abbrev[=<n>]
443
444 + If a placeholder has multiple words, they are separated by dashes:
445 + <new-branch-name>
446 + --template=<template-directory>
447 +
448 Possibility of multiple occurrences is indicated by three dots:
449 <file>...
450 (One or more of <file>.)
@@ -457,12 +461,12 @@ Writing Documentation:
461 (Zero or more of <patch>. Note that the dots are inside, not
462 outside the brackets.)
463
460 - Multiple alternatives are indicated with vertical bar:
464 + Multiple alternatives are indicated with vertical bars:
465 [-q | --quiet]
466 [--utf8 | --no-utf8]
467
468 Parentheses are used for grouping:
465 - [(<rev>|<range>)...]
469 + [(<rev> | <range>)...]
470 (Any number of either <rev> or <range>. Parens are needed to make
471 it clear that "..." pertains to both <rev> and <range>.)
472
advice.c
+1 -1
@@ -105,7 +105,7 @@ void detach_advice(const char *new_name)
105 "state without impacting any branches by performing another checkout.\n\n"
106 "If you want to create a new branch to retain commits you create, you may\n"
107 "do so (now or later) by using -b with the checkout command again. Example:\n\n"
108 - " git checkout -b new_branch_name\n\n";
108 + " git checkout -b <new-branch-name>\n\n";
109
110 fprintf(stderr, fmt, new_name);
111 }
archive.c
+2 -2
@@ -8,9 +8,9 @@
8 #include "dir.h"
9
10 static char const * const archive_usage[] = {
11 - N_("git archive [options] <tree-ish> [<path>...]"),
11 + N_("git archive [<options>] <tree-ish> [<path>...]"),
12 N_("git archive --list"),
13 - N_("git archive --remote <repo> [--exec <cmd>] [options] <tree-ish> [<path>...]"),
13 + N_("git archive --remote <repo> [--exec <cmd>] [<options>] <tree-ish> [<path>...]"),
14 N_("git archive --remote <repo> [--exec <cmd>] --list"),
15 NULL
16 };
builtin/add.c
+1 -1
@@ -19,7 +19,7 @@
19 #include "argv-array.h"
20
21 static const char * const builtin_add_usage[] = {
22 - N_("git add [options] [--] <pathspec>..."),
22 + N_("git add [<options>] [--] <pathspec>..."),
23 NULL
24 };
25 static int patch_interactive, add_interactive, edit_interactive;
builtin/apply.c
+1 -1
@@ -55,7 +55,7 @@ static const char *fake_ancestor;
55 static int line_termination = '\n';
56 static unsigned int p_context = UINT_MAX;
57 static const char * const apply_usage[] = {
58 - N_("git apply [options] [<patch>...]"),
58 + N_("git apply [<options>] [<patch>...]"),
59 NULL
60 };
61
builtin/blame.c
+2 -2
@@ -27,12 +27,12 @@
27 #include "line-range.h"
28 #include "line-log.h"
29
30 -static char blame_usage[] = N_("git blame [options] [rev-opts] [rev] [--] file");
30 +static char blame_usage[] = N_("git blame [<options>] [<rev-opts>] [<rev>] [--] file");
31
32 static const char *blame_opt_usage[] = {
33 blame_usage,
34 "",
35 - N_("[rev-opts] are documented in git-rev-list(1)"),
35 + N_("<rev-opts> are documented in git-rev-list(1)"),
36 NULL
37 };
38
builtin/branch.c
+4 -4
@@ -21,10 +21,10 @@
21 #include "wt-status.h"
22
23 static const char * const builtin_branch_usage[] = {
24 - N_("git branch [options] [-r | -a] [--merged | --no-merged]"),
25 - N_("git branch [options] [-l] [-f] <branchname> [<start-point>]"),
26 - N_("git branch [options] [-r] (-d | -D) <branchname>..."),
27 - N_("git branch [options] (-m | -M) [<oldbranch>] <newbranch>"),
24 + N_("git branch [<options>] [-r | -a] [--merged | --no-merged]"),
25 + N_("git branch [<options>] [-l] [-f] <branch-name> [<start-point>]"),
26 + N_("git branch [<options>] [-r] (-d | -D) <branch-name>..."),
27 + N_("git branch [<options>] (-m | -M) [<old-branch>] <new-branch>"),
28 NULL
29 };
30
builtin/cat-file.c
+2 -2
@@ -329,8 +329,8 @@ static int batch_objects(struct batch_options *opt)
329 }
330
331 static const char * const cat_file_usage[] = {
332 - N_("git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>"),
333 - N_("git cat-file (--batch|--batch-check) < <list_of_objects>"),
332 + N_("git cat-file (-t | -s | -e | -p | <type> | --textconv) <object>"),
333 + N_("git cat-file (--batch | --batch-check) < <list-of-objects>"),
334 NULL
335 };
336
builtin/check-attr.c
+2 -2
@@ -8,8 +8,8 @@ static int all_attrs;
8 static int cached_attrs;
9 static int stdin_paths;
10 static const char * const check_attr_usage[] = {
11 -N_("git check-attr [-a | --all | attr...] [--] pathname..."),
12 -N_("git check-attr --stdin [-z] [-a | --all | attr...] < <list-of-paths>"),
11 +N_("git check-attr [-a | --all | <attr>...] [--] <pathname>..."),
12 +N_("git check-attr --stdin [-z] [-a | --all | <attr>...] < <list-of-paths>"),
13 NULL
14 };
15
builtin/check-ignore.c
+2 -2
@@ -7,8 +7,8 @@
7
8 static int quiet, verbose, stdin_paths, show_non_matching, no_index;
9 static const char * const check_ignore_usage[] = {
10 -"git check-ignore [options] pathname...",
11 -"git check-ignore [options] --stdin < <list-of-paths>",
10 +"git check-ignore [<options>] <pathname>...",
11 +"git check-ignore [<options>] --stdin < <list-of-paths>",
12 NULL
13 };
14
builtin/check-mailmap.c
+1 -1
@@ -5,7 +5,7 @@
5
6 static int use_stdin;
7 static const char * const check_mailmap_usage[] = {
8 -N_("git check-mailmap [options] <contact>..."),
8 +N_("git check-mailmap [<options>] <contact>..."),
9 NULL
10 };
11
builtin/check-ref-format.c
+1 -1
@@ -8,7 +8,7 @@
8 #include "strbuf.h"
9
10 static const char builtin_check_ref_format_usage[] =
11 -"git check-ref-format [--normalize] [options] <refname>\n"
11 +"git check-ref-format [--normalize] [<options>] <refname>\n"
12 " or: git check-ref-format --branch <branchname-shorthand>";
13
14 /*
builtin/checkout-index.c
+1 -1
@@ -123,7 +123,7 @@ static void checkout_all(const char *prefix, int prefix_length)
123 }
124
125 static const char * const builtin_checkout_index_usage[] = {
126 - N_("git checkout-index [options] [--] [<file>...]"),
126 + N_("git checkout-index [<options>] [--] [<file>...]"),
127 NULL
128 };
129
builtin/checkout.c
+4 -4
@@ -22,8 +22,8 @@
22 #include "argv-array.h"
23
24 static const char * const checkout_usage[] = {
25 - N_("git checkout [options] <branch>"),
26 - N_("git checkout [options] [<branch>] -- <file>..."),
25 + N_("git checkout [<options>] <branch>"),
26 + N_("git checkout [<options>] [<branch>] -- <file>..."),
27 NULL,
28 };
29
@@ -746,7 +746,7 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs)
746 _(
747 "If you want to keep them by creating a new branch, "
748 "this may be a good time\nto do so with:\n\n"
749 - " git branch new_branch_name %s\n\n"),
749 + " git branch <new-branch-name> %s\n\n"),
750 find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));
751 }
752
@@ -1127,7 +1127,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
1127 OPT_BOOL(0, "ignore-skip-worktree-bits", &opts.ignore_skipworktree,
1128 N_("do not limit pathspecs to sparse entries only")),
1129 OPT_HIDDEN_BOOL(0, "guess", &dwim_new_local_branch,
1130 - N_("second guess 'git checkout no-such-branch'")),
1130 + N_("second guess 'git checkout <no-such-branch>'")),
1131 OPT_END(),
1132 };
1133
builtin/clone.c
+1 -1
@@ -34,7 +34,7 @@
34 *
35 */
36 static const char * const builtin_clone_usage[] = {
37 - N_("git clone [options] [--] <repo> [<dir>]"),
37 + N_("git clone [<options>] [--] <repo> [<dir>]"),
38 NULL
39 };
40
builtin/column.c
+1 -1
@@ -6,7 +6,7 @@
6 #include "column.h"
7
8 static const char * const builtin_column_usage[] = {
9 - N_("git column [options]"),
9 + N_("git column [<options>]"),
10 NULL
11 };
12 static unsigned int colopts;
builtin/commit.c
+2 -2
@@ -34,12 +34,12 @@
34 #include "mailmap.h"
35
36 static const char * const builtin_commit_usage[] = {
37 - N_("git commit [options] [--] <pathspec>..."),
37 + N_("git commit [<options>] [--] <pathspec>..."),
38 NULL
39 };
40
41 static const char * const builtin_status_usage[] = {
42 - N_("git status [options] [--] <pathspec>..."),
42 + N_("git status [<options>] [--] <pathspec>..."),
43 NULL
44 };
45
builtin/config.c
+1 -1
@@ -5,7 +5,7 @@
5 #include "urlmatch.h"
6
7 static const char *const builtin_config_usage[] = {
8 - N_("git config [options]"),
8 + N_("git config [<options>]"),
9 NULL
10 };
11
builtin/describe.c
+2 -2
@@ -14,8 +14,8 @@
14 #define MAX_TAGS (FLAG_BITS - 1)
15
16 static const char * const describe_usage[] = {
17 - N_("git describe [options] <commit-ish>*"),
18 - N_("git describe [options] --dirty"),
17 + N_("git describe [<options>] [<commit-ish>...]"),
18 + N_("git describe [<options>] --dirty"),
19 NULL
20 };
21
builtin/diff-files.c
+1 -1
@@ -11,7 +11,7 @@
11 #include "submodule.h"
12
13 static const char diff_files_usage[] =
14 -"git diff-files [-q] [-0/-1/2/3 |-c|--cc] [<common diff options>] [<path>...]"
14 +"git diff-files [-q] [-0 | -1 | -2 | -3 | -c | --cc] [<common-diff-options>] [<path>...]"
15 COMMON_DIFF_OPTIONS_HELP;
16
17 int cmd_diff_files(int argc, const char **argv, const char *prefix)
builtin/diff-index.c
+1 -1
@@ -7,7 +7,7 @@
7
8 static const char diff_cache_usage[] =
9 "git diff-index [-m] [--cached] "
10 -"[<common diff options>] <tree-ish> [<path>...]"
10 +"[<common-diff-options>] <tree-ish> [<path>...]"
11 COMMON_DIFF_OPTIONS_HELP;
12
13 int cmd_diff_index(int argc, const char **argv, const char *prefix)
builtin/diff-tree.c
+1 -1
@@ -82,7 +82,7 @@ static int diff_tree_stdin(char *line)
82
83 static const char diff_tree_usage[] =
84 "git diff-tree [--stdin] [-m] [-c] [--cc] [-s] [-v] [--pretty] [-t] [-r] [--root] "
85 -"[<common diff options>] <tree-ish> [<tree-ish>] [<path>...]\n"
85 +"[<common-diff-options>] <tree-ish> [<tree-ish>] [<path>...]\n"
86 " -r diff recursively\n"
87 " --root include the initial commit as diff against /dev/null\n"
88 COMMON_DIFF_OPTIONS_HELP;
builtin/fetch-pack.c
+1 -1
@@ -6,7 +6,7 @@
6 #include "sha1-array.h"
7
8 static const char fetch_pack_usage[] =
9 -"git fetch-pack [--all] [--stdin] [--quiet|-q] [--keep|-k] [--thin] "
9 +"git fetch-pack [--all] [--stdin] [--quiet | -q] [--keep | -k] [--thin] "
10 "[--include-tag] [--upload-pack=<git-upload-pack>] [--depth=<n>] "
11 "[--no-progress] [--diag-url] [-v] [<host>:]<directory> [<refs>...]";
12
builtin/fmt-merge-msg.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "gpg-interface.h"
11
12 static const char * const fmt_merge_msg_usage[] = {
13 - N_("git fmt-merge-msg [-m <message>] [--log[=<n>]|--no-log] [--file <file>]"),
13 + N_("git fmt-merge-msg [-m <message>] [--log[=<n>] | --no-log] [--file <file>]"),
14 NULL
15 };
16
builtin/for-each-ref.c
+1 -1
@@ -1054,7 +1054,7 @@ static int opt_parse_sort(const struct option *opt, const char *arg, int unset)
1054 }
1055
1056 static char const * const for_each_ref_usage[] = {
1057 - N_("git for-each-ref [options] [<pattern>]"),
1057 + N_("git for-each-ref [<options>] [<pattern>]"),
1058 NULL
1059 };
1060
builtin/fsck.c
+1 -1
@@ -600,7 +600,7 @@ static int fsck_cache_tree(struct cache_tree *it)
600 }
601
602 static char const * const fsck_usage[] = {
603 - N_("git fsck [options] [<object>...]"),
603 + N_("git fsck [<options>] [<object>...]"),
604 NULL
605 };
606
builtin/gc.c
+1 -1
@@ -21,7 +21,7 @@
21 #define FAILED_RUN "failed to run %s"
22
23 static const char * const builtin_gc_usage[] = {
24 - N_("git gc [options]"),
24 + N_("git gc [<options>]"),
25 NULL
26 };
27
builtin/grep.c
+1 -1
@@ -20,7 +20,7 @@
20 #include "pathspec.h"
21
22 static char const * const grep_usage[] = {
23 - N_("git grep [options] [-e] <pattern> [<rev>...] [[--] <path>...]"),
23 + N_("git grep [<options>] [-e] <pattern> [<rev>...] [[--] <path>...]"),
24 NULL
25 };
26
builtin/hash-object.c
+1 -1
@@ -79,7 +79,7 @@ static void hash_stdin_paths(const char *type, int no_filters, unsigned flags,
79 int cmd_hash_object(int argc, const char **argv, const char *prefix)
80 {
81 static const char * const hash_object_usage[] = {
82 - N_("git hash-object [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin] [--] <file>..."),
82 + N_("git hash-object [-t <type>] [-w] [--path=<file> | --no-filters] [--stdin] [--] <file>..."),
83 N_("git hash-object --stdin-paths < <list-of-paths>"),
84 NULL
85 };
builtin/help.c
+1 -1
@@ -49,7 +49,7 @@ static struct option builtin_help_options[] = {
49 };
50
51 static const char * const builtin_help_usage[] = {
52 - N_("git help [--all] [--guides] [--man|--web|--info] [command]"),
52 + N_("git help [--all] [--guides] [--man | --web | --info] [<command>]"),
53 NULL
54 };
55
builtin/init-db.c
+1 -1
@@ -472,7 +472,7 @@ static int shared_callback(const struct option *opt, const char *arg, int unset)
472 }
473
474 static const char *const init_db_usage[] = {
475 - N_("git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [directory]"),
475 + N_("git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [<directory>]"),
476 NULL
477 };
478
builtin/log.c
+3 -3
@@ -38,8 +38,8 @@ static const char *fmt_patch_subject_prefix = "PATCH";
38 static const char *fmt_pretty;
39
40 static const char * const builtin_log_usage[] = {
41 - N_("git log [<options>] [<revision range>] [[--] <path>...]\n")
42 - N_(" or: git show [options] <object>..."),
41 + N_("git log [<options>] [<revision-range>] [[--] <path>...]\n")
42 + N_(" or: git show [<options>] <object>..."),
43 NULL
44 };
45
@@ -1023,7 +1023,7 @@ static const char *set_outdir(const char *prefix, const char *output_directory)
1023 }
1024
1025 static const char * const builtin_format_patch_usage[] = {
1026 - N_("git format-patch [options] [<since> | <revision range>]"),
1026 + N_("git format-patch [<options>] [<since> | <revision-range>]"),
1027 NULL
1028 };
1029
builtin/ls-files.c
+1 -1
@@ -398,7 +398,7 @@ int report_path_error(const char *ps_matched,
398 }
399
400 static const char * const ls_files_usage[] = {
401 - N_("git ls-files [options] [<file>...]"),
401 + N_("git ls-files [<options>] [<file>...]"),
402 NULL
403 };
404
builtin/ls-remote.c
+1 -1
@@ -5,7 +5,7 @@
5
6 static const char ls_remote_usage[] =
7 "git ls-remote [--heads] [--tags] [-u <exec> | --upload-pack <exec>]\n"
8 -" [-q|--quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]";
8 +" [-q | --quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]";
9
10 /*
11 * Is there one among the list of patterns that match the tail part
builtin/mailinfo.c
+1 -1
@@ -1031,7 +1031,7 @@ static int git_mailinfo_config(const char *var, const char *value, void *unused)
1031 }
1032
1033 static const char mailinfo_usage[] =
1034 - "git mailinfo [-k|-b] [-m | --message-id] [-u | --encoding=<encoding> | -n] [--scissors | --no-scissors] msg patch < mail >info";
1034 + "git mailinfo [-k | -b] [-m | --message-id] [-u | --encoding=<encoding> | -n] [--scissors | --no-scissors] <msg> <patch> < mail >info";
1035
1036 int cmd_mailinfo(int argc, const char **argv, const char *prefix)
1037 {
builtin/merge-base.c
+2 -2
@@ -26,8 +26,8 @@ static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
26 }
27
28 static const char * const merge_base_usage[] = {
29 - N_("git merge-base [-a|--all] <commit> <commit>..."),
30 - N_("git merge-base [-a|--all] --octopus <commit>..."),
29 + N_("git merge-base [-a | --all] <commit> <commit>..."),
30 + N_("git merge-base [-a | --all] --octopus <commit>..."),
31 N_("git merge-base --independent <commit>..."),
32 N_("git merge-base --is-ancestor <commit> <commit>"),
33 N_("git merge-base --fork-point <ref> [<commit>]"),
builtin/merge-file.c
+2 -2
@@ -5,7 +5,7 @@
5 #include "parse-options.h"
6
7 static const char *const merge_file_usage[] = {
8 - N_("git merge-file [options] [-L name1 [-L orig [-L name2]]] file1 orig_file file2"),
8 + N_("git merge-file [<options>] [-L <name1> [-L <orig> [-L <name2>]]] <file1> <orig-file> <file2>"),
9 NULL
10 };
11
@@ -42,7 +42,7 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
42 N_("for conflicts, use this marker size")),
43 OPT__QUIET(&quiet, N_("do not warn about conflicts")),
44 OPT_CALLBACK('L', NULL, names, N_("name"),
45 - N_("set labels for file1/orig_file/file2"), &label_cb),
45 + N_("set labels for file1/orig-file/file2"), &label_cb),
46 OPT_END(),
47 };
48
builtin/merge-index.c
+1 -1
@@ -75,7 +75,7 @@ int cmd_merge_index(int argc, const char **argv, const char *prefix)
75 signal(SIGCHLD, SIG_DFL);
76
77 if (argc < 3)
78 - usage("git merge-index [-o] [-q] <merge-program> (-a | [--] <filename>*)");
78 + usage("git merge-index [-o] [-q] <merge-program> (-a | [--] [<filename>...])");
79
80 read_cache();
81
builtin/merge.c
+2 -2
@@ -42,8 +42,8 @@ struct strategy {
42 };
43
44 static const char * const builtin_merge_usage[] = {
45 - N_("git merge [options] [<commit>...]"),
46 - N_("git merge [options] <msg> HEAD <commit>"),
45 + N_("git merge [<options>] [<commit>...]"),
46 + N_("git merge [<options>] <msg> HEAD <commit>"),
47 N_("git merge --abort"),
48 NULL
49 };
builtin/mv.c
+1 -1
@@ -12,7 +12,7 @@
12 #include "submodule.h"
13
14 static const char * const builtin_mv_usage[] = {
15 - N_("git mv [options] <source>... <destination>"),
15 + N_("git mv [<options>] <source>... <destination>"),
16 NULL
17 };
18
builtin/name-rev.c
+3 -3
@@ -252,9 +252,9 @@ static void show_name(const struct object *obj,
252 }
253
254 static char const * const name_rev_usage[] = {
255 - N_("git name-rev [options] <commit>..."),
256 - N_("git name-rev [options] --all"),
257 - N_("git name-rev [options] --stdin"),
255 + N_("git name-rev [<options>] <commit>..."),
256 + N_("git name-rev [<options>] --all"),
257 + N_("git name-rev [<options>] --stdin"),
258 NULL
259 };
260
builtin/notes.c
+12 -12
@@ -21,18 +21,18 @@
21 #include "notes-utils.h"
22
23 static const char * const git_notes_usage[] = {
24 - N_("git notes [--ref <notes_ref>] [list [<object>]]"),
25 - N_("git notes [--ref <notes_ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
26 - N_("git notes [--ref <notes_ref>] copy [-f] <from-object> <to-object>"),
27 - N_("git notes [--ref <notes_ref>] append [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
28 - N_("git notes [--ref <notes_ref>] edit [--allow-empty] [<object>]"),
29 - N_("git notes [--ref <notes_ref>] show [<object>]"),
30 - N_("git notes [--ref <notes_ref>] merge [-v | -q] [-s <strategy> ] <notes_ref>"),
24 + N_("git notes [--ref <notes-ref>] [list [<object>]]"),
25 + N_("git notes [--ref <notes-ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
26 + N_("git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"),
27 + N_("git notes [--ref <notes-ref>] append [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
28 + N_("git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"),
29 + N_("git notes [--ref <notes-ref>] show [<object>]"),
30 + N_("git notes [--ref <notes-ref>] merge [-v | -q] [-s <strategy>] <notes-ref>"),
31 N_("git notes merge --commit [-v | -q]"),
32 N_("git notes merge --abort [-v | -q]"),
33 - N_("git notes [--ref <notes_ref>] remove [<object>...]"),
34 - N_("git notes [--ref <notes_ref>] prune [-n | -v]"),
35 - N_("git notes [--ref <notes_ref>] get-ref"),
33 + N_("git notes [--ref <notes-ref>] remove [<object>...]"),
34 + N_("git notes [--ref <notes-ref>] prune [-n | -v]"),
35 + N_("git notes [--ref <notes-ref>] get-ref"),
36 NULL
37 };
38
@@ -68,7 +68,7 @@ static const char * const git_notes_show_usage[] = {
68 };
69
70 static const char * const git_notes_merge_usage[] = {
71 - N_("git notes merge [<options>] <notes_ref>"),
71 + N_("git notes merge [<options>] <notes-ref>"),
72 N_("git notes merge --commit [<options>]"),
73 N_("git notes merge --abort [<options>]"),
74 NULL
@@ -951,7 +951,7 @@ int cmd_notes(int argc, const char **argv, const char *prefix)
951 const char *override_notes_ref = NULL;
952 struct option options[] = {
953 OPT_STRING(0, "ref", &override_notes_ref, N_("notes-ref"),
954 - N_("use notes from <notes_ref>")),
954 + N_("use notes from <notes-ref>")),
955 OPT_END()
956 };
957
builtin/pack-redundant.c
+1 -1
@@ -11,7 +11,7 @@
11 #define BLKSIZE 512
12
13 static const char pack_redundant_usage[] =
14 -"git pack-redundant [ --verbose ] [ --alt-odb ] < --all | <.pack filename> ...>";
14 +"git pack-redundant [--verbose] [--alt-odb] (--all | <filename.pack>...)";
15
16 static int load_all_packs, verbose, alt_odb;
17
builtin/pack-refs.c
+1 -1
@@ -3,7 +3,7 @@
3 #include "refs.h"
4
5 static char const * const pack_refs_usage[] = {
6 - N_("git pack-refs [options]"),
6 + N_("git pack-refs [<options>]"),
7 NULL
8 };
9
builtin/prune-packed.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "parse-options.h"
5
6 static const char * const prune_packed_usage[] = {
7 - N_("git prune-packed [-n|--dry-run] [-q|--quiet]"),
7 + N_("git prune-packed [-n | --dry-run] [-q | --quiet]"),
8 NULL
9 };
10
builtin/remote.c
+2 -2
@@ -10,10 +10,10 @@
10
11 static const char * const builtin_remote_usage[] = {
12 N_("git remote [-v | --verbose]"),
13 - N_("git remote add [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <name> <url>"),
13 + N_("git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--mirror=<fetch|push>] <name> <url>"),
14 N_("git remote rename <old> <new>"),
15 N_("git remote remove <name>"),
16 - N_("git remote set-head <name> (-a | --auto | -d | --delete |<branch>)"),
16 + N_("git remote set-head <name> (-a | --auto | -d | --delete | <branch>)"),
17 N_("git remote [-v | --verbose] show [-n] <name>"),
18 N_("git remote prune [-n | --dry-run] <name>"),
19 N_("git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]"),
builtin/repack.c
+1 -1
@@ -14,7 +14,7 @@ static int write_bitmaps;
14 static char *packdir, *packtmp;
15
16 static const char *const git_repack_usage[] = {
17 - N_("git repack [options]"),
17 + N_("git repack [<options>]"),
18 NULL
19 };
20
builtin/rerere.c
+1 -1
@@ -9,7 +9,7 @@
9 #include "pathspec.h"
10
11 static const char * const rerere_usage[] = {
12 - N_("git rerere [clear | forget path... | status | remaining | diff | gc]"),
12 + N_("git rerere [clear | forget <path>... | status | remaining | diff | gc]"),
13 NULL,
14 };
15
builtin/rev-parse.c
+3 -3
@@ -358,7 +358,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix)
358 {
359 static int keep_dashdash = 0, stop_at_non_option = 0;
360 static char const * const parseopt_usage[] = {
361 - N_("git rev-parse --parseopt [options] -- [<args>...]"),
361 + N_("git rev-parse --parseopt [<options>] -- [<args>...]"),
362 NULL
363 };
364 static struct option parseopt_opts[] = {
@@ -496,9 +496,9 @@ static void die_no_single_rev(int quiet)
496 }
497
498 static const char builtin_rev_parse_usage[] =
499 -N_("git rev-parse --parseopt [options] -- [<args>...]\n"
499 +N_("git rev-parse --parseopt [<options>] -- [<args>...]\n"
500 " or: git rev-parse --sq-quote [<arg>...]\n"
501 - " or: git rev-parse [options] [<arg>...]\n"
501 + " or: git rev-parse [<options>] [<arg>...]\n"
502 "\n"
503 "Run \"git rev-parse --parseopt -h\" for more information on the first usage.");
504
builtin/revert.c
+2 -2
@@ -19,13 +19,13 @@
19 */
20
21 static const char * const revert_usage[] = {
22 - N_("git revert [options] <commit-ish>..."),
22 + N_("git revert [<options>] <commit-ish>..."),
23 N_("git revert <subcommand>"),
24 NULL
25 };
26
27 static const char * const cherry_pick_usage[] = {
28 - N_("git cherry-pick [options] <commit-ish>..."),
28 + N_("git cherry-pick [<options>] <commit-ish>..."),
29 N_("git cherry-pick <subcommand>"),
30 NULL
31 };
builtin/rm.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "pathspec.h"
15
16 static const char * const builtin_rm_usage[] = {
17 - N_("git rm [options] [--] <file>..."),
17 + N_("git rm [<options>] [--] <file>..."),
18 NULL
19 };
20
builtin/shortlog.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "parse-options.h"
11
12 static char const * const shortlog_usage[] = {
13 - N_("git shortlog [<options>] [<revision range>] [[--] [<path>...]]"),
13 + N_("git shortlog [<options>] [<revision-range>] [[--] [<path>...]]"),
14 NULL
15 };
16
builtin/show-branch.c
+2 -2
@@ -6,8 +6,8 @@
6 #include "parse-options.h"
7
8 static const char* show_branch_usage[] = {
9 - N_("git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order] [--current] [--color[=<when>] | --no-color] [--sparse] [--more=<n> | --list | --independent | --merge-base] [--no-name | --sha1-name] [--topics] [(<rev> | <glob>)...]"),
10 - N_("git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]"),
9 + N_("git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order] [--current] [--color[=<when>] | --no-color] [--sparse] [--more=<n> | --list | --independent | --merge-base] [--no-name | --sha1-name] [--topics] [(<rev> | <glob>)...]"),
10 + N_("git show-branch (-g | --reflog)[=<n>[,<base>]] [--list] [<ref>]"),
11 NULL
12 };
13
builtin/show-ref.c
+1 -1
@@ -7,7 +7,7 @@
7 #include "parse-options.h"
8
9 static const char * const show_ref_usage[] = {
10 - N_("git show-ref [-q|--quiet] [--verify] [--head] [-d|--dereference] [-s|--hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [pattern*] "),
10 + N_("git show-ref [-q | --quiet] [--verify] [--head] [-d | --dereference] [-s | --hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [<pattern>...]"),
11 N_("git show-ref --exclude-existing[=pattern] < ref-list"),
12 NULL
13 };
builtin/symbolic-ref.c
+2 -2
@@ -4,8 +4,8 @@
4 #include "parse-options.h"
5
6 static const char * const git_symbolic_ref_usage[] = {
7 - N_("git symbolic-ref [options] name [ref]"),
8 - N_("git symbolic-ref -d [-q] name"),
7 + N_("git symbolic-ref [<options>] <name> [<ref>]"),
8 + N_("git symbolic-ref -d [-q] <name>"),
9 NULL
10 };
11
builtin/tag.c
+2 -2
@@ -19,9 +19,9 @@
19 #include "column.h"
20
21 static const char * const git_tag_usage[] = {
22 - N_("git tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]"),
22 + N_("git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] <tagname> [<head>]"),
23 N_("git tag -d <tagname>..."),
24 - N_("git tag -l [-n[<num>]] [--contains <commit>] [--points-at <object>] "
24 + N_("git tag -l [-n[<num>]] [--contains <commit>] [--points-at <object>]"
25 "\n\t\t[<pattern>...]"),
26 N_("git tag -v <tagname>..."),
27 NULL
builtin/update-index.c
+1 -1
@@ -400,7 +400,7 @@ static void read_index_info(int line_termination)
400 }
401
402 static const char * const update_index_usage[] = {
403 - N_("git update-index [options] [--] [<file>...]"),
403 + N_("git update-index [<options>] [--] [<file>...]"),
404 NULL
405 };
406
builtin/update-ref.c
+3 -3
@@ -6,9 +6,9 @@
6 #include "argv-array.h"
7
8 static const char * const git_update_ref_usage[] = {
9 - N_("git update-ref [options] -d <refname> [<oldval>]"),
10 - N_("git update-ref [options] <refname> <newval> [<oldval>]"),
11 - N_("git update-ref [options] --stdin [-z]"),
9 + N_("git update-ref [<options>] -d <refname> [<old-val>]"),
10 + N_("git update-ref [<options>] <refname> <new-val> [<old-val>]"),
11 + N_("git update-ref [<options>] --stdin [-z]"),
12 NULL
13 };
14
builtin/verify-commit.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "gpg-interface.h"
15
16 static const char * const verify_commit_usage[] = {
17 - N_("git verify-commit [-v|--verbose] <commit>..."),
17 + N_("git verify-commit [-v | --verbose] <commit>..."),
18 NULL
19 };
20
builtin/verify-pack.c
+1 -1
@@ -51,7 +51,7 @@ static int verify_one_pack(const char *path, unsigned int flags)
51 }
52
53 static const char * const verify_pack_usage[] = {
54 - N_("git verify-pack [-v|--verbose] [-s|--stat-only] <pack>..."),
54 + N_("git verify-pack [-v | --verbose] [-s | --stat-only] <pack>..."),
55 NULL
56 };
57
builtin/verify-tag.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "gpg-interface.h"
15
16 static const char * const verify_tag_usage[] = {
17 - N_("git verify-tag [-v|--verbose] <tag>..."),
17 + N_("git verify-tag [-v | --verbose] <tag>..."),
18 NULL
19 };
20
credential-store.c
+1 -1
@@ -118,7 +118,7 @@ static int lookup_credential(const char *fn, struct credential *c)
118 int main(int argc, char **argv)
119 {
120 const char * const usage[] = {
121 - "git credential-store [options] <action>",
121 + "git credential-store [<options>] <action>",
122 NULL
123 };
124 const char *op;
git-bisect.sh
+1 -1
@@ -127,7 +127,7 @@ bisect_start() {
127 if test "z$mode" != "z--no-checkout"
128 then
129 git checkout "$start_head" -- ||
130 - die "$(eval_gettext "Checking out '\$start_head' failed. Try 'git bisect reset <validbranch>'.")"
130 + die "$(eval_gettext "Checking out '\$start_head' failed. Try 'git bisect reset <valid-branch>'.")"
131 fi
132 else
133 # Get rev from where we start.
git.c
+1 -1
@@ -9,7 +9,7 @@
9 const char git_usage_string[] =
10 "git [--version] [--help] [-C <path>] [-c name=value]\n"
11 " [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
12 - " [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]\n"
12 + " [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]\n"
13 " [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
14 " <command> [<args>]";
15