{"thread":{"id":"8802","subject":"[PATCH] Documentation: quote {non-attributes} for asciidoc","startedAt":"2007-07-02T05:24:59Z","lastAt":"2007-07-03T03:23:54Z","messageCount":2,"participants":["Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"46217","messageId":"20070702052459.GA2365@coredump.intra.peff.net","threadId":"8802","inReplyTo":null,"subject":"[PATCH] Documentation: quote {non-attributes} for asciidoc","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-07-02T05:24:59Z","receivedAt":"2007-07-02T05:24:59Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Asciidoc treats {foo} as an attribute to be substituted; if\n'foo' doesn't exist as an attribute, then the entire line\ngets dropped. When the literal {foo} is desired, \\{foo} is\nrequired.\n\nThe exceptions to this rule are:\n  - inside literal blocks\n  - if the 'foo' contains non-alphanumeric characters (e.g.,\n    {foo|bar} is assumed not to be an attribute)\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nI noticed this because one of the dropped lines was causing asciidoc to\ngenerate invalid XML for the git-stash man page. However, you can see it\nin action in other pages here:\n\n  http://www.kernel.org/pub/software/scm/git/docs/git-branch.html\n\nCheck out the '-l' option.\n\nI think this gets all of them (except for the release notes, which\naren't built). Unfortunately, asciidoc seems to have no mode where it\ntells me which lines it has dropped.\n\nI don't know how much we can rely on the \"if it doesn't look like an\nattribute name, print it literally\" behavior. It certainly is the case\nwith asciidoc 8.2.1, but I didn't try other versions.\n\nFinally, this would all be much simpler if asciidoc treated non-existant\nattributes as literal strings. I assume the line-dropping is to allow\nthem to work as a primitive conditional.\n\n Documentation/git-branch.txt       |    2 +-\n Documentation/git-checkout.txt     |    2 +-\n Documentation/git-receive-pack.txt |   10 +++++-----\n Documentation/git-rev-list.txt     |    4 ++--\n Documentation/git-stash.txt        |    8 ++++----\n 5 files changed, 13 insertions(+), 13 deletions(-)\n\ndiff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt\nindex 8d72bb9..9713f90 100644\n--- a/Documentation/git-branch.txt\n+++ b/Documentation/git-branch.txt\n@@ -56,7 +56,7 @@ OPTIONS\n -l::\n \tCreate the branch's ref log.  This activates recording of\n \tall changes to made the branch ref, enabling use of date\n-\tbased sha1 expressions such as \"<branchname>@{yesterday}\".\n+\tbased sha1 expressions such as \"<branchname>@\\{yesterday}\".\n \n -f::\n \tForce the creation of a new branch even if it means deleting\ndiff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt\nindex ea26da8..a6571d2 100644\n--- a/Documentation/git-checkout.txt\n+++ b/Documentation/git-checkout.txt\n@@ -64,7 +64,7 @@ OPTIONS\n -l::\n \tCreate the new branch's ref log.  This activates recording of\n \tall changes to made the branch ref, enabling use of date\n-\tbased sha1 expressions such as \"<branchname>@{yesterday}\".\n+\tbased sha1 expressions such as \"<branchname>@\\{yesterday}\".\n \n -m::\n \tIf you have local modifications to one or more files that\ndiff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt\nindex 6914aa5..4ef1840 100644\n--- a/Documentation/git-receive-pack.txt\n+++ b/Documentation/git-receive-pack.txt\n@@ -48,8 +48,8 @@ standard input of the hook will be one line per ref to be updated:\n The refname value is relative to $GIT_DIR; e.g. for the master\n head this is \"refs/heads/master\".  The two sha1 values before\n each refname are the object names for the refname before and after\n-the update.  Refs to be created will have sha1-old equal to 0{40},\n-while refs to be deleted will have sha1-new equal to 0{40}, otherwise\n+the update.  Refs to be created will have sha1-old equal to 0\\{40},\n+while refs to be deleted will have sha1-new equal to 0\\{40}, otherwise\n sha1-old and sha1-new should be valid objects in the repository.\n \n This hook is called before any refname is updated and before any\n@@ -71,7 +71,7 @@ The refname parameter is relative to $GIT_DIR; e.g. for the master\n head this is \"refs/heads/master\".  The two sha1 arguments are\n the object names for the refname before and after the update.\n Note that the hook is called before the refname is updated,\n-so either sha1-old is 0{40} (meaning there is no such ref yet),\n+so either sha1-old is 0\\{40} (meaning there is no such ref yet),\n or it should match what is recorded in refname.\n \n The hook should exit with non-zero status if it wants to disallow\n@@ -96,8 +96,8 @@ The refname value is relative to $GIT_DIR; e.g. for the master\n head this is \"refs/heads/master\".  The two sha1 values before\n each refname are the object names for the refname before and after\n the update.  Refs that were created will have sha1-old equal to\n-0{40}, while refs that were deleted will have sha1-new equal to\n-0{40}, otherwise sha1-old and sha1-new should be valid objects in\n+0\\{40}, while refs that were deleted will have sha1-new equal to\n+0\\{40}, otherwise sha1-old and sha1-new should be valid objects in\n the repository.\n \n Using this hook, it is easy to generate mails describing the updates\ndiff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt\nindex 32cb13f..20dcac6 100644\n--- a/Documentation/git-rev-list.txt\n+++ b/Documentation/git-rev-list.txt\n@@ -284,9 +284,9 @@ excluded from the output.\n +\n With '\\--pretty' format other than oneline (for obvious reasons),\n this causes the output to have two extra lines of information\n-taken from the reflog.  By default, 'commit@{Nth}' notation is\n+taken from the reflog.  By default, 'commit@\\{Nth}' notation is\n used in the output.  When the starting commit is specified as\n-'commit@{now}', output also uses 'commit@{timestamp}' notation\n+'commit@{now}', output also uses 'commit@\\{timestamp}' notation\n instead.  Under '\\--pretty=oneline', the commit message is\n prefixed with this information on the same line.\n \ndiff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt\nindex 4dc344d..b7d263d 100644\n--- a/Documentation/git-stash.txt\n+++ b/Documentation/git-stash.txt\n@@ -26,8 +26,8 @@ list`.\n \n The latest stash you created is stored in `$GIT_DIR/refs/stash`; older\n stashes are found in the reflog of this reference and can be named using\n-the usual reflog syntax (e.g. `stash@{1}` is the most recently\n-created stash, `stash@{2}` is the one before it, `stash@{2.hours.ago}`\n+the usual reflog syntax (e.g. `stash@\\{1}` is the most recently\n+created stash, `stash@\\{2}` is the one before it, `stash@\\{2.hours.ago}`\n is also possible).\n \n OPTIONS\n@@ -41,7 +41,7 @@ save::\n list::\n \n \tList the stashes that you currently have.  Each 'stash' is listed\n-\twith its name (e.g. `stash@{0}` is the latest stash, `stash@{1} is\n+\twith its name (e.g. `stash@\\{0}` is the latest stash, `stash@\\{1} is\n \tthe one before, etc.), the name of the branch that was current when the\n \tstash was made, and a short description of the commit the stash was\n \tbased on.\n@@ -57,7 +57,7 @@ show [<stash>]::\n \tstashed state and its original parent. When no `<stash>` is given,\n \tshows the latest one. By default, the command shows the diffstat, but\n \tit will accept any format known to `git-diff` (e.g., `git-stash show\n-\t-p stash@{2}` to view the second most recent stash in patch form).\n+\t-p stash@\\{2}` to view the second most recent stash in patch form).\n \n apply [<stash>]::\n \n-- \n1.5.2.2.1452.g896f6\n"},{"id":"46317","messageId":"20070703032354.GA4213@coredump.intra.peff.net","threadId":"8802","inReplyTo":"20070702052459.GA2365@coredump.intra.peff.net","subject":"Re: [PATCH] Documentation: quote {non-attributes} for asciidoc","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-07-03T03:23:54Z","receivedAt":"2007-07-03T03:23:54Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jul 02, 2007 at 01:24:59AM -0400, Jeff King wrote:\n\n>  Documentation/git-branch.txt       |    2 +-\n>  Documentation/git-checkout.txt     |    2 +-\n>  Documentation/git-receive-pack.txt |   10 +++++-----\n>  Documentation/git-rev-list.txt     |    4 ++--\n>  Documentation/git-stash.txt        |    8 ++++----\n>  5 files changed, 13 insertions(+), 13 deletions(-)\n\nI should have noted: this change is on top of next (due to the git-stash\ncorrections), but I think the rest of it should go into master ASAP, as\nit makes some of the documentation very difficult to read. It should be\ntrivial to split, but let me know if you want me to resend as two\npatches.\n\n-Peff\n"}]}