]> rtime.felk.cvut.cz Git - git.git/commitdiff
standardize usage info string format
authorAlex Henrie <alexhenrie24@gmail.com>
Tue, 13 Jan 2015 07:44:47 +0000 (00:44 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Jan 2015 17:32:04 +0000 (09:32 -0800)
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>
64 files changed:
Documentation/CodingGuidelines
advice.c
archive.c
builtin/add.c
builtin/apply.c
builtin/blame.c
builtin/branch.c
builtin/cat-file.c
builtin/check-attr.c
builtin/check-ignore.c
builtin/check-mailmap.c
builtin/check-ref-format.c
builtin/checkout-index.c
builtin/checkout.c
builtin/clone.c
builtin/column.c
builtin/commit.c
builtin/config.c
builtin/describe.c
builtin/diff-files.c
builtin/diff-index.c
builtin/diff-tree.c
builtin/fetch-pack.c
builtin/fmt-merge-msg.c
builtin/for-each-ref.c
builtin/fsck.c
builtin/gc.c
builtin/grep.c
builtin/hash-object.c
builtin/help.c
builtin/init-db.c
builtin/log.c
builtin/ls-files.c
builtin/ls-remote.c
builtin/mailinfo.c
builtin/merge-base.c
builtin/merge-file.c
builtin/merge-index.c
builtin/merge.c
builtin/mv.c
builtin/name-rev.c
builtin/notes.c
builtin/pack-redundant.c
builtin/pack-refs.c
builtin/prune-packed.c
builtin/remote.c
builtin/repack.c
builtin/rerere.c
builtin/rev-parse.c
builtin/revert.c
builtin/rm.c
builtin/shortlog.c
builtin/show-branch.c
builtin/show-ref.c
builtin/symbolic-ref.c
builtin/tag.c
builtin/update-index.c
builtin/update-ref.c
builtin/verify-commit.c
builtin/verify-pack.c
builtin/verify-tag.c
credential-store.c
git-bisect.sh
git.c

index 894546dd75416fcf09542096a67b2f22a7d0de7a..ad3b2adb600dac04edd0c65cdf8bccbe9523a6b6 100644 (file)
@@ -441,6 +441,10 @@ Writing Documentation:
    --sort=<key>
    --abbrev[=<n>]
 
+ If a placeholder has multiple words, they are separated by dashes:
+   <new-branch-name>
+   --template=<template-directory>
+
  Possibility of multiple occurrences is indicated by three dots:
    <file>...
    (One or more of <file>.)
@@ -457,12 +461,12 @@ Writing Documentation:
    (Zero or more of <patch>.  Note that the dots are inside, not
    outside the brackets.)
 
- Multiple alternatives are indicated with vertical bar:
+ Multiple alternatives are indicated with vertical bars:
    [-q | --quiet]
    [--utf8 | --no-utf8]
 
  Parentheses are used for grouping:
-   [(<rev>|<range>)...]
+   [(<rev> | <range>)...]
    (Any number of either <rev> or <range>.  Parens are needed to make
    it clear that "..." pertains to both <rev> and <range>.)
 
index 3b8bf3c6da6afdd5ef4cfcc77131690ccbbf3757..575bec20b35a31e653e49125386f3dcee880c217 100644 (file)
--- a/advice.c
+++ b/advice.c
@@ -105,7 +105,7 @@ void detach_advice(const char *new_name)
        "state without impacting any branches by performing another checkout.\n\n"
        "If you want to create a new branch to retain commits you create, you may\n"
        "do so (now or later) by using -b with the checkout command again. Example:\n\n"
-       "  git checkout -b new_branch_name\n\n";
+       "  git checkout -b <new-branch-name>\n\n";
 
        fprintf(stderr, fmt, new_name);
 }
index 9e30246b6402454e8d92fb6aa24a1a07c534b0ef..96057ed830e521a5f12b0a73b4a04a6b5e581e87 100644 (file)
--- a/archive.c
+++ b/archive.c
@@ -8,9 +8,9 @@
 #include "dir.h"
 
 static char const * const archive_usage[] = {
-       N_("git archive [options] <tree-ish> [<path>...]"),
+       N_("git archive [<options>] <tree-ish> [<path>...]"),
        N_("git archive --list"),
-       N_("git archive --remote <repo> [--exec <cmd>] [options] <tree-ish> [<path>...]"),
+       N_("git archive --remote <repo> [--exec <cmd>] [<options>] <tree-ish> [<path>...]"),
        N_("git archive --remote <repo> [--exec <cmd>] --list"),
        NULL
 };
index 1074e3234964deb279c3a487e9efd164afdb9c6c..3390933d68b2dd6c7296a7d2103d009fa27f2ca8 100644 (file)
@@ -19,7 +19,7 @@
 #include "argv-array.h"
 
 static const char * const builtin_add_usage[] = {
-       N_("git add [options] [--] <pathspec>..."),
+       N_("git add [<options>] [--] <pathspec>..."),
        NULL
 };
 static int patch_interactive, add_interactive, edit_interactive;
index 0aad91283959bce51aba596c6f3d2d0925e5ba92..7cd9a3b593a7d7308e4607144a37805ed20bb6ff 100644 (file)
@@ -55,7 +55,7 @@ static const char *fake_ancestor;
 static int line_termination = '\n';
 static unsigned int p_context = UINT_MAX;
 static const char * const apply_usage[] = {
-       N_("git apply [options] [<patch>...]"),
+       N_("git apply [<options>] [<patch>...]"),
        NULL
 };
 
