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

[PATCH 03/17] Documentation: unbreak regex in show-ref manual

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 20, 2010, 10:23 UTC
Message-ID
<20100820102354.GC10407@burratino>
In-Reply-To
<20100820101902.GA10356@burratino>

I am not sure why, but the regular expression "(?:\^\{\})" gets rendered by asciidoc as "(?:\{})". The intent seems to be a regex matching the literal string "^{}", so this rewrites the markup to produce "(?:\^{})" as output.

Cc: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 Documentation/asciidoc.conf    |    1 +
 Documentation/git-show-ref.txt |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 6be8ba3..b5f0f29 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -16,6 +16,7 @@ plus=&#43;
 caret=&#94;
 startsb=&#91;
 endsb=&#93;
+backslash=&#92;
 tilde=&#126;
 apostrophe=&#39;
 backtick=&#96;
diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt
index 75780d7..4696af7 100644
--- a/Documentation/git-show-ref.txt
+++ b/Documentation/git-show-ref.txt
@@ -73,8 +73,8 @@ OPTIONS
 --exclude-existing[=<pattern>]::
 
 	Make 'git show-ref' act as a filter that reads refs from stdin of the
-	form "^(?:<anything>\s)?<refname>(?:\^\{\})?$" and performs the
-	following actions on each:
+	form "^(?:<anything>\s)?<refname>(?:{backslash}{caret}\{\})?$"
+	and performs the following actions on each:
 	(1) strip "^{}" 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;
-- 
1.7.2.2.536.g42dab.dirty
Previous: Jonathan NiederNext: Jonathan Nieder
Message 4 of 22 in “unexpected backslashes in man pages”
  1. 00/17 unexpected backslashes in man pagesJonathan Nieder, Aug 20, 2010
  2. 01/17 Documentation: tweak description of log.dateJonathan Nieder, Aug 20, 2010
  3. 02/17 Documentation: quoting trouble in "git rm" discussionJonathan Nieder, Aug 20, 2010
  4. 03/17 Documentation: unbreak regex in show-ref manualJonathan Nieder, Aug 20, 2010
  5. 04/17 Documentation: clarify quoting in "git add" exampleJonathan Nieder, Aug 20, 2010
  6. 05/17 Documentation: add missing quotes to "git grep" examplesJonathan Nieder, Aug 20, 2010
  7. 06/17 Documentation: clarify quoting in "git rm" exampleJonathan Nieder, Aug 20, 2010
  8. 07/17 Documentation: clarify quoting in gitignore docsJonathan Nieder, Aug 20, 2010
  9. 08/17 Documentation: remove backslashes in manpage synopsesJonathan Nieder, Aug 20, 2010
  10. 09/17 Documentation/technical: avoid stray backslash in parse-options API docsJonathan Nieder, Aug 20, 2010
  11. 10/17 Documentation: remove stray backslash from "git bundle" manualJonathan Nieder, Aug 20, 2010
  12. 11/17 Documentation: remove backslash before ~ in fast-import manualJonathan Nieder, Aug 20, 2010
  13. 12/17 Documentation: remove stray backslashes in rev-parse manualJonathan Nieder, Aug 20, 2010
  14. 13/17 Documentation: remove stray backslash in show-branch discussionJonathan Nieder, Aug 20, 2010
  15. Thomas RastAug 23, 2010
  16. Ramkumar RamachandraAug 23, 2010
  17. Jonathan NiederAug 23, 2010
  18. 14/17 Documentation: avoid stray backslashes in core tutorialJonathan Nieder, Aug 20, 2010
  19. 15/17 Documentation: avoid stray backslash in user manualJonathan Nieder, Aug 20, 2010
  20. 16/17 Documentation: do not convert ... operator to ellipsesJonathan Nieder, Aug 20, 2010
  21. 17/17 Documentation: remove stray backslashes from "Fighting regressions" articleJonathan Nieder, Aug 20, 2010
  22. Thomas RastAug 23, 2010

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.