Skip to content

Commit a3e65d7

Browse files
jonasJunio C Hamano
authored andcommitted
Documentation/urls.txt: Use substitution to escape square brackets
This changes "[user@]" to use {startsb} and {endsb} to insert [ and ], similar to how {caret} is used in git-rev-parse.txt. [jc: Removed a well-intentioned comment that broke the final formatting from the original patch. While we are at it, updated the paragraph that claims to be equivalent to the section that was updated earlier without making matching changes.] Signed-off-by: Jonas Fonseca <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c7543ce commit a3e65d7

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

Documentation/asciidoc.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
[attributes]
1111
caret=^
12+
startsb=&#91;
13+
endsb=&#93;
1214

1315
ifdef::backend-docbook[]
1416
[gitlink-inlinemacro]

Documentation/urls.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@ to name the remote repository:
1010
- https://host.xz/path/to/repo.git/
1111
- git://host.xz/path/to/repo.git/
1212
- git://host.xz/~user/path/to/repo.git/
13-
- ssh://+++[user@+++]host.xz/path/to/repo.git/
14-
- ssh://+++[user@+++]host.xz/~user/path/to/repo.git/
15-
- ssh://+++[user@+++]host.xz/~/path/to/repo.git
13+
- ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/
14+
- ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/
15+
- ssh://{startsb}user@{endsb}host.xz/~/path/to/repo.git
1616
===============================================================
1717

18-
SSH is the default transport protocol and also supports an
19-
scp-like syntax. Both syntaxes support username expansion,
18+
SSH is the default transport protocol. You can optionally specify
19+
which user to log-in as, and an alternate, scp-like syntax is also
20+
supported. Both syntaxes support username expansion,
2021
as does the native git protocol. The following three are
2122
identical to the last three above, respectively:
2223

2324
===============================================================
24-
- host.xz:/path/to/repo.git/
25-
- host.xz:~user/path/to/repo.git/
26-
- host.xz:path/to/repo.git
25+
- {startsb}user@{endsb}host.xz:/path/to/repo.git/
26+
- {startsb}user@{endsb}host.xz:~user/path/to/repo.git/
27+
- {startsb}user@{endsb}host.xz:path/to/repo.git
2728
===============================================================
2829

2930
To sync with a local directory, use:

0 commit comments

Comments
 (0)