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

Commit 6cf378f

Browse files
peffgitster
authored andcommitted
docs: stop using asciidoc no-inline-literal
In asciidoc 7, backticks like `foo` produced a typographic effect, but did not otherwise affect the syntax. In asciidoc 8, backticks introduce an "inline literal" inside which markup is not interpreted. To keep compatibility with existing documents, asciidoc 8 has a "no-inline-literal" attribute to keep the old behavior. We enabled this so that the documentation could be built on either version. It has been several years now, and asciidoc 7 is no longer in wide use. We can now decide whether or not we want inline literals on their own merits, which are: 1. The source is much easier to read when the literal contains punctuation. You can use `master~1` instead of `master{tilde}1`. 2. They are less error-prone. Because of point (1), we tend to make mistakes and forget the extra layer of quoting. This patch removes the no-inline-literal attribute from the Makefile and converts every use of backticks in the documentation to an inline literal (they must be cleaned up, or the example above would literally show "{tilde}" in the output). Problematic sites were found by grepping for '`.*[{\\]' and examined and fixed manually. The results were then verified by comparing the output of "html2text" on the set of generated html pages. Doing so revealed that in addition to making the source more readable, this patch fixes several formatting bugs: - HTML rendering used the ellipsis character instead of literal "..." in code examples (like "git log A...B") - some code examples used the right-arrow character instead of '->' because they failed to quote - api-config.txt did not quote tilde, and the resulting HTML contained a bogus snippet like: <tt><sub></tt> foo <tt></sub>bar</tt> which caused some parsers to choke and omit whole sections of the page. - git-commit.txt confused ``foo`` (backticks inside a literal) with ``foo'' (matched double-quotes) - mentions of `A U Thor <[email protected]>` used to erroneously auto-generate a mailto footnote for [email protected] - the description of --word-diff=plain incorrectly showed the output as "[-removed-] and {added}", not "{+added+}". - using "prime" notation like: commit `C` and its replacement `C'` confused asciidoc into thinking that everything between the first backtick and the final apostrophe were meant to be inside matched quotes - asciidoc got confused by the escaping of some of our asterisks. In particular, `credential.\*` and `credential.<url>.\*` properly escaped the asterisk in the first case, but literally passed through the backslash in the second case. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 868d662 commit 6cf378f

Some content is hidden

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

53 files changed

+192
-194
lines changed

Documentation/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ endif
8282
#
8383

8484
ifndef ASCIIDOC7
85-
ASCIIDOC_EXTRA += -a asciidoc7compatible -a no-inline-literal
85+
ASCIIDOC_EXTRA += -a asciidoc7compatible
8686
endif
8787
ifdef DOCBOOK_XSL_172
8888
ASCIIDOC_EXTRA += -a git-asciidoc-no-roff

Documentation/config.txt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@ Common unit suffixes of 'k', 'm', or 'g' are supported.
463463
core.excludesfile::
464464
In addition to '.gitignore' (per-directory) and
465465
'.git/info/exclude', git looks into this file for patterns
466-
of files which are not meant to be tracked. "{tilde}/" is expanded
467-
to the value of `$HOME` and "{tilde}user/" to the specified user's
466+
of files which are not meant to be tracked. "`~/`" is expanded
467+
to the value of `$HOME` and "`~user/`" to the specified user's
468468
home directory. See linkgit:gitignore[5].
469469

470470
core.askpass::
@@ -845,7 +845,7 @@ commit.status::
845845

846846
commit.template::
847847
Specify a file to use as the template for new commit messages.
848-
"{tilde}/" is expanded to the value of `$HOME` and "{tilde}user/" to the
848+
"`~/`" is expanded to the value of `$HOME` and "`~user/`" to the
849849
specified user's home directory.
850850

