git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 1/2] git-show-ref: fix escaping in asciidoc source

From
mhagger@alum.mit.edu <mhagger@alum.mit.edu>
Date
Jan 13, 2012, 16:39 UTC
Message-ID
<1326472756-15227-2-git-send-email-mhagger@alum.mit.edu>
In-Reply-To
<1326472756-15227-1-git-send-email-mhagger@alum.mit.edu>
From: Michael Haggerty <mhagger@alum.mit.edu>

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 <mhagger@alum.mit.edu>
---
 Documentation/git-show-ref.txt |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt
index 3c45895..8dfcbe3 100644
--- a/Documentation/git-show-ref.txt
+++ b/Documentation/git-show-ref.txt
@@ -44,7 +44,7 @@ OPTIONS
 -d::
 --dereference::
 
-	Dereference tags into object IDs as well. They will be shown with "^{}"
+	Dereference tags into object IDs as well. They will be shown with "{caret}{}"
 	appended.
 
 -s::
@@ -73,9 +73,9 @@ OPTIONS
 --exclude-existing[=<pattern>]::
 
 	Make 'git show-ref' act as a filter that reads refs from stdin of the
-	form "^(?:<anything>\s)?<refname>(?:{backslash}{caret}\{\})?$"
+	form "{caret}(?:<anything>\s)?<refname>(?:{backslash}{caret}{})?$"
 	and performs the following actions on each:
-	(1) strip "^{}" at the end of line if any;
+	(1) strip "{caret}{}" at the end of line if any;
 	(2) ignore if pattern is provided and does not head-match refname;
 	(3) warn if refname is not a well-formed refname and skip;
 	(4) ignore if refname is a ref that exists in the local repository;
-- 
1.7.8.3
Previous: mhagger@alum.mit.eduNext: mhagger@alum.mit.edu
Message 2 of 4 in “git-show-ref: fix asciidoc formatting”
  1. 0/2 git-show-ref: fix asciidoc formattingmhagger@alum.mit.edu, Jan 13, 2012
  2. 1/2 git-show-ref: fix escaping in asciidoc sourcemhagger@alum.mit.edu, Jan 13, 2012
  3. 2/2 git-show-ref doc: typeset regexp in fixed width fontmhagger@alum.mit.edu, Jan 13, 2012
  4. Junio C HamanoJan 13, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.