Skip to content

Commit 9c9b4f2

Browse files
alexhenriegitster
authored andcommittedJan 14, 2015
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 <[email protected]> Reviewed-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent addfb21 commit 9c9b4f2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+109
-105
lines changed
 

‎Documentation/CodingGuidelines

+6-2
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ Writing Documentation:
441441
--sort=<key>
442442
--abbrev[=<n>]
443443

444+
If a placeholder has multiple words, they are separated by dashes:
445+
<new-branch-name>
446+
--template=<template-directory>
447+
444448
Possibility of multiple occurrences is indicated by three dots:
445449
<file>...
446450
(One or more of <file>.)
@@ -457,12 +461,12 @@ Writing Documentation:
457461
(Zero or more of <patch>. Note that the dots are inside, not
458462
outside the brackets.)
459463

460-
Multiple alternatives are indicated with vertical bar:
464+
Multiple alternatives are indicated with vertical bars:
461465
[-q | --quiet]
462466
[--utf8 | --no-utf8]
463467

464468
Parentheses are used for grouping:
465-
[(<rev>|<range>)...]
469+
[(<rev> | <range>)...]
466470
(Any number of either <rev> or <range>. Parens are needed to make
467471
it clear that "..." pertains to both <rev> and <range>.)
468472

‎advice.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void detach_advice(const char *new_name)
105105
"state without impacting any branches by performing another checkout.\n\n"
106106
"If you want to create a new branch to retain commits you create, you may\n"
107107
"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";
109109

110110
fprintf(stderr, fmt, new_name);
111111
}

0 commit comments

Comments
 (0)
Please sign in to comment.