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

[PATCH] Documentation: quote double-dash in "<commit> -- <filename>" for AsciiDoc

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jun 28, 2011, 17:17 UTC
Message-ID
<20110628171748.GA11485@elie>

As explained in v1.7.3-rc0~13^2 (Work around em-dash handling in newer AsciiDoc, 2010-08-23), outside of verbatim environments, newish versions of AsciiDoc will convert double hyphens to en dashes. Use the litdd syntax introduced by that patch to avoid such misformatting in sentences where "--" represents the two-character "end of options" argument that separates revision names from filename patterns.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 Documentation/git-commit.txt |    2 +-
 Documentation/git-revert.txt |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 7951cb7b..1764cf10 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -284,7 +284,7 @@ When recording your own work, the contents of modified files in
 your working tree are temporarily stored to a staging area
 called the "index" with 'git add'.  A file can be
 reverted back, only in the index but not in the working tree,
-to that of the last commit with `git reset HEAD -- <file>`,
+to that of the last commit with `git reset HEAD {litdd} <file>`,
 which effectively reverts 'git add' and prevents the changes to
 this file from participating in the next commit.  After building
 the state to be committed incrementally with these commands,
diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt
index ac10cfbb..a516d577 100644
--- a/Documentation/git-revert.txt
+++ b/Documentation/git-revert.txt
@@ -23,7 +23,7 @@ throw away all uncommitted changes in your working directory, you
 should see linkgit:git-reset[1], particularly the '--hard' option.  If
 you want to extract specific files as they were in another commit, you
 should see linkgit:git-checkout[1], specifically the `git checkout
-<commit> -- <filename>` syntax.  Take care with these alternatives as
+<commit> {litdd} <filename>` syntax.  Take care with these alternatives as
 both will discard uncommitted changes in your working directory.
 
 OPTIONS
-- 
1.7.6.rc3
Next: Junio C Hamano
Message 1 of 9 in “Documentation: quote double-dash in "<commit> -- <filename>" for AsciiDoc”
  1. Documentation: quote double-dash in "<commit> -- <filename>" for AsciiDocJonathan Nieder, Jun 28, 2011
  2. Junio C HamanoJun 28, 2011
  3. Jonathan NiederJun 29, 2011
  4. Jeff KingJun 28, 2011
  5. 0/2 Documentation: quote double-dash for AsciiDocJonathan Nieder, Jun 29, 2011
  6. 1/2 Documentation: quote double-dash for AsciiDocJonathan Nieder, Jun 29, 2011
  7. 2/2 Documentation/i18n: quote double-dash for AsciiDocJonathan Nieder, Jun 29, 2011
  8. Ævar Arnfjörð BjarmasonJun 29, 2011
  9. fixup! Documentation/i18n: quote double-dash for AsciiDocJonathan Nieder, Jun 29, 2011

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.