Skip to content

Commit 3240240

Browse files
sbeyergitster
authored andcommitted
Docs: Use "-l::\n--long\n" format in OPTIONS sections
The OPTIONS section of a documentation file contains a list of the options a git command accepts. Currently there are several variants to describe the case that different options (almost) do the same in the OPTIONS section. Some are: -f, --foo:: -f|--foo:: -f | --foo:: But AsciiDoc has the special form: -f:: --foo:: This patch applies this form to the documentation of the whole git suite, and removes useless em-dash prevention, so \--foo becomes --foo. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent bc47c29 commit 3240240

Some content is hidden

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

56 files changed

+394
-210
lines changed

Documentation/blame-options.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ of lines before or after the line given by <start>.
4141
-S <revs-file>::
4242
Use revs from revs-file instead of calling linkgit:git-rev-list[1].
4343

44-
-p, --porcelain::
44+
-p::
45+
--porcelain::
4546
Show in a format designed for machine consumption.
4647

4748
--incremental::
@@ -83,5 +84,6 @@ alphanumeric characters that git must detect as moving
8384
between files for it to associate those lines with the parent
8485
commit.
8586

86-
-h, --help::
87+
-h::
88+
--help::
8789
Show help message.

Documentation/fetch-options.txt

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,66 @@
1-
-q, \--quiet::
1+
-q::
2+
--quiet::
23
Pass --quiet to git-fetch-pack and silence any other internally
34
used programs.
45

5-
-v, \--verbose::
6+
-v::
7+
--verbose::
68
Be verbose.
79

8-
-a, \--append::
10+
-a::
11+
--append::
912
Append ref names and object names of fetched refs to the
1013
existing contents of `.git/FETCH_HEAD`. Without this
1114
option old data in `.git/FETCH_HEAD` will be overwritten.
1215

13-
\--upload-pack <upload-pack>::
16+
--upload-pack <upload-pack>::
1417
When given, and the repository to fetch from is handled
1518
by 'git-fetch-pack', '--exec=<upload-pack>' is passed to
1619
the command to specify non-default path for the command
1720
run on the other end.
1821

19-
-f, \--force::
22+
-f::
23+
--force::
2024
When `git-fetch` is used with `<rbranch>:<lbranch>`
2125
refspec, it refuses to update the local branch
2226
`<lbranch>` unless the remote branch `<rbranch>` it
2327
fetches is a descendant of `<lbranch>`. This option
2428
overrides that check.
2529

2630
ifdef::git-pull[]
27-
\--no-tags::
31+
--no-tags::
2832
endif::git-pull[]
2933
ifndef::git-pull[]
30-
-n, \--no-tags::
34+
-n::
35+
--no-tags::
3136
endif::git-pull[]
3237
By default, tags that point at objects that are downloaded
3338
from the remote repository are fetched and stored locally.
3439
This option disables this automatic tag following.
3540

36-
-t, \--tags::
41+
-t::
42+
--tags::
3743
Most of the tags are fetched automatically as branch
3844
heads are downloaded, but tags that do not point at
3945
objects reachable from the branch heads that are being
4046
tracked will not be fetched by this mechanism. This
4147
flag lets all tags and their associated objects be
4248
downloaded.
4349

44-
-k, \--keep::
50+
-k::
51+
--keep::
4552
Keep downloaded pack.
4653

47-
-u, \--update-head-ok::
54+
-u::
55+
--update-head-ok::
4856
By default `git-fetch` refuses to update the head which
4957
corresponds to the current branch. This flag disables the
5058
check. This is purely for the internal use for `git-pull`
5159
to communicate with `git-fetch`, and unless you are
5260
implementing your own Porcelain you are not supposed to
5361
use it.
5462

55-
\--depth=<depth>::
63+
--depth=<depth>::
5664
Deepen the history of a 'shallow' repository created by
5765
`git clone` with `--depth=<depth>` option (see linkgit:git-clone[1])
5866
by the specified number of commits.

Documentation/git-add.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,26 @@ OPTIONS
5050
and `dir/file2`) can be given to add all files in the
5151
directory, recursively.
5252

53-
-n, \--dry-run::
53+
-n::
54+
--dry-run::
5455
Don't actually add the file(s), just show if they exist.
5556

56-
-v, \--verbose::
57+
-v::
58+
--verbose::
5759
Be verbose.
5860

5961
-f::
6062
Allow adding otherwise ignored files.
6163

62-
-i, \--interactive::
64+
-i::
65+
--interactive::
6366
Add modified contents in the working tree interactively to
6467
the index. Optional path arguments may be supplied to limit
6568
operation to a subset of the working tree. See ``Interactive
6669
mode'' for details.
6770

68-
-p, \--patch::
71+
-p::
72+
--patch::
6973
Similar to Interactive mode but the initial command loop is
7074
bypassed and the 'patch' subcommand is invoked using each of
7175
the specified filepatterns before exiting.
@@ -79,11 +83,11 @@ OPTIONS
7983
command line. If no paths are specified, all tracked files in the
8084
current directory and its subdirectories are updated.
8185

82-
\--refresh::
86+
--refresh::
8387
Don't add the file(s), but only refresh their stat()
8488
information in the index.
8589

86-
\--ignore-errors::
90+
--ignore-errors::
8791
If some files could not be added because of errors indexing
8892
them, do not abort the operation, but continue adding the
8993
others. The command shall still exit with non-zero status.

Documentation/git-am.txt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@ OPTIONS
2828
supply this argument, reads from the standard input. If you supply
2929
directories, they'll be treated as Maildirs.
3030

