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

Re: [PATCH] documentation: escape '~' in git revert

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 2, 2010, 18:23 UTC
Message-ID
<7vzksoqbjd.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20101202175013.GF3962@burratino>
Here is what I have right now, identified by
    $ git grep -e '~[0-9].*~.*::$' Documentation/

There is one funny I do not understand (oh, well, I admit that I do not understand many funnies around AsciiDoc). The two extra lines you would find if you drop "::$" from the above, namely,

    git-rebase.txt:    git rebase --onto topicA~5 topicA~3 topicA
    user-manual.txt:$ git merge-file hello.c~2 hello.c~1 hello.c~3

do not seem to suffer from this issue. IOW, it seems to affect only the enumeration head items.

 Documentation/git-cherry-pick.txt |    2 +-
 Documentation/git-revert.txt      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
index 3c96fa8..7300870 100644
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -92,7 +92,7 @@ git cherry-pick ^HEAD master::
 	Apply the changes introduced by all commits that are ancestors
 	of master but not of HEAD to produce new commits.
 
-git cherry-pick master\~4 master~2::
+git cherry-pick master{tilde}4 master{tilde}2::
 
 	Apply the changes introduced by the fifth and third last
 	commits pointed to by master and create 2 new commits with
diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt
index f40984d..752fc88 100644
--- a/Documentation/git-revert.txt
+++ b/Documentation/git-revert.txt
@@ -87,7 +87,7 @@ git revert HEAD~3::
 	Revert the changes specified by the fourth last commit in HEAD
 	and create a new commit with the reverted changes.
 
-git revert -n master\~5..master~2::
+git revert -n master{tilde}5..master{tilde}2::
 
 	Revert the changes done by commits from the fifth last commit
 	in master (included) to the third last commit in master
Previous: Jonathan NiederNext: Jonathan Nieder
Message 3 of 7 in “documentation: escape '~' in git revert”
  1. documentation: escape '~' in git revertSylvain Rabot, Dec 2, 2010
  2. Jonathan NiederDec 2, 2010
  3. Junio C HamanoDec 2, 2010
  4. Jonathan NiederDec 2, 2010
  5. Junio C HamanoDec 2, 2010
  6. documentation: replace wrongly evalutated backslashed '~' charactersSylvain Rabot, Dec 2, 2010
  7. Junio C HamanoDec 2, 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.