index 303e217ae919f21aa4d4574bd1720b5f4d635c32..f0fac655edeed66c196154b73420105d6b301949 100644 (file)
 #include "line-range.h"
 #include "line-log.h"
 
-static char blame_usage[] = N_("git blame [options] [rev-opts] [rev] [--] file");
+static char blame_usage[] = N_("git blame [<options>] [<rev-opts>] [<rev>] [--] file");
 
 static const char *blame_opt_usage[] = {
        blame_usage,
        "",
-       N_("[rev-opts] are documented in git-rev-list(1)"),
+       N_("<rev-opts> are documented in git-rev-list(1)"),
        NULL
 };
 
index dc6f0b266c9cf621486b9dba111c2e7b37d3bc1b..6a25957e9f9daff6ab127f8feb91d9349075741e 100644 (file)
 #include "wt-status.h"
 
 static const char * const builtin_branch_usage[] = {
-       N_("git branch [options] [-r | -a] [--merged | --no-merged]"),
-       N_("git branch [options] [-l] [-f] <branchname> [<start-point>]"),
-       N_("git branch [options] [-r] (-d | -D) <branchname>..."),
-       N_("git branch [options] (-m | -M) [<oldbranch>] <newbranch>"),
+       N_("git branch [<options>] [-r | -a] [--merged | --no-merged]"),
+       N_("git branch [<options>] [-l] [-f] <branch-name> [<start-point>]"),
+       N_("git branch [<options>] [-r] (-d | -D) <branch-name>..."),
+       N_("git branch [<options>] (-m | -M) [<old-branch>] <new-branch>"),
        NULL
 };
 
index f8d81291b9913a769f79405720210aa4eaf6daee..c2e4e53ce454376f074259e4844ded134b30c8db 100644 (file)
@@ -329,8 +329,8 @@ static int batch_objects(struct batch_options *opt)
 }
 
 static const char * const cat_file_usage[] = {
-       N_("git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>"),
-       N_("git cat-file (--batch|--batch-check) < <list_of_objects>"),
+       N_("git cat-file (-t | -s | -e | -p | <type> | --textconv) <object>"),
+       N_("git cat-file (--batch | --batch-check) < <list-of-objects>"),
        NULL
 };
 
index 5600ec3f6165ae04682f30481142452438f856af..21d2bedcc930ab216f2a55ec90ba188b2b66dfce 100644 (file)
@@ -8,8 +8,8 @@ static int all_attrs;
 static int cached_attrs;
 static int stdin_paths;
 static const char * const check_attr_usage[] = {
-N_("git check-attr [-a | --all | attr...] [--] pathname..."),
-N_("git check-attr --stdin [-z] [-a | --all | attr...] < <list-of-paths>"),
+N_("git check-attr [-a | --all | <attr>...] [--] <pathname>..."),
+N_("git check-attr --stdin [-z] [-a | --all | <attr>...] < <list-of-paths>"),
 NULL
 };
 
index 594463a11bcba3cf99748ccdaeb055bd79283ddd..dc8d97c56c60991ec5c1b5cc9eb6e20a76e5e405 100644 (file)
@@ -7,8 +7,8 @@
 
 static int quiet, verbose, stdin_paths, show_non_matching, no_index;
 static const char * const check_ignore_usage[] = {
-"git check-ignore [options] pathname...",
-"git check-ignore [options] --stdin < <list-of-paths>",
+"git check-ignore [<options>] <pathname>...",
+"git check-ignore [<options>] --stdin < <list-of-paths>",
 NULL
 };
 
index 8f4d809bd8c00558b34022cc0c46423a6b19243c..eaaea546d30871ad7442456f7eec4ae849f68374 100644 (file)
@@ -5,7 +5,7 @@
 
 static int use_stdin;
 static const char * const check_mailmap_usage[] = {
-N_("git check-mailmap [options] <contact>..."),
+N_("git check-mailmap [<options>] <contact>..."),
 NULL
 };
 
index 28a7320271a9555356170bfdb06ffb4b07bc9b92..fd915d59841ecc1098e2d8a4356947215377d4da 100644 (file)
@@ -8,7 +8,7 @@
 #include "strbuf.h"
 
 static const char builtin_check_ref_format_usage[] =