31-
-s, --signoff::
31+
-s::
32+
--signoff::
3233
Add `Signed-off-by:` line to the commit message, using
3334
the committer identity of yourself.
3435

35-
-k, --keep::
36+
-k::
37+
--keep::
3638
Pass `-k` flag to `git-mailinfo` (see linkgit:git-mailinfo[1]).
3739

38-
-u, --utf8::
40+
-u::
41+
--utf8::
3942
Pass `-u` flag to `git-mailinfo` (see linkgit:git-mailinfo[1]).
4043
The proposed commit log message taken from the e-mail
4144
is re-coded into UTF-8 encoding (configuration variable
@@ -49,13 +52,15 @@ default. You could use `--no-utf8` to override this.
4952
Pass `-n` flag to `git-mailinfo` (see
5053
linkgit:git-mailinfo[1]).
5154

52-
-3, --3way::
55+
-3::
56+
--3way::
5357
When the patch does not apply cleanly, fall back on
5458
3-way merge, if the patch records the identity of blobs
5559
it is supposed to apply to, and we have those blobs
5660
available locally.
5761

58-
-b, --binary::
62+
-b::
63+
--binary::
5964
Pass `--allow-binary-replacement` flag to `git-apply`
6065
(see linkgit:git-apply[1]).
6166

@@ -64,19 +69,22 @@ default. You could use `--no-utf8` to override this.
6469
program that applies
6570
the patch.
6671

67-
-C<n>, -p<n>::
72+
-C<n>::
73+
-p<n>::
6874
These flags are passed to the `git-apply` (see linkgit:git-apply[1])
6975
program that applies
7076
the patch.
7177

72-
-i, --interactive::
78+
-i::
79+
--interactive::
7380
Run interactively.
7481

7582
--skip::
7683
Skip the current patch. This is only meaningful when
7784
restarting an aborted patch.
7885

79-
-r, --resolved::
86+
-r::
87+
--resolved::
8088
After a patch failure (e.g. attempting to apply
8189
conflicting patch), the user has applied it by hand and
8290
the index file stores the result of the application.

Documentation/git-apply.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ OPTIONS
7373
When a pure mode change is encountered (which has no index information),
7474
the information is read from the current index instead.
7575

76-
-R, --reverse::
76+
-R::
77+
--reverse::
7778
Apply the patch in reverse.
7879

7980
--reject::
@@ -124,7 +125,8 @@ discouraged.
124125
the result with this option, which would apply the
125126
deletion part but not addition part.
126127

127-
--allow-binary-replacement, --binary::
128+
--allow-binary-replacement::
129+
--binary::
128130
Historically we did not allow binary patch applied
129131
without an explicit permission from the user, and this
130132
flag was the way to do so. Currently we always allow binary
@@ -169,7 +171,8 @@ behavior:
169171
correctly. This option adds support for applying such patches by
170172
working around this bug.
171173

172-
-v, --verbose::
174+
-v::
175+
--verbose::
173176
Report progress to stderr. By default, only a message about the
174177
current patch being applied will be printed. This option will cause
175178
additional information to be reported.

Documentation/git-archive.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ OPTIONS
3636
Format of the resulting archive: 'tar' or 'zip'. The default
3737
is 'tar'.
3838

39-
--list, -l::
39+
-l::
40+
--list::
4041
Show all available formats.
4142

42-
--verbose, -v::
43+
-v::
44+
--verbose::
4345
Report progress to stderr.
4446

4547
--prefix=<prefix>/::

Documentation/git-blame.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ include::blame-options.txt[]
5252
a certain threshold for git-blame to consider those lines
5353
of code to have been moved.
5454

55-
-f, --show-name::
55+
-f::
56+
--show-name::
5657
Show filename in the original commit. By default
5758
filename is shown if there is any line that came from a
5859
file with different name, due to rename detection.
5960

60-
-n, --show-number::
61+
-n::
62+
--show-number::
6163
Show line number in the original commit (Default: off).
6264

6365
-s::

Documentation/git-branch.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ OPTIONS
9595
-a::
9696
List both remote-tracking branches and local branches.
9797

98-
-v, --verbose::
98+
-v::
99+
--verbose::
99100
Show sha1 and commit subject line for each head.
100101

101102
--abbrev=<length>::

Documentation/git-checkout-index.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,26 @@ Will copy all files listed from the index to the working directory
2222

2323
OPTIONS
2424
-------
25-
-u|--index::
25+
-u::
26+
--index::
2627
update stat information for the checked out entries in
2728
the index file.
2829

29-
-q|--quiet::
30+
-q::
31+
--quiet::
3032
be quiet if files exist or are not in the index
3133

32-
-f|--force::
34+
-f::
35+
--force::
3336
forces overwrite of existing files
3437

35-
-a|--all::
38+
-a::
39+
--all::
3640
checks out all files in the index. Cannot be used
3741
together with explicit filenames.
3842

39-
-n|--no-create::
43+
-n::
44+
--no-create::
4045
Don't checkout new files, only refresh files already checked
4146
out.
4247

Documentation/git-checkout.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ OPTIONS
4747
by linkgit:git-check-ref-format[1]. Some of these checks
4848
may restrict the characters allowed in a branch name.
4949

50-
-t, --track::
50+
-t::
51+
--track::
5152
When creating a new branch, set up configuration so that git-pull
5253
will automatically retrieve data from the start point, which must be
5354
a branch. Use this if you always pull from the same upstream branch

0 commit comments

Comments
 (0)