Skip to content

Commit 6ab2608

Browse files
mhaggergitster
authored andcommitted
git-show-ref: fix escaping in asciidoc source
Two "^" characters were incorrectly being interpreted as markup for superscripting. Fix them by writing them as attribute references "{caret}". Although a single "^" character in a paragraph cannot be misinterpreted in this way, also write other "^" characters as "{caret}" in the interest of good hygiene (unless they are in literal paragraphs, of course, in which context attribute references are not recognized). Spell "{}" consistently, namely *not* quoted as "\{\}". Since the braces are empty, they cannot be interpreted as an attribute reference, and either spelling is OK. So arbitrarily choose one variation and use it consistently. Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 04f6785 commit 6ab2608

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Documentation/git-show-ref.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ OPTIONS
4444
-d::
4545
--dereference::
4646

47-
Dereference tags into object IDs as well. They will be shown with "^{}"
47+
Dereference tags into object IDs as well. They will be shown with "{caret}{}"
4848
appended.
4949

5050
-s::
@@ -73,9 +73,9 @@ OPTIONS
7373
--exclude-existing[=<pattern>]::
7474

7575
Make 'git show-ref' act as a filter that reads refs from stdin of the
76-
form "^(?:<anything>\s)?<refname>(?:{backslash}{caret}\{\})?$"
76+
form "{caret}(?:<anything>\s)?<refname>(?:{backslash}{caret}{})?$"
7777
and performs the following actions on each:
78-
(1) strip "^{}" at the end of line if any;
78+
(1) strip "{caret}{}" at the end of line if any;
7979
(2) ignore if pattern is provided and does not head-match refname;
8080
(3) warn if refname is not a well-formed refname and skip;
8181
(4) ignore if refname is a ref that exists in the local repository;

0 commit comments

Comments
 (0)