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:

committed by
Junio C Hamano

parent
addfb21a94
commit
9c9b4f2f8b
@ -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(),
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user