851851
credential.helper::
@@ -970,7 +970,7 @@ format.thread::
970970
a boolean value, or `shallow` or `deep`. `shallow` threading
971971
makes every mail a reply to the head of the series,
972972
where the head is chosen from the cover letter, the
973-
`\--in-reply-to`, and the first patch mail, in this order.
973+
`--in-reply-to`, and the first patch mail, in this order.
974974
`deep` threading makes every mail a reply to the previous one.
975975
A true boolean value is the same as `shallow`, and a false
976976
value disables threading.
@@ -1401,21 +1401,21 @@ instaweb.port::
14011401
interactive.singlekey::
14021402
In interactive commands, allow the user to provide one-letter
14031403
input with a single key (i.e., without hitting enter).
1404-
Currently this is used by the `\--patch` mode of
1404+
Currently this is used by the `--patch` mode of
14051405
linkgit:git-add[1], linkgit:git-checkout[1], linkgit:git-commit[1],
14061406
linkgit:git-reset[1], and linkgit:git-stash[1]. Note that this
14071407
setting is silently ignored if portable keystroke input
14081408
is not available.
14091409

14101410
log.abbrevCommit::
14111411
If true, makes linkgit:git-log[1], linkgit:git-show[1], and
1412-
linkgit:git-whatchanged[1] assume `\--abbrev-commit`. You may
1413-
override this option with `\--no-abbrev-commit`.
1412+
linkgit:git-whatchanged[1] assume `--abbrev-commit`. You may
1413+
override this option with `--no-abbrev-commit`.
14141414

14151415
log.date::
14161416
Set the default date-time mode for the 'log' command.
14171417
Setting a value for log.date is similar to using 'git log''s
1418-
`\--date` option. Possible values are `relative`, `local`,
1418+
`--date` option. Possible values are `relative`, `local`,
14191419
`default`, `iso`, `rfc`, and `short`; see linkgit:git-log[1]
14201420
for details.
14211421

@@ -1605,18 +1605,18 @@ pack.indexVersion::
16051605
and this config option ignored whenever the corresponding pack is
16061606
larger than 2 GB.
16071607
+
1608-
If you have an old git that does not understand the version 2 `{asterisk}.idx` file,
1608+
If you have an old git that does not understand the version 2 `*.idx` file,
16091609
cloning or fetching over a non native protocol (e.g. "http" and "rsync")
1610-
that will copy both `{asterisk}.pack` file and corresponding `{asterisk}.idx` file from the
1610+
that will copy both `*.pack` file and corresponding `*.idx` file from the
16111611
other side may give you a repository that cannot be accessed with your
1612-
older version of git. If the `{asterisk}.pack` file is smaller than 2 GB, however,
1612+
older version of git. If the `*.pack` file is smaller than 2 GB, however,
16131613
you can use linkgit:git-index-pack[1] on the *.pack file to regenerate
1614-
the `{asterisk}.idx` file.
1614+
the `*.idx` file.
16151615

16161616
pack.packSizeLimit::
16171617
The maximum size of a pack. This setting only affects
16181618
packing to a file when repacking, i.e. the git:// protocol
1619-
is unaffected. It can be overridden by the `\--max-pack-size`
1619+
is unaffected. It can be overridden by the `--max-pack-size`
16201620
option of linkgit:git-repack[1]. The minimum size allowed is
16211621
limited to 1 MiB. The default is unlimited.
16221622
Common unit suffixes of 'k', 'm', or 'g' are
@@ -1626,18 +1626,18 @@ pager.<cmd>::
16261626
If the value is boolean, turns on or off pagination of the
16271627
output of a particular git subcommand when writing to a tty.
16281628
Otherwise, turns on pagination for the subcommand using the
1629-
pager specified by the value of `pager.<cmd>`. If `\--paginate`
1630-
or `\--no-pager` is specified on the command line, it takes
1629+
pager specified by the value of `pager.<cmd>`. If `--paginate`
1630+
or `--no-pager` is specified on the command line, it takes
16311631
precedence over this option. To disable pagination for all
16321632
commands, set `core.pager` or `GIT_PAGER` to `cat`.
16331633

