Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit b5a52fa

Browse files
committed
Merge branch 'jc/rev-parse-argh-dashed-multi-words'
Make sure that the help text given to describe the "<param>" part of the "git cmd --option=<param>" does not contain SP or _, e.g. "--gpg-sign=<key-id>" option for "git commit" is not spelled as "--gpg-sign=<key id>". * jc/rev-parse-argh-dashed-multi-words: parse-options: make sure argh string does not have SP or _ update-index: teach --cacheinfo a new syntax "mode,sha1,path" parse-options: multi-word argh should use dash to separate words
2 parents bdb830c + b6c2a0d commit b5a52fa

17 files changed

+77
-29
lines changed

Documentation/git-cherry-pick.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SYNOPSIS
99
--------
1010
[verse]
1111
'git cherry-pick' [--edit] [-n] [-m parent-number] [-s] [-x] [--ff]
12-
[-S[<keyid>]] <commit>...
12+
[-S[<key-id>]] <commit>...
1313
'git cherry-pick' --continue
1414
'git cherry-pick' --quit
1515
'git cherry-pick' --abort
@@ -101,8 +101,8 @@ effect to your index in a row.
101101
--signoff::
102102
Add Signed-off-by line at the end of the commit message.
103103

104-
-S[<keyid>]::
105-
--gpg-sign[=<keyid>]::
104+
-S[<key-id>]::
105+
--gpg-sign[=<key-id>]::
106106
GPG-sign commits.
107107

108108
--ff::

Documentation/git-commit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SYNOPSIS
1313
[-F <file> | -m <msg>] [--reset-author] [--allow-empty]
1414
[--allow-empty-message] [--no-verify] [-e] [--author=<author>]
1515
[--date=<date>] [--cleanup=<mode>] [--[no-]status]
16-
[-i | -o] [-S[<keyid>]] [--] [<file>...]
16+
[-i | -o] [-S[<key-id>]] [--] [<file>...]
1717

1818
DESCRIPTION
1919
-----------

Documentation/git-merge.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SYNOPSIS
1010
--------
1111
[verse]
1212
'git merge' [-n] [--stat] [--no-commit] [--squash] [--[no-]edit]
13-
[-s <strategy>] [-X <strategy-option>] [-S[<keyid>]]
13+
[-s <strategy>] [-X <strategy-option>] [-S[<key-id>]]
1414
[--[no-]rerere-autoupdate] [-m <msg>] [<commit>...]
1515
'git merge' <msg> HEAD <commit>...
1616
'git merge' --abort

Documentation/git-notes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ SYNOPSIS
1414
'git notes' append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
1515
'git notes' edit [<object>]
1616
'git notes' show [<object>]
17-
'git notes' merge [-v | -q] [-s <strategy> ] <notes_ref>
17+
'git notes' merge [-v | -q] [-s <strategy> ] <notes-ref>
1818
'git notes' merge --commit [-v | -q]
1919
'git notes' merge --abort [-v | -q]
2020
'git notes' remove [--ignore-missing] [--stdin] [<object>...]

Documentation/git-rev-parse.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -290,14 +290,14 @@ The lines after the separator describe the options.
290290
Each line of options has this format:
291291

292292
------------
293-
<opt_spec><flags>*<arg_hint>? SP+ help LF
293+
<opt-spec><flags>*<arg-hint>? SP+ help LF
294294
------------
295295

296-
`<opt_spec>`::
296+
`<opt-spec>`::
297297
its format is the short option character, then the long option name
298298
separated by a comma. Both parts are not required, though at least one
299299
is necessary. `h,help`, `dry-run` and `f` are all three correct
300-
`<opt_spec>`.
300+
`<opt-spec>`.
301301

302302
`<flags>`::
303303
`<flags>` are of `*`, `=`, `?` or `!`.
@@ -313,11 +313,11 @@ Each line of options has this format:
313313

314314
* Use `!` to not make the corresponding negated long option available.
315315

316-
`<arg_hint>`::
317-
`<arg_hint>`, if specified, is used as a name of the argument in the
318-
help output, for options that take arguments. `<arg_hint>` is
319-
terminated by the first whitespace. When you need to use space in the
320-
argument hint use dash instead.
316+
`<arg-hint>`::
317+
`<arg-hint>`, if specified, is used as a name of the argument in the
318+
help output, for options that take arguments. `<arg-hint>` is
319+
terminated by the first whitespace. It is customary to use a
320+
dash to separate words in a multi-word argument hint.
321321