-"git check-ref-format [--normalize] [options] <refname>\n"
+"git check-ref-format [--normalize] [<options>] <refname>\n"
 "   or: git check-ref-format --branch <branchname-shorthand>";
 
 /*
index 031780f49e0b3a3e7a8e1aa4904e33858f11542d..9ca2da15836d161d5c28b9919eff0edf4347a446 100644 (file)
@@ -123,7 +123,7 @@ static void checkout_all(const char *prefix, int prefix_length)
 }
 
 static const char * const builtin_checkout_index_usage[] = {
-       N_("git checkout-index [options] [--] [<file>...]"),
+       N_("git checkout-index [<options>] [--] [<file>...]"),
        NULL
 };
 
index 52d6cbb0a84e2693fc53c88ca1fb4cd899b26a91..3e141fc1491949a2dbb47c59d7d156ae6fe4eb47 100644 (file)
@@ -22,8 +22,8 @@
 #include "argv-array.h"
 
 static const char * const checkout_usage[] = {
-       N_("git checkout [options] <branch>"),
-       N_("git checkout [options] [<branch>] -- <file>..."),
+       N_("git checkout [<options>] <branch>"),
+       N_("git checkout [<options>] [<branch>] -- <file>..."),
        NULL,
 };
 
@@ -746,7 +746,7 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs)
                        _(
                        "If you want to keep them by creating a new branch, "
                        "this may be a good time\nto do so with:\n\n"
-                       " git branch new_branch_name %s\n\n"),
+                       " git branch <new-branch-name> %s\n\n"),
                        find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));
 }
 
@@ -1127,7 +1127,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
                OPT_BOOL(0, "ignore-skip-worktree-bits", &opts.ignore_skipworktree,
                         N_("do not limit pathspecs to sparse entries only")),
                OPT_HIDDEN_BOOL(0, "guess", &dwim_new_local_branch,
-                               N_("second guess 'git checkout no-such-branch'")),
+                               N_("second guess 'git checkout <no-such-branch>'")),
                OPT_END(),
        };
 
index 316c75d0b342d039696608c18adfabaa3366b0e7..957246723e94ef6ad6df918ec18f8a1e5848a303 100644 (file)
@@ -34,7 +34,7 @@
  *
  */
 static const char * const builtin_clone_usage[] = {
-       N_("git clone [options] [--] <repo> [<dir>]"),
+       N_("git clone [<options>] [--] <repo> [<dir>]"),
        NULL
 };
 
index 75818520e1b74de607620e48d2d3afb131c6e896..449413c8a873ebcfa2ceaccae6b89a3f1245c117 100644 (file)
@@ -6,7 +6,7 @@
 #include "column.h"
 
 static const char * const builtin_column_usage[] = {
-       N_("git column [options]"),
+       N_("git column [<options>]"),
        NULL
 };
 static unsigned int colopts;
index 7d90c3591567d10f9a075ec38048b93923f707d4..6716e11b8dbd2a73cd875b528c0471703f0adfb3 100644 (file)
 #include "mailmap.h"
 
 static const char * const builtin_commit_usage[] = {
-       N_("git commit [options] [--] <pathspec>..."),
+       N_("git commit [<options>] [--] <pathspec>..."),
        NULL
 };
 
 static const char * const builtin_status_usage[] = {
-       N_("git status [options] [--] <pathspec>..."),
+       N_("git status [<options>] [--] <pathspec>..."),
        NULL
 };
 
index 15a7bea936d667042cef27f83c86a863df2caa8f..d32c5327e53e14a7af72e4ec91efc1b42a414659 100644 (file)
@@ -5,7 +5,7 @@
 #include "urlmatch.h"
 
 static const char *const builtin_config_usage[] = {
-       N_("git config [options]"),
+       N_("git config [<options>]"),
        NULL
 };
 
index 9103193b4f65dc9e224051fb1e19eda6d9c7ae6a..e00a75b121826e89ee70cbedbfad760dc29640a0 100644 (file)
@@ -14,8 +14,8 @@
 #define MAX_TAGS       (FLAG_BITS - 1)
 
 static const char * const describe_usage[] = {
-       N_("git describe [options] <commit-ish>*"),
-       N_("git describe [options] --dirty"),
+       N_("git describe [<options>] [<commit-ish>...]"),
+       N_("git describe [<options>] --dirty"),
        NULL
 };
 
index 9200069363ff016d167f6885688650158c12e507..8ed2eb8813a442b64c8f43ed23acbdbd1c0dd452 100644 (file)
@@ -11,7 +11,7 @@
 #include "submodule.h"
 
 static const char diff_files_usage[] =
-"git diff-files [-q] [-0/-1/2/3 |-c|--cc] [<common diff options>] [<path>...]"
+"git diff-files [-q] [-0 | -1 | -2 | -3 | -c | --cc] [<common-diff-options>] [<path>...]"
 COMMON_DIFF_OPTIONS_HELP;
 
 int cmd_diff_files(int argc, const char **argv, const char *prefix)
index ce15b23042d8472573b88e0ee9a6032673321ea3..d979824f9395a0cbc8ffffa9cede524589710d43 100644 (file)
@@ -7,7 +7,7 @@
 
 static const char diff_cache_usage[] =
 "git diff-index [-m] [--cached] "
-"[<common diff options>] <tree-ish> [<path>...]"
+"[<common-diff-options>] <tree-ish> [<path>...]"
 COMMON_DIFF_OPTIONS_HELP;
 
 int cmd_diff_index(int argc, const char **argv, const char *prefix)
index 1c4ad6223eb9547666ec21f81f410ef1a459ec92..12b683d0217856a23cb4c3271a173ce1b7bfbe68 100644 (file)
@@ -82,7 +82,7 @@ static int diff_tree_stdin(char *line)
 
 static const char diff_tree_usage[] =
 "git diff-tree [--stdin] [-m] [-c] [--cc] [-s] [-v] [--pretty] [-t] [-r] [--root] "
