{"thread":{"id":"25927","subject":"[PATCH] documentation: escape '~' in git revert","startedAt":"2010-12-02T17:36:33Z","lastAt":"2010-12-02T19:23:50Z","messageCount":7,"participants":["Sylvain Rabot","Jonathan Nieder","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"157125","messageId":"1291311393-31843-1-git-send-email-sylvain.rabot@f-secure.com","threadId":"25927","inReplyTo":null,"subject":"[PATCH] documentation: escape '~' in git revert","fromName":"Sylvain Rabot","fromEmail":"sylvain.rabot@f-secure.com","sentAt":"2010-12-02T17:36:33Z","receivedAt":"2010-12-02T17:36:33Z","isPatch":true,"sender":{"key":"sylvain.rabot@f-secure.com","avatar":null},"body":"backslashing '~' characters do not have any effect, quoting with +++ has.\n\nSigned-off-by: Sylvain Rabot <sylvain.rabot@f-secure.com>\n---\n Documentation/git-revert.txt |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt\nindex f40984d..9368892 100644\n--- a/Documentation/git-revert.txt\n+++ b/Documentation/git-revert.txt\n@@ -82,12 +82,12 @@ effect to your index in a row.\n \n EXAMPLES\n --------\n-git revert HEAD~3::\n+git revert HEAD+++~+++3::\n \n \tRevert the changes specified by the fourth last commit in HEAD\n \tand create a new commit with the reverted changes.\n \n-git revert -n master\\~5..master~2::\n+git revert -n master+++~+++5..master+++~+++2::\n \n \tRevert the changes done by commits from the fifth last commit\n \tin master (included) to the third last commit in master\n-- \n1.7.3.2\n"},{"id":"157128","messageId":"20101202175013.GF3962@burratino","threadId":"25927","inReplyTo":"1291311393-31843-1-git-send-email-sylvain.rabot@f-secure.com","subject":"Re: [PATCH] documentation: escape '~' in git revert","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-12-02T17:50:13Z","receivedAt":"2010-12-02T17:50:13Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nSylvain Rabot wrote:\n\n> backslashing '~' characters do not have any effect, quoting with +++ has.\n\nOdd.  The first example already looks okay here.\n\n> +++ b/Documentation/git-revert.txt\n[...]\n> -git revert -n master\\~5..master~2::\n> +git revert -n master+++~+++5..master+++~+++2::\n\nPlease use the {tilde} entity instead of +++, since the former (1) does\nnot make text monospace and (2) works with older asciidoc.\n\nGood catch, thanks.\n"},{"id":"157131","messageId":"7v8w08rqx3.fsf@alter.siamese.dyndns.org","threadId":"25927","inReplyTo":"1291311393-31843-1-git-send-email-sylvain.rabot@f-secure.com","subject":"Re: [PATCH] documentation: escape '~' in git revert","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-12-02T18:05:44Z","receivedAt":"2010-12-02T18:05:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sylvain Rabot <sylvain.rabot@f-secure.com> writes:\n\n> backslashing '~' characters do not have any effect, quoting with +++ has.\n\nI vaguely recall that we tried to avoid using '+++' because versions of\nAsciiDoc that were widely used back when the bulk of documentation was\nwritten either did not handle the construct correctly, or did not know\nabout it at all.  So I would be very hesitant to take this patch as-is.\n\nGiving a cursory look at:\n\n    http://www.kernel.org/pub/software/scm/git/docs/git-revert.html\n\nthe first instance (HEAD~3) seems to be formatted Ok there (they run\nAsciiDoc 8.4.5 with xmlto 0.0.23 on F13), but it seems that we do need to\ndo something with the second one (~5..master~2).\n\nI think the problem is that AsciiDoc takes ~something~ as a mark-up for\nsomething.  Does it work to drop the backslash before ~5 and replace ~\nwith {tilde}, which was invented to deal with problems like this?\n\n> Signed-off-by: Sylvain Rabot <sylvain.rabot@f-secure.com>\n> ---\n>  Documentation/git-revert.txt |    4 ++--\n>  1 files changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt\n> index f40984d..9368892 100644\n> --- a/Documentation/git-revert.txt\n> +++ b/Documentation/git-revert.txt\n> @@ -82,12 +82,12 @@ effect to your index in a row.\n>  \n>  EXAMPLES\n>  --------\n> -git revert HEAD~3::\n> +git revert HEAD+++~+++3::\n>  \n>  \tRevert the changes specified by the fourth last commit in HEAD\n>  \tand create a new commit with the reverted changes.\n>  \n> -git revert -n master\\~5..master~2::\n> +git revert -n master+++~+++5..master+++~+++2::\n>  \n>  \tRevert the changes done by commits from the fifth last commit\n>  \tin master (included) to the third last commit in master\n> -- \n> 1.7.3.2\n"},{"id":"157135","messageId":"7vzksoqbjd.fsf@alter.siamese.dyndns.org","threadId":"25927","inReplyTo":"20101202175013.GF3962@burratino","subject":"Re: [PATCH] documentation: escape '~' in git revert","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-12-02T18:23:18Z","receivedAt":"2010-12-02T18:23:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Here is what I have right now, identified by\n\n    $ git grep -e '~[0-9].*~.*::$' Documentation/\n\nThere is one funny I do not understand (oh, well, I admit that I do not\nunderstand many funnies around AsciiDoc).  The two extra lines you would\nfind if you drop \"::$\" from the above, namely,\n\n    git-rebase.txt:    git rebase --onto topicA~5 topicA~3 topicA\n    user-manual.txt:$ git merge-file hello.c~2 hello.c~1 hello.c~3\n\ndo not seem to suffer from this issue.  IOW, it seems to affect only the\nenumeration head items.\n\n Documentation/git-cherry-pick.txt |    2 +-\n Documentation/git-revert.txt      |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt\nindex 3c96fa8..7300870 100644\n--- a/Documentation/git-cherry-pick.txt\n+++ b/Documentation/git-cherry-pick.txt\n@@ -92,7 +92,7 @@ git cherry-pick ^HEAD master::\n \tApply the changes introduced by all commits that are ancestors\n \tof master but not of HEAD to produce new commits.\n \n-git cherry-pick master\\~4 master~2::\n+git cherry-pick master{tilde}4 master{tilde}2::\n \n \tApply the changes introduced by the fifth and third last\n \tcommits pointed to by master and create 2 new commits with\ndiff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt\nindex f40984d..752fc88 100644\n--- a/Documentation/git-revert.txt\n+++ b/Documentation/git-revert.txt\n@@ -87,7 +87,7 @@ git revert HEAD~3::\n \tRevert the changes specified by the fourth last commit in HEAD\n \tand create a new commit with the reverted changes.\n \n-git revert -n master\\~5..master~2::\n+git revert -n master{tilde}5..master{tilde}2::\n \n \tRevert the changes done by commits from the fifth last commit\n \tin master (included) to the third last commit in master\n"},{"id":"157137","messageId":"20101202183257.GH3962@burratino","threadId":"25927","inReplyTo":"7vzksoqbjd.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] documentation: escape '~' in git revert","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-12-02T18:32:57Z","receivedAt":"2010-12-02T18:32:57Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Junio C Hamano wrote:\n\n> There is one funny I do not understand (oh, well, I admit that I do not\n> understand many funnies around AsciiDoc).  The two extra lines you would\n> find if you drop \"::$\" from the above, namely,\n> \n>     git-rebase.txt:    git rebase --onto topicA~5 topicA~3 topicA\n>     user-manual.txt:$ git merge-file hello.c~2 hello.c~1 hello.c~3\n> \n> do not seem to suffer from this issue.  IOW, it seems to affect only the\n> enumeration head items.\n\nFWIW I suspect those are both \"literal\" environments, thus governed\nby the rule described in v1.6.0-rc0~152 (git-format-patch(1): fix\nstray \\ in output, 2008-07-02).\n\nBased on \"git grep -e '~[^~].*~' -- Documentation/\", I think you found\nthem all, unless there are some examples span multiple lines.\n"},{"id":"157144","messageId":"1291317324-19594-1-git-send-email-sylvain@abstraction.fr","threadId":"25927","inReplyTo":"7vzksoqbjd.fsf@alter.siamese.dyndns.org","subject":"[PATCH] documentation: replace wrongly evalutated backslashed '~' characters","fromName":"Sylvain Rabot","fromEmail":"sylvain@abstraction.fr","sentAt":"2010-12-02T19:15:24Z","receivedAt":"2010-12-02T19:15:24Z","isPatch":true,"sender":{"key":"sylvain@abstraction.fr","avatar":"https://avatars.githubusercontent.com/u/153052?v=4"},"body":"Sometimes when there is more than one '~' on a line\nit gets evaluated even if being backslashed and cause\n'~' characters to be removed in the man pages.\n\nSigned-off-by: Sylvain Rabot <sylvain@abstraction.fr>\n---\n Documentation/git-cherry-pick.txt |    2 +-\n Documentation/git-revert.txt      |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt\nindex 3c96fa8..7300870 100644\n--- a/Documentation/git-cherry-pick.txt\n+++ b/Documentation/git-cherry-pick.txt\n@@ -92,7 +92,7 @@ git cherry-pick ^HEAD master::\n \tApply the changes introduced by all commits that are ancestors\n \tof master but not of HEAD to produce new commits.\n \n-git cherry-pick master\\~4 master~2::\n+git cherry-pick master{tilde}4 master{tilde}2::\n \n \tApply the changes introduced by the fifth and third last\n \tcommits pointed to by master and create 2 new commits with\ndiff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt\nindex f40984d..752fc88 100644\n--- a/Documentation/git-revert.txt\n+++ b/Documentation/git-revert.txt\n@@ -87,7 +87,7 @@ git revert HEAD~3::\n \tRevert the changes specified by the fourth last commit in HEAD\n \tand create a new commit with the reverted changes.\n \n-git revert -n master\\~5..master~2::\n+git revert -n master{tilde}5..master{tilde}2::\n \n \tRevert the changes done by commits from the fifth last commit\n \tin master (included) to the third last commit in master\n-- \n1.7.3.2\n"},{"id":"157147","messageId":"7vipzcq8qh.fsf@alter.siamese.dyndns.org","threadId":"25927","inReplyTo":"20101202183257.GH3962@burratino","subject":"Re: [PATCH] documentation: escape '~' in git revert","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-12-02T19:23:50Z","receivedAt":"2010-12-02T19:23:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> FWIW I suspect those are both \"literal\" environments, thus governed\n> by the rule described in v1.6.0-rc0~152 (git-format-patch(1): fix\n> stray \\ in output, 2008-07-02).\n>\n> Based on \"git grep -e '~[^~].*~' -- Documentation/\", I think you found\n> them all, unless there are some examples span multiple lines.\n\nThanks.  I'll queue this on 'maint' then.\n\n-- >8 --\nSubject: [PATCH] Documentation: Fix mark-up of lines with more than one tilde\n\nThe manual pages of cherry-pick and revert had examples with two revisions\non the same line in the examples section, that looked like this:\n\n    git cherry-pick master~4 master~2::\n\nUnfortunately, this is taken as a mark-up to make the part between two\ntildes, \"4 master\", subscript.  Use {tilde} to make it explicit that we\ndo want ~ characters in these places (backslash does not help).\n\nReported-by: Sylvain Rabot <sylvain.rabot@f-secure.com>\nHelped-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/git-cherry-pick.txt |    2 +-\n Documentation/git-revert.txt      |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt\nindex 3c96fa8..7300870 100644\n--- a/Documentation/git-cherry-pick.txt\n+++ b/Documentation/git-cherry-pick.txt\n@@ -92,7 +92,7 @@ git cherry-pick ^HEAD master::\n \tApply the changes introduced by all commits that are ancestors\n \tof master but not of HEAD to produce new commits.\n \n-git cherry-pick master\\~4 master~2::\n+git cherry-pick master{tilde}4 master{tilde}2::\n \n \tApply the changes introduced by the fifth and third last\n \tcommits pointed to by master and create 2 new commits with\ndiff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt\nindex f40984d..752fc88 100644\n--- a/Documentation/git-revert.txt\n+++ b/Documentation/git-revert.txt\n@@ -87,7 +87,7 @@ git revert HEAD~3::\n \tRevert the changes specified by the fourth last commit in HEAD\n \tand create a new commit with the reverted changes.\n \n-git revert -n master\\~5..master~2::\n+git revert -n master{tilde}5..master{tilde}2::\n \n \tRevert the changes done by commits from the fifth last commit\n \tin master (included) to the third last commit in master\n-- \n1.7.3.2.642.g8b3da\n"}]}