16341634
pretty.<name>::
16351635
Alias for a --pretty= format string, as specified in
16361636
linkgit:git-log[1]. Any aliases defined here can be used just
16371637
as the built-in pretty formats could. For example,
1638-
running `git config pretty.changelog "format:{asterisk} %H %s"`
1638+
running `git config pretty.changelog "format:* %H %s"`
16391639
would cause the invocation `git log --pretty=changelog`
1640-
to be equivalent to running `git log "--pretty=format:{asterisk} %H %s"`.
1640+
to be equivalent to running `git log "--pretty=format:* %H %s"`.
16411641
Note that an alias with the same name as a built-in format
16421642
will be silently ignored.
16431643

@@ -1750,7 +1750,7 @@ remote.<name>.push::
17501750

17511751
remote.<name>.mirror::
17521752
If true, pushing to this remote will automatically behave
1753-
as if the `\--mirror` option was given on the command line.
1753+
as if the `--mirror` option was given on the command line.
17541754

17551755
remote.<name>.skipDefaultUpdate::
17561756
If true, this remote will be skipped by default when updating

Documentation/diff-generate-patch.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ In the above example output, the function signature was changed
175175
from both files (hence two `-` removals from both file1 and
176176
file2, plus `++` to mean one line that was added does not appear
177177
in either file1 nor file2). Also eight other lines are the same
178-
from file1 but do not appear in file2 (hence prefixed with `{plus}`).
178+
from file1 but do not appear in file2 (hence prefixed with `+`).
179179