-"[<common diff options>] <tree-ish> [<tree-ish>] [<path>...]\n"
+"[<common-diff-options>] <tree-ish> [<tree-ish>] [<path>...]\n"
 "  -r            diff recursively\n"
 "  --root        include the initial commit as diff against /dev/null\n"
 COMMON_DIFF_OPTIONS_HELP;
index 1262b405f8212e71d088f4e090b8121fa304699a..4a6b340ab67622a1e0c57a2bd38e2de4f1ad91a5 100644 (file)
@@ -6,7 +6,7 @@
 #include "sha1-array.h"
 
 static const char fetch_pack_usage[] =
-"git fetch-pack [--all] [--stdin] [--quiet|-q] [--keep|-k] [--thin] "
+"git fetch-pack [--all] [--stdin] [--quiet | -q] [--keep | -k] [--thin] "
 "[--include-tag] [--upload-pack=<git-upload-pack>] [--depth=<n>] "
 "[--no-progress] [--diag-url] [-v] [<host>:]<directory> [<refs>...]";
 
index af7919e51e717923260080f8be3305bbe1b56d39..1d962dc569eaafc8429c4cec815922f382c576b9 100644 (file)
@@ -10,7 +10,7 @@
 #include "gpg-interface.h"
 
 static const char * const fmt_merge_msg_usage[] = {
-       N_("git fmt-merge-msg [-m <message>] [--log[=<n>]|--no-log] [--file <file>]"),
+       N_("git fmt-merge-msg [-m <message>] [--log[=<n>] | --no-log] [--file <file>]"),
        NULL
 };
 
index f3ce004d53c55e3f53d6a90d21d2877368676f08..c97368a843fa0c513c93bb7f5e4c9ff6ca10cb8c 100644 (file)
@@ -1054,7 +1054,7 @@ static int opt_parse_sort(const struct option *opt, const char *arg, int unset)
 }
 
 static char const * const for_each_ref_usage[] = {
-       N_("git for-each-ref [options] [<pattern>]"),
+       N_("git for-each-ref [<options>] [<pattern>]"),
        NULL
 };
 
index a27515aeaa2debabdb14a03d271fe423d13b19d2..0c757862e8cd414c087b27a608281b66c8608a4b 100644 (file)
@@ -600,7 +600,7 @@ static int fsck_cache_tree(struct cache_tree *it)
 }
 
 static char const * const fsck_usage[] = {
-       N_("git fsck [options] [<object>...]"),
+       N_("git fsck [<options>] [<object>...]"),
        NULL
 };
 
index 005adbebea80a83a8d0dbb1de744cb50bf689de6..5c634afc0022c0ea7a8cd8c81727935ad79a6333 100644 (file)
@@ -21,7 +21,7 @@
 #define FAILED_RUN "failed to run %s"
 
 static const char * const builtin_gc_usage[] = {
-       N_("git gc [options]"),
+       N_("git gc [<options>]"),
        NULL
 };
 
index 4063882f06536ad5b3f1292a5b66e534ad4688af..9262b73b6f5efd28756db221f2775671430c7fd2 100644 (file)
@@ -20,7 +20,7 @@
 #include "pathspec.h"
 
 static char const * const grep_usage[] = {
-       N_("git grep [options] [-e] <pattern> [<rev>...] [[--] <path>...]"),
+       N_("git grep [<options>] [-e] <pattern> [<rev>...] [[--] <path>...]"),
        NULL
 };
 
index 61583633182da359556fc65795a8eb740167675c..207b90c7b13e103b29305b68aa99d1b9b09342e7 100644 (file)
@@ -79,7 +79,7 @@ static void hash_stdin_paths(const char *type, int no_filters, unsigned flags,
 int cmd_hash_object(int argc, const char **argv, const char *prefix)
 {
        static const char * const hash_object_usage[] = {
-               N_("git hash-object [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin] [--] <file>..."),
+               N_("git hash-object [-t <type>] [-w] [--path=<file> | --no-filters] [--stdin] [--] <file>..."),
                N_("git hash-object  --stdin-paths < <list-of-paths>"),
                NULL
        };
index e78c135e010afa3f9447992ae85a7cc404d0192b..6133fe496b00e30a33d03c2d49b22a6ff81f9c77 100644 (file)
@@ -49,7 +49,7 @@ static struct option builtin_help_options[] = {
 };
 
 static const char * const builtin_help_usage[] = {
-       N_("git help [--all] [--guides] [--man|--web|--info] [command]"),
+       N_("git help [--all] [--guides] [--man | --web | --info] [<command>]"),
        NULL
 };
 
index 9966522b4a97a0d1ae430e581125fbfd1d5609ac..6723d39c3baf3571552a57732e4da16278269edf 100644 (file)
@@ -472,7 +472,7 @@ static int shared_callback(const struct option *opt, const char *arg, int unset)
 }
 
 static const char *const init_db_usage[] = {
-       N_("git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [directory]"),
+       N_("git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [<directory>]"),
        NULL
 };
 
index f2a9f0156d8a8b15c7c879355b137b669dea8cf2..d65d96a7a349e3902ca080c39a3de48d9a5a55cb 100644 (file)
@@ -38,8 +38,8 @@ static const char *fmt_patch_subject_prefix = "PATCH";
 static const char *fmt_pretty;
 
 static const char * const builtin_log_usage[] = {
-       N_("git log [<options>] [<revision range>] [[--] <path>...]\n")
-       N_("   or: git show [options] <object>..."),
+       N_("git log [<options>] [<revision-range>] [[--] <path>...]\n")
+       N_("   or: git show [<options>] <object>..."),
        NULL
 };
 
@@ -1023,7 +1023,7 @@ static const char *set_outdir(const char *prefix, const char *output_directory)
 }
 
 static const char * const builtin_format_patch_usage[] = {
-       N_("git format-patch [options] [<since> | <revision range>]"),
+       N_("git format-patch [<options>] [<since> | <revision-range>]"),
        NULL
 };
 
