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>
This commit is contained in:
Alex Henrie 2015-01-13 00:44:47 -07:00 committed by Junio C Hamano
parent addfb21a94
commit 9c9b4f2f8b
64 changed files with 109 additions and 105 deletions

View 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>.)

View file

@ -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);
}

View file

@ -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
};

View 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;

View 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
};

View file

@ -27,12 +27,12 @@
#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
};

View file

@ -21,10 +21,10 @@
#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
};

View 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
};

View 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
};

View 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
};

View 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
};

View 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>";
/*

View 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
};

View 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(),
};

View 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
};

View 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;

View file

@ -34,12 +34,12 @@
#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
};

View file

@ -5,7 +5,7 @@
#include "urlmatch.h"
static const char *const builtin_config_usage[] = {
N_("git config [options]"),
N_("git config [<options>]"),
NULL
};

View 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
};

View 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)

View 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)

View 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;

View 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>...]";

View 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
};

View 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
};

View 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
};

View 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
};

View 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
};

View 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
};

View 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
};

View 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
};

View 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
};

View 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
};

View 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

View 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)
{

View 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>]"),

View 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(),
};

View 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();

View 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
};

View 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
};

View 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
};

View file

@ -21,18 +21,18 @@
#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()
};

View 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;

View 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
};

View 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
};

View file

@ -10,10 +10,10 @@
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>)...]"),

View 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
};

View 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,
};

View 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.");

View file

@ -19,13 +19,13 @@
*/
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
};

View 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
};

View 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
};

View 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
};

View 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
};

View 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
};

View 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

View 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
};

View 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
};

View 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
};

View 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
};

View 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
};

View 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;

View file

@ -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.

2
git.c
View file

@ -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>]";