180180
When shown by `git diff-tree -c`, it compares the parents of a
181181
merge commit with the merge result (i.e. file1..fileN are the

Documentation/diff-options.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ These parameters can also be set individually with `--stat-width=<width>`,
7474
`--stat-name-width=<name-width>` and `--stat-count=<count>`.
7575

7676
--numstat::
77-
Similar to `\--stat`, but shows number of added and
77+
Similar to `--stat`, but shows number of added and
7878
deleted lines in decimal notation and pathname without
7979
abbreviation, to make it more machine friendly. For
8080
binary files, outputs two `-` instead of saying

Documentation/everyday.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ you originally wrote.
9898
<9> switch to the master branch.
9999
<10> merge a topic branch into your master branch.
100100
<11> review commit logs; other forms to limit output can be
101-
combined and include `\--max-count=10` (show 10 commits),
102-
`\--until=2005-12-10`, etc.
101+
combined and include `--max-count=10` (show 10 commits),
102+
`--until=2005-12-10`, etc.
103103
<12> view only the changes that touch what's in `curses/`
104104
directory, since `v2.43` tag.
105105

Documentation/git-archive.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ EXAMPLES
160160

161161
Same as above, but the format is inferred from the output file.
162162

163-
`git archive --format=tar --prefix=git-1.4.0/ v1.4.0{caret}\{tree\} | gzip >git-1.4.0.tar.gz`::
163+
`git archive --format=tar --prefix=git-1.4.0/ v1.4.0^{tree} | gzip >git-1.4.0.tar.gz`::
164164

165165
Create a compressed tarball for v1.4.0 release, but without a
166166
global extended pax header.

Documentation/git-blame.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ introduced the file with:
160160
git log --diff-filter=A --pretty=short -- foo
161161

162162
and then annotate the change between the commit and its
163-
parents, using `commit{caret}!` notation:
163+
parents, using `commit^!` notation:
164164

165165
git blame -C -C -f $commit^! -- foo
166166

Documentation/git-bundle.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ unbundle <file>::
6161
A list of arguments, acceptable to 'git rev-parse' and
6262
'git rev-list' (and containing a named ref, see SPECIFYING REFERENCES
6363
below), that specifies the specific objects and references
64-
to transport. For example, `master{tilde}10..master` causes the
64+
to transport. For example, `master~10..master` causes the
6565
current master reference to be packaged along with all objects
6666
added since its 10th ancestor commit. There is no explicit
6767
limit to the number of references and objects that may be
@@ -80,12 +80,12 @@ SPECIFYING REFERENCES
8080

8181
'git bundle' will only package references that are shown by
8282
'git show-ref': this includes heads, tags, and remote heads. References
83-
such as `master{tilde}1` cannot be packaged, but are perfectly suitable for
83+
such as `master~1` cannot be packaged, but are perfectly suitable for
8484
defining the basis. More than one reference may be packaged, and more
8585
than one basis can be specified. The objects packaged are those not
8686
contained in the union of the given bases. Each basis can be
87-
specified explicitly (e.g. `^master{tilde}10`), or implicitly (e.g.
88-
`master{tilde}10..master`, `--since=10.days.ago master`).
87+
specified explicitly (e.g. `^master~10`), or implicitly (e.g.
88+
`master~10..master`, `--since=10.days.ago master`).
8989

9090
It is very important that the basis used be held by the destination.
9191
It is okay to err on the side of caution, causing the bundle file

Documentation/git-check-ref-format.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ git imposes the following rules on how references are named:
4040

4141
. They cannot have ASCII control characters (i.e. bytes whose
4242
values are lower than \040, or \177 `DEL`), space, tilde `~`,
43-
caret `{caret}`, or colon `:` anywhere.
43+
caret `^`, or colon `:` anywhere.
4444

45-
. They cannot have question-mark `?`, asterisk `{asterisk}`, or open
45+
. They cannot have question-mark `?`, asterisk `*`, or open
4646
bracket `[` anywhere. See the `--refspec-pattern` option below for
4747
an exception to this rule.
4848

@@ -62,10 +62,10 @@ unquoted (by mistake), and also avoids ambiguities in certain
6262
reference name expressions (see linkgit:gitrevisions[7]):
6363

6464
. A double-dot `..` is often used as in `ref1..ref2`, and in some
65-
contexts this notation means `{caret}ref1 ref2` (i.e. not in
65+
contexts this notation means `^ref1 ref2` (i.e. not in
6666
`ref1` and in `ref2`).
6767

68-
. A tilde `~` and caret `{caret}` are used to introduce the postfix
68+
. A tilde `~` and caret `^` are used to introduce the postfix
6969
'nth parent' and 'peel onion' operation.
7070

7171
. A colon `:` is used as in `srcref:dstref` to mean "use srcref\'s
@@ -92,9 +92,9 @@ OPTIONS
9292
--refspec-pattern::
9393
Interpret <refname> as a reference name pattern for a refspec
9494
(as used with remote repositories). If this option is
95-
enabled, <refname> is allowed to contain a single `{asterisk}`
95+
enabled, <refname> is allowed to contain a single `*`
9696
in place of a one full pathname component (e.g.,
97-
`foo/{asterisk}/bar` but not `foo/bar{asterisk}`).
97+
`foo/*/bar` but not `foo/bar*`).
9898

9999
--normalize::
100100
Normalize 'refname' by removing any leading slash (`/`)

Documentation/git-checkout.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ the conflicted merge in the specified paths.
184184
+
185185
This means that you can use `git checkout -p` to selectively discard
186186
edits from your current working tree. See the ``Interactive Mode''
187-
section of linkgit:git-add[1] to learn how to operate the `\--patch` mode.
187+
section of linkgit:git-add[1] to learn how to operate the `--patch` mode.
188188

189189
<branch>::
190190
Branch to checkout; if it refers to a branch (i.e., a name that,
@@ -193,11 +193,11 @@ section of linkgit:git-add[1] to learn how to operate the `\--patch` mode.
193193
commit, your HEAD becomes "detached" and you are no longer on
194194
any branch (see below for details).
195195
+
196-
As a special case, the `"@\{-N\}"` syntax for the N-th last branch
196+
As a special case, the `"@{-N}"` syntax for the N-th last branch
197197
checks out the branch (instead of detaching). You may also specify
198-
`-` which is synonymous with `"@\{-1\}"`.
198+
`-` which is synonymous with `"@{-1}"`.
199199
+
200-
As a further special case, you may use `"A\...B"` as a shortcut for the
200+
As a further special case, you may use `"A...B"` as a shortcut for the
201201
merge base of `A` and `B` if there is exactly one merge base. You can
202202
leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
203203

0 commit comments

Comments
 (0)