index 99cee20fb07ce7ed03da230bfa031c277f584fc1..914054d36734ba1b98c924aa640e748dced8b9fa 100644 (file)
@@ -398,7 +398,7 @@ int report_path_error(const char *ps_matched,
 }
 
 static const char * const ls_files_usage[] = {
-       N_("git ls-files [options] [<file>...]"),
+       N_("git ls-files [<options>] [<file>...]"),
        NULL
 };
 
index b2a4b92992748ab52fc6fd3f31041dd88dca54f8..4554dbc8a98c0daaa67c8ea65f5ddf5c48f19383 100644 (file)
@@ -5,7 +5,7 @@
 
 static const char ls_remote_usage[] =
 "git ls-remote [--heads] [--tags]  [-u <exec> | --upload-pack <exec>]\n"
-"                     [-q|--quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]";
+"                     [-q | --quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]";
 
 /*
  * Is there one among the list of patterns that match the tail part
index c8a47c173d011713a57dc744a5f5e5ea5434eefa..999a5250fbe7e6d38a2c8927fa3c37233142ef19 100644 (file)
@@ -1031,7 +1031,7 @@ static int git_mailinfo_config(const char *var, const char *value, void *unused)
 }
 
 static const char mailinfo_usage[] =
-       "git mailinfo [-k|-b] [-m | --message-id] [-u | --encoding=<encoding> | -n] [--scissors | --no-scissors] msg patch < mail >info";
+       "git mailinfo [-k | -b] [-m | --message-id] [-u | --encoding=<encoding> | -n] [--scissors | --no-scissors] <msg> <patch> < mail >info";
 
 int cmd_mailinfo(int argc, const char **argv, const char *prefix)
 {
index fdebef6fa157e920a4560e68c1215665f1e20baf..08a8217890df599100ad0da04dc2cfaabd3a11f6 100644 (file)
@@ -26,8 +26,8 @@ static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
 }
 
 static const char * const merge_base_usage[] = {
-       N_("git merge-base [-a|--all] <commit> <commit>..."),
-       N_("git merge-base [-a|--all] --octopus <commit>..."),
+       N_("git merge-base [-a | --all] <commit> <commit>..."),
+       N_("git merge-base [-a | --all] --octopus <commit>..."),
        N_("git merge-base --independent <commit>..."),
        N_("git merge-base --is-ancestor <commit> <commit>"),
        N_("git merge-base --fork-point <ref> [<commit>]"),
index 844f84f40bf0f8b9d95f4e9f0496c010386a9fb8..131edc245fdc0f5f8cb1e5d3da4120d072858d3f 100644 (file)
@@ -5,7 +5,7 @@
 #include "parse-options.h"
 
 static const char *const merge_file_usage[] = {
-       N_("git merge-file [options] [-L name1 [-L orig [-L name2]]] file1 orig_file file2"),
+       N_("git merge-file [<options>] [-L <name1> [-L <orig> [-L <name2>]]] <file1> <orig-file> <file2>"),
        NULL
 };
 
@@ -42,7 +42,7 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
                            N_("for conflicts, use this marker size")),
                OPT__QUIET(&quiet, N_("do not warn about conflicts")),
                OPT_CALLBACK('L', NULL, names, N_("name"),
-                            N_("set labels for file1/orig_file/file2"), &label_cb),
+                            N_("set labels for file1/orig-file/file2"), &label_cb),
                OPT_END(),
        };
 
index b416d928492c43e78dc7ac0b3bd1d7a99abfe78b..1a1eafa6fdc2e9dc66c98d3a81b7ee50e44727da 100644 (file)
@@ -75,7 +75,7 @@ int cmd_merge_index(int argc, const char **argv, const char *prefix)
        signal(SIGCHLD, SIG_DFL);
 
        if (argc < 3)
-               usage("git merge-index [-o] [-q] <merge-program> (-a | [--] <filename>*)");
+               usage("git merge-index [-o] [-q] <merge-program> (-a | [--] [<filename>...])");
 
        read_cache();
 
index c638fd5a9a8165c58d46d4edeeb0f3bbe8c0f9a1..3b0f8f96d4168463139d15f1cde655facc73426c 100644 (file)
@@ -42,8 +42,8 @@ struct strategy {
 };
 
 static const char * const builtin_merge_usage[] = {
-       N_("git merge [options] [<commit>...]"),
-       N_("git merge [options] <msg> HEAD <commit>"),
+       N_("git merge [<options>] [<commit>...]"),
+       N_("git merge [<options>] <msg> HEAD <commit>"),
        N_("git merge --abort"),
        NULL
 };
index 563d05ba1af21c9ae73edceba060161969434c76..d1d43168ae79d0157f8adf9dc36a4d2683afe91b 100644 (file)
@@ -12,7 +12,7 @@
 #include "submodule.h"
 
 static const char * const builtin_mv_usage[] = {
-       N_("git mv [options] <source>... <destination>"),
+       N_("git mv [<options>] <source>... <destination>"),
        NULL
 };
 
index 3c8f319be675d14a6ee60d303335190b7bdce9c8..9736d4452f28728b4f970bbf52af502d94edba86 100644 (file)
@@ -252,9 +252,9 @@ static void show_name(const struct object *obj,
 }
 
 static char const * const name_rev_usage[] = {
-       N_("git name-rev [options] <commit>..."),
-       N_("git name-rev [options] --all"),
-       N_("git name-rev [options] --stdin"),
+       N_("git name-rev [<options>] <commit>..."),
+       N_("git name-rev [<options>] --all"),
+       N_("git name-rev [<options>] --stdin"),
        NULL
 };
 
index a9f37d045641236ee910f3eb22be6ac8d04e386a..63f95fc55439060670879fd987033000b8ba3401 100644 (file)
 #include "notes-utils.h"
 
 static const char * const git_notes_usage[] = {
-       N_("git notes [--ref <notes_ref>] [list [<object>]]"),
-       N_("git notes [--ref <notes_ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
-       N_("git notes [--ref <notes_ref>] copy [-f] <from-object> <to-object>"),
-       N_("git notes [--ref <notes_ref>] append [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
-       N_("git notes [--ref <notes_ref>] edit [--allow-empty] [<object>]"),
-       N_("git notes [--ref <notes_ref>] show [<object>]"),
-       N_("git notes [--ref <notes_ref>] merge [-v | -q] [-s <strategy> ] <notes_ref>"),
+       N_("git notes [--ref <notes-ref>] [list [<object>]]"),
+       N_("git notes [--ref <notes-ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
+       N_("git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"),
+       N_("git notes [--ref <notes-ref>] append [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
+       N_("git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"),
+       N_("git notes [--ref <notes-ref>] show [<object>]"),
+       N_("git notes [--ref <notes-ref>] merge [-v | -q] [-s <strategy>] <notes-ref>"),
        N_("git notes merge --commit [-v | -q]"),
        N_("git notes merge --abort [-v | -q]"),
-       N_("git notes [--ref <notes_ref>] remove [<object>...]"),
-       N_("git notes [--ref <notes_ref>] prune [-n | -v]"),
-       N_("git notes [--ref <notes_ref>] get-ref"),
+       N_("git notes [--ref <notes-ref>] remove [<object>...]"),
+       N_("git notes [--ref <notes-ref>] prune [-n | -v]"),
+       N_("git notes [--ref <notes-ref>] get-ref"),
        NULL
 };
 
@@ -68,7 +68,7 @@ static const char * const git_notes_show_usage[] = {
 };
 
 static const char * const git_notes_merge_usage[] = {
-       N_("git notes merge [<options>] <notes_ref>"),
+       N_("git notes merge [<options>] <notes-ref>"),
        N_("git notes merge --commit [<options>]"),
        N_("git notes merge --abort [<options>]"),
        NULL
@@ -951,7 +951,7 @@ int cmd_notes(int argc, const char **argv, const char *prefix)
        const char *override_notes_ref = NULL;
        struct option options[] = {
                OPT_STRING(0, "ref", &override_notes_ref, N_("notes-ref"),
-                          N_("use notes from <notes_ref>")),
+                          N_("use notes from <notes-ref>")),
                OPT_END()
        };
 
index 649c3aaa93ccdaae21b7884209bd4f28fb558f3e..d0532f66b1d4a479360263bb031e001f4cb42a46 100644 (file)
@@ -11,7 +11,7 @@
 #define BLKSIZE 512
 
 static const char pack_redundant_usage[] =
-"git pack-redundant [ --verbose ] [ --alt-odb ] < --all | <.pack filename> ...>";
+"git pack-redundant [--verbose] [--alt-odb] (--all | <filename.pack>...)";
 
 static int load_all_packs, verbose, alt_odb;
 
index b20b1ec4c117f7529a1a3f2a8151fa0297dffb6a..39f9a55d16736d93b43e6aa16a33634039e55de4 100644 (file)
@@ -3,7 +3,7 @@
 #include "refs.h"
 
 static char const * const pack_refs_usage[] = {
-       N_("git pack-refs [options]"),
+       N_("git pack-refs [<options>]"),
        NULL
 };
 
index f24a2c2bdca81fd2cb6d7b4968e46ad6922a9c9f..7cf900ea0765e334f02df5600f0911d41563a027 100644 (file)
@@ -4,7 +4,7 @@
 #include "parse-options.h"
 
 static const char * const prune_packed_usage[] = {
-       N_("git prune-packed [-n|--dry-run] [-q|--quiet]"),
+       N_("git prune-packed [-n | --dry-run] [-q | --quiet]"),
        NULL
 };
 
index 46ecfd9f7b0dd0b28169341d14132df376e509bc..33ff7e06e71945d8cc12b479acd2e61664ebc655 100644 (file)
 
 static const char * const builtin_remote_usage[] = {
        N_("git remote [-v | --verbose]"),
-       N_("git remote add [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <name> <url>"),
+       N_("git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--mirror=<fetch|push>] <name> <url>"),
        N_("git remote rename <old> <new>"),
        N_("git remote remove <name>"),
-       N_("git remote set-head <name> (-a | --auto | -d | --delete |<branch>)"),
+       N_("git remote set-head <name> (-a | --auto | -d | --delete | <branch>)"),
        N_("git remote [-v | --verbose] show [-n] <name>"),
        N_("git remote prune [-n | --dry-run] <name>"),
        N_("git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]"),
index 3f852f35d1e786b2584d435d640ae830a9f34639..28fbc7099a84c7406a71128f2a8d3136c145bf57 100644 (file)
@@ -14,7 +14,7 @@ static int write_bitmaps;
 static char *packdir, *packtmp;
 
 static const char *const git_repack_usage[] = {
-       N_("git repack [options]"),
+       N_("git repack [<options>]"),
        NULL
 };
 
index 98eb8c5404914e4046fdb886866b611351deeacf..7afadd2eadd59d8d3f4b77ad902bc24c94af9ec6 100644 (file)
@@ -9,7 +9,7 @@
 #include "pathspec.h"
 
 static const char * const rerere_usage[] = {
-       N_("git rerere [clear | forget path... | status | remaining | diff | gc]"),
+       N_("git rerere [clear | forget <path>... | status | remaining | diff | gc]"),
        NULL,
 };
 
index 95328b80d930260915ad86a30a21ecd3c1b7d1f4..3626c61da67abbe418e492c7828f6e153f6055d8 100644 (file)
@@ -358,7 +358,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix)
 {
        static int keep_dashdash = 0, stop_at_non_option = 0;
        static char const * const parseopt_usage[] = {
-               N_("git rev-parse --parseopt [options] -- [<args>...]"),
+               N_("git rev-parse --parseopt [<options>] -- [<args>...]"),
                NULL
        };
        static struct option parseopt_opts[] = {
@@ -496,9 +496,9 @@ static void die_no_single_rev(int quiet)
 }
 
 static const char builtin_rev_parse_usage[] =
-N_("git rev-parse --parseopt [options] -- [<args>...]\n"
+N_("git rev-parse --parseopt [<options>] -- [<args>...]\n"
    "   or: git rev-parse --sq-quote [<arg>...]\n"
-   "   or: git rev-parse [options] [<arg>...]\n"
+   "   or: git rev-parse [<options>] [<arg>...]\n"
    "\n"
    "Run \"git rev-parse --parseopt -h\" for more information on the first usage.");
 
index f9ed5bd5d03675931609f533e92da3b0a82f0f46..56a2c366698f838146bcf62d7b2c7a8a115287e1 100644 (file)
  */
 
 static const char * const revert_usage[] = {
-       N_("git revert [options] <commit-ish>..."),
+       N_("git revert [<options>] <commit-ish>..."),
        N_("git revert <subcommand>"),
        NULL
 };
 
 static const char * const cherry_pick_usage[] = {
-       N_("git cherry-pick [options] <commit-ish>..."),
+       N_("git cherry-pick [<options>] <commit-ish>..."),
        N_("git cherry-pick <subcommand>"),
        NULL
 };
