Skip to content

Commit 715e716

Browse files
peffgitster
authored andcommitted
docs: make sure literal "->" isn't converted to arrow
Recent versions of asciidoc will treat "->" as a single-glyph arrow symbol, unless it is inside a literal code block. This is a problem if we are discussing literal output and want to show the ASCII characters. Our usage falls into three categories: 1. Inside a code block. These can be left as-is. 2. Discussing literal output or code, but inside a paragraph. This patch escapes these as "\->". 3. Using the arrow as a symbolic element, such as "use the Edit->Account Settings menu". In this case, the arrow symbol is preferable, so we leave it as-is. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fc17df0 commit 715e716

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Documentation/git-cvsserver.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ Configuring database backend
252252

253253
'git-cvsserver' uses the Perl DBI module. Please also read
254254
its documentation if changing these variables, especially
255-
about `DBI->connect()`.
255+
about `DBI\->connect()`.
256256

257257
gitcvs.dbname::
258258
Database name. The exact meaning depends on the

Documentation/git-status.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ In the short-format, the status of each path is shown as
9494

9595
XY PATH1 -> PATH2
9696

97-
where `PATH1` is the path in the `HEAD`, and the ` -> PATH2` part is
97+
where `PATH1` is the path in the `HEAD`, and the ` \-> PATH2` part is
9898
shown only when `PATH1` corresponds to a different path in the
9999
index/worktree (i.e. the file is renamed). The 'XY' is a two-letter
100100
status code.
101101

102-
The fields (including the `->`) are separated from each other by a
102+
The fields (including the `\->`) are separated from each other by a
103103
single space. If a filename contains whitespace or other nonprintable
104104
characters, that field will be quoted in the manner of a C string
105105
literal: surrounded by ASCII double quote (34) characters, and with
@@ -165,8 +165,8 @@ format, with a few exceptions:
165165

166166
There is also an alternate -z format recommended for machine parsing. In
167167
that format, the status field is the same, but some other things
168-
change. First, the '->' is omitted from rename entries and the field
169-
order is reversed (e.g 'from -> to' becomes 'to from'). Second, a NUL
168+
change. First, the '\->' is omitted from rename entries and the field
169+
order is reversed (e.g 'from \-> to' becomes 'to from'). Second, a NUL
170170
(ASCII 0) follows each filename, replacing space as a field separator
171171
and the terminating newline (but a space still separates the status
172172
field from the first filename). Third, filenames containing special

0 commit comments

Comments
 (0)