322322
The remainder of the line, after stripping the spaces, is used
323323
as the help associated to the option.

Documentation/git-revert.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ git-revert - Revert some existing commits
88
SYNOPSIS
99
--------
1010
[verse]
11-
'git revert' [--[no-]edit] [-n] [-m parent-number] [-s] [-S[<keyid>]] <commit>...
11+
'git revert' [--[no-]edit] [-n] [-m parent-number] [-s] [-S[<key-id>]] <commit>...
1212
'git revert' --continue
1313
'git revert' --quit
1414
'git revert' --abort
@@ -80,8 +80,8 @@ more details.
8080
This is useful when reverting more than one commits'
8181
effect to your index in a row.
8282

83-
-S[<keyid>]::
84-
--gpg-sign[=<keyid>]::
83+
-S[<key-id>]::
84+
--gpg-sign[=<key-id>]::
8585
GPG-sign commits.
8686

8787
-s::

Documentation/git-update-index.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ SYNOPSIS
1212
'git update-index'
1313
[--add] [--remove | --force-remove] [--replace]
1414
[--refresh] [-q] [--unmerged] [--ignore-missing]
15-
[(--cacheinfo <mode> <object> <file>)...]
15+
[(--cacheinfo <mode>,<object>,<file>)...]
1616
[--chmod=(+|-)x]
1717
[--[no-]assume-unchanged]
1818
[--[no-]skip-worktree]
@@ -68,8 +68,12 @@ OPTIONS
6868
--ignore-missing::
6969
Ignores missing files during a --refresh
7070

71+
--cacheinfo <mode>,<object>,<path>::
7172
--cacheinfo <mode> <object> <path>::
72-
Directly insert the specified info into the index.
73+
Directly insert the specified info into the index. For
74+
backward compatibility, you can also give these three
75+
arguments as three separate parameters, but new users are
76+
encouraged to use a single-parameter form.
7377

7478
--index-info::
7579
Read index information from stdin.

builtin/checkout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
10951095
OPT_BOOL(0, "detach", &opts.force_detach, N_("detach the HEAD at named commit")),
10961096
OPT_SET_INT('t', "track", &opts.track, N_("set upstream info for new branch"),
10971097
BRANCH_TRACK_EXPLICIT),
1098-
OPT_STRING(0, "orphan", &opts.new_orphan_branch, N_("new branch"), N_("new unparented branch")),
1098+
OPT_STRING(0, "orphan", &opts.new_orphan_branch, N_("new-branch"), N_("new unparented branch")),
10991099
OPT_SET_INT('2', "ours", &opts.writeout_stage, N_("checkout our version for unmerged files"),
11001100
2),
11011101
OPT_SET_INT('3', "theirs", &opts.writeout_stage, N_("checkout their version for unmerged files"),

builtin/commit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
15011501
OPT_BOOL('e', "edit", &edit_flag, N_("force edit of commit")),
15021502
OPT_STRING(0, "cleanup", &cleanup_arg, N_("default"), N_("how to strip spaces and #comments from message")),
15031503
OPT_BOOL(0, "status", &include_status, N_("include status in commit message template")),
1504-
{ OPTION_STRING, 'S', "gpg-sign", &sign_commit, N_("key id"),
1504+
{ OPTION_STRING, 'S', "gpg-sign", &sign_commit, N_("key-id"),
15051505
N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
15061506
/* end commit message options */
15071507

builtin/merge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static struct option builtin_merge_options[] = {
220220
OPT_BOOL(0, "abort", &abort_current_merge,
221221
N_("abort the current in-progress merge")),
222222
OPT_SET_INT(0, "progress", &show_progress, N_("force progress reporting"), 1),
223-
{ OPTION_STRING, 'S', "gpg-sign", &sign_commit, N_("key id"),
223+
{ OPTION_STRING, 'S', "gpg-sign", &sign_commit, N_("key-id"),
224224
N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
225225
OPT_BOOL(0, "overwrite-ignore", &overwrite_ignore, N_("update ignored files (default)")),
226226
OPT_END()

0 commit comments

Comments
 (0)