index d8a9c86dd135e62583f4aeeb3885012da385960a..3304bff42a2fb91f66b9bbca1117746eaa22352a 100644 (file)
@@ -14,7 +14,7 @@
 #include "pathspec.h"
 
 static const char * const builtin_rm_usage[] = {
-       N_("git rm [options] [--] <file>..."),
+       N_("git rm [<options>] [--] <file>..."),
        NULL
 };
 
index 4b7e53623fc9cf0c86ed0e7e87d4b3357d765d86..c0bab6aaa9755f5a0264601defd0414b0b458e17 100644 (file)
@@ -10,7 +10,7 @@
 #include "parse-options.h"
 
 static char const * const shortlog_usage[] = {
-       N_("git shortlog [<options>] [<revision range>] [[--] [<path>...]]"),
+       N_("git shortlog [<options>] [<revision-range>] [[--] [<path>...]]"),
        NULL
 };
 
index 270e39c6c1b0855181a19b12739425035db9ad1d..e9b37dc479996323059b4bdfaa2894ef5828b20c 100644 (file)
@@ -6,8 +6,8 @@
 #include "parse-options.h"
 
 static const char* show_branch_usage[] = {
-    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>)...]"),
-    N_("git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]"),
+    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>)...]"),
+    N_("git show-branch (-g | --reflog)[=<n>[,<base>]] [--list] [<ref>]"),
     NULL
 };
 
index 5ba1f3083890c693f8ce82166fe1cb1f6440b106..afb10309d6365a5fbc88ff1a88e26559b5b5f582 100644 (file)
@@ -7,7 +7,7 @@
 #include "parse-options.h"
 
 static const char * const show_ref_usage[] = {
-       N_("git show-ref [-q|--quiet] [--verify] [--head] [-d|--dereference] [-s|--hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [pattern*] "),
+       N_("git show-ref [-q | --quiet] [--verify] [--head] [-d | --dereference] [-s | --hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [<pattern>...]"),
        N_("git show-ref --exclude-existing[=pattern] < ref-list"),
        NULL
 };
index 29fb3f1c201682674f8a473c235dd2f1f539f287..ce0fde705c0350ad99678541f434df5e07f5a263 100644 (file)
@@ -4,8 +4,8 @@
 #include "parse-options.h"
 
 static const char * const git_symbolic_ref_usage[] = {
-       N_("git symbolic-ref [options] name [ref]"),
-       N_("git symbolic-ref -d [-q] name"),
+       N_("git symbolic-ref [<options>] <name> [<ref>]"),
+       N_("git symbolic-ref -d [-q] <name>"),
        NULL
 };
 
index e633f4efdbb8963449fddb5c3357fa657283430e..6dc85a9d5e16e921a99a9f90c5d1f453bf9450bd 100644 (file)
@@ -19,9 +19,9 @@
 #include "column.h"
 
 static const char * const git_tag_usage[] = {
-       N_("git tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]"),
+       N_("git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] <tagname> [<head>]"),
        N_("git tag -d <tagname>..."),
-       N_("git tag -l [-n[<num>]] [--contains <commit>] [--points-at <object>] "
+       N_("git tag -l [-n[<num>]] [--contains <commit>] [--points-at <object>]"
                "\n\t\t[<pattern>...]"),
        N_("git tag -v <tagname>..."),
        NULL
index b0e3dc91055ec7e7579fb5f1964879a99fd71606..587898624c0550749a9a241e2742785f20ec1bd5 100644 (file)
@@ -400,7 +400,7 @@ static void read_index_info(int line_termination)
 }
 
 static const char * const update_index_usage[] = {
-       N_("git update-index [options] [--] [<file>...]"),
+       N_("git update-index [<options>] [--] [<file>...]"),
        NULL
 };
 
index 1993529521c0ef20860795168392d1dd7209c991..2497ba4303a03fa244b4f3913c22b45acd0a989c 100644 (file)
@@ -6,9 +6,9 @@
 #include "argv-array.h"
 
 static const char * const git_update_ref_usage[] = {
-       N_("git update-ref [options] -d <refname> [<oldval>]"),
-       N_("git update-ref [options]    <refname> <newval> [<oldval>]"),
-       N_("git update-ref [options] --stdin [-z]"),
+       N_("git update-ref [<options>] -d <refname> [<old-val>]"),
+       N_("git update-ref [<options>]    <refname> <new-val> [<old-val>]"),
+       N_("git update-ref [<options>] --stdin [-z]"),
        NULL
 };
 
index b0f85042b234a33ec4b69541e0d6570015551536..ec0c4e3d836f9242a8e34dd7fffa5ddfb835907b 100644 (file)
@@ -14,7 +14,7 @@
 #include "gpg-interface.h"
 
 static const char * const verify_commit_usage[] = {
-               N_("git verify-commit [-v|--verbose] <commit>..."),
+               N_("git verify-commit [-v | --verbose] <commit>..."),
                NULL
 };
 
index 7747537beb72aba52377a13b9b3d61829f3a2fa8..c94e156932c0c8e0ba0c2dc302043c0f3ec0336d 100644 (file)
@@ -51,7 +51,7 @@ static int verify_one_pack(const char *path, unsigned int flags)
 }
 
 static const char * const verify_pack_usage[] = {
-       N_("git verify-pack [-v|--verbose] [-s|--stat-only] <pack>..."),
+       N_("git verify-pack [-v | --verbose] [-s | --stat-only] <pack>..."),
        NULL
 };
 
index 9cdf332333b95b3ab2ea6e133f345105bd67d019..53c68fce3ac182db907224d12d89659469f4b9d6 100644 (file)
@@ -14,7 +14,7 @@
 #include "gpg-interface.h"
 
 static const char * const verify_tag_usage[] = {
-               N_("git verify-tag [-v|--verbose] <tag>..."),
+               N_("git verify-tag [-v | --verbose] <tag>..."),
                NULL
 };
 
index d435514cbe29aa01d9cebadb947a6c6c8a1e2527..925d3f40247d7f41d709b4e6b3eaabaf646572b6 100644 (file)
@@ -118,7 +118,7 @@ static int lookup_credential(const char *fn, struct credential *c)
 int main(int argc, char **argv)
 {
        const char * const usage[] = {
-               "git credential-store [options] <action>",
+               "git credential-store [<options>] <action>",
                NULL
        };
        const char *op;
index 2fc07acb0f242154fec868207cfd77f448929200..ae3fec22c48a296cdc1962def9030aa5bb7ce68a 100755 (executable)
@@ -127,7 +127,7 @@ bisect_start() {
                if test "z$mode" != "z--no-checkout"
                then
                        git checkout "$start_head" -- ||
-                       die "$(eval_gettext "Checking out '\$start_head' failed. Try 'git bisect reset <validbranch>'.")"
+                       die "$(eval_gettext "Checking out '\$start_head' failed. Try 'git bisect reset <valid-branch>'.")"
                fi
        else
                # Get rev from where we start.
diff --git a/git.c b/git.c
index 82d7a1cfee806001c2d8b81a9dc822a513c75451..0c029ecc4f758aa4719488dbc4b7aaf1232581bb 100644 (file)
--- a/git.c
+++ b/git.c
@@ -9,7 +9,7 @@
 const char git_usage_string[] =
        "git [--version] [--help] [-C <path>] [-c name=value]\n"
        "           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
-       "           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]\n"
+       "           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]\n"
        "           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
        "           <command> [<args>]";