{"thread":{"id":"15533","subject":"[PATCH] Documentation: Quote ~(s) causing subscript","startedAt":"2008-09-15T09:19:56Z","lastAt":"2008-09-16T19:12:42Z","messageCount":12,"participants":["Thomas Rast","Avery Pennarun","Junio C Hamano","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"90725","messageId":"1221470398-8698-1-git-send-email-trast@student.ethz.ch","threadId":"15533","inReplyTo":null,"subject":"[PATCH] Documentation: Quote ~(s) causing subscript","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2008-09-15T09:19:56Z","receivedAt":"2008-09-15T09:19:56Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"This is actually not a series, but a choice.  I noticed that\ngit-bundle.html has a stray subscript in the first paragraph of\n'Specifying References', so here are two options:\n\n* Documenation: git-bundle: quote tildes that cause subscript\n\n  The minimal-impact change.  Quotes just enough tildes in that\n  paragraph to avoid the subscript.\n\n* Documentation: replace [^~] with escapes everywhere\n\n  The global change.  Quotes all tildes and carets to avoid any future\n  confusion.\n\nI like the global change better, because any tilde or caret is a\npossible future pitfall: it will trigger a sub/superscript as soon as\na matching delimiter is added within the same paragraph.  But of\ncourse it makes the ascii non-markup less readable as plain text.\n\nSearching through history and list archives didn't exactly help: as\nearly as babfaba (Fix usage of carets in git-rev-parse(1),\n2005-10-05), the {caret} was established.  However, in a thread on\nprecisely the paragraph in git-bundle.txt I'm trying to fix,\n\n  http://thread.gmane.org/gmane.comp.version-control.git/50761\n\nthe discussion turned to trying to figure out a consistent asciidoc\nbehaviour -- and from there, style guide -- but died.  The patch\napparently never made it into git.git in either the \\~ or the {tilde}\nform.\n\n- Thomas\n"},{"id":"90726","messageId":"1221470398-8698-2-git-send-email-trast@student.ethz.ch","threadId":"15533","inReplyTo":"1221470398-8698-1-git-send-email-trast@student.ethz.ch","subject":"[PATCH] Documenation: git-bundle: quote tildes that cause subscript","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2008-09-15T09:19:57Z","receivedAt":"2008-09-15T09:19:57Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Signed-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n Documentation/git-bundle.txt |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt\nindex 1b66ab7..fc229f6 100644\n--- a/Documentation/git-bundle.txt\n+++ b/Documentation/git-bundle.txt\n@@ -79,11 +79,11 @@ SPECIFYING REFERENCES\n \n 'git-bundle' will only package references that are shown by\n 'git-show-ref': this includes heads, tags, and remote heads.  References\n-such as master~1 cannot be packaged, but are perfectly suitable for\n+such as master{tilde}1 cannot be packaged, but are perfectly suitable for\n defining the basis.  More than one reference may be packaged, and more\n than one basis can be specified.  The objects packaged are those not\n contained in the union of the given bases.  Each basis can be\n-specified explicitly (e.g., ^master~10), or implicitly (e.g.,\n+specified explicitly (e.g., ^master{tilde}10), or implicitly (e.g.,\n master~10..master, master --since=10.days.ago).\n \n It is very important that the basis used be held by the destination.\n-- \n1.6.0.2.451.ga9ffc\n"},{"id":"90727","messageId":"1221470398-8698-3-git-send-email-trast@student.ethz.ch","threadId":"15533","inReplyTo":"1221470398-8698-2-git-send-email-trast@student.ethz.ch","subject":"[PATCH] Documentation: replace [^~] with escapes everywhere","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2008-09-15T09:19:58Z","receivedAt":"2008-09-15T09:19:58Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Replaces all ^ and ~ that are not part of a \"literal\" paragraph with\n{caret} and {tilde}.\n\nTildes and carets are ordinarily used for ~sub~ and ^super^scripts.\nThis only triggers if a suitable chunk of text is found within the\ncurrent paragraph, so in most cases nothing happens (and the\ntilde/caret is taken literally).  However, it is a pitfall for anyone\nwho later adds more text to the same paragraph, so we might as well do\nit right.\n\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n Documentation/git-bundle.txt           |   10 +++++-----\n Documentation/git-check-ref-format.txt |    4 ++--\n Documentation/git-commit-tree.txt      |    2 +-\n Documentation/git-config.txt           |    6 +++---\n Documentation/git-daemon.txt           |    4 ++--\n Documentation/git-fast-export.txt      |    2 +-\n Documentation/git-fast-import.txt      |    2 +-\n Documentation/git-push.txt             |    2 +-\n Documentation/git-rebase.txt           |    2 +-\n Documentation/git-reset.txt            |    2 +-\n Documentation/git-rev-parse.txt        |    2 +-\n Documentation/git-show-branch.txt      |    2 +-\n Documentation/git-show.txt             |    2 +-\n Documentation/git-tools.txt            |    2 +-\n Documentation/gitcore-tutorial.txt     |    2 +-\n Documentation/gitignore.txt            |    2 +-\n Documentation/rev-list-options.txt     |    2 +-\n Documentation/user-manual.txt          |    8 ++++----\n 18 files changed, 29 insertions(+), 29 deletions(-)\n\ndiff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt\nindex 1b66ab7..5b255af 100644\n--- a/Documentation/git-bundle.txt\n+++ b/Documentation/git-bundle.txt\n@@ -60,7 +60,7 @@ unbundle <file>::\n [git-rev-list-args...]::\n        A list of arguments, acceptable to 'git-rev-parse' and\n        'git-rev-list', that specify the specific objects and references\n-       to transport.  For example, \"master~10..master\" causes the\n+       to transport.  For example, \"master{tilde}10..master\" causes the\n        current master reference to be packaged along with all objects\n        added since its 10th ancestor commit.  There is no explicit\n        limit to the number of references and objects that may be\n@@ -79,12 +79,12 @@ SPECIFYING REFERENCES\n \n 'git-bundle' will only package references that are shown by\n 'git-show-ref': this includes heads, tags, and remote heads.  References\n-such as master~1 cannot be packaged, but are perfectly suitable for\n+such as master{tilde}1 cannot be packaged, but are perfectly suitable for\n defining the basis.  More than one reference may be packaged, and more\n than one basis can be specified.  The objects packaged are those not\n contained in the union of the given bases.  Each basis can be\n-specified explicitly (e.g., ^master~10), or implicitly (e.g.,\n-master~10..master, master --since=10.days.ago).\n+specified explicitly (e.g., {caret}master{tilde}10), or implicitly (e.g.,\n+master{tilde}10..master, master --since=10.days.ago).\n \n It is very important that the basis used be held by the destination.\n It is okay to err on the side of conservatism, causing the bundle file\n@@ -152,7 +152,7 @@ With something like this in the config in R2:\n     fetch = refs/heads/*:refs/remotes/origin/*\n ------------------------\n \n-You can first sneakernet the bundle file to ~/tmp/file.bdl and\n+You can first sneakernet the bundle file to {tilde}/tmp/file.bdl and\n then these commands on machine B:\n \n ------------\ndiff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt\nindex 034223c..cbc8507 100644\n--- a/Documentation/git-check-ref-format.txt\n+++ b/Documentation/git-check-ref-format.txt\n@@ -26,7 +26,7 @@ imposes the following rules on how refs are named:\n . It cannot have two consecutive dots `..` anywhere;\n \n . It cannot have ASCII control character (i.e. bytes whose\n-  values are lower than \\040, or \\177 `DEL`), space, tilde `~`,\n+  values are lower than \\040, or \\177 `DEL`), space, tilde `{tilde}`,\n   caret `{caret}`, colon `:`, question-mark `?`, asterisk `*`,\n   or open bracket `[` anywhere;\n \n@@ -41,7 +41,7 @@ refname expressions (see linkgit:git-rev-parse[1]).  Namely:\n   context this notation means `{caret}ref1 ref2` (i.e. not in\n   ref1 and in ref2).\n \n-. tilde `~` and caret `{caret}` are used to introduce postfix\n+. tilde `{tilde}` and caret `{caret}` are used to introduce postfix\n   'nth parent' and 'peel onion' operation.\n \n . colon `:` is used as in `srcref:dstref` to mean \"use srcref\\'s\ndiff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt\nindex b8834ba..351a2d2 100644\n--- a/Documentation/git-commit-tree.txt\n+++ b/Documentation/git-commit-tree.txt\n@@ -71,7 +71,7 @@ present, system user name and fully qualified hostname.\n \n A commit comment is read from stdin. If a changelog\n entry is not provided via \"<\" redirection, 'git-commit-tree' will just wait\n-for one to be entered and terminated with ^D.\n+for one to be entered and terminated with {caret}D.\n \n \n Diagnostics\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex 28e1861..8dc5c28 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -84,10 +84,10 @@ OPTIONS\n \tAlso outputs the key names.\n \n --global::\n-\tFor writing options: write to global ~/.gitconfig file rather than\n+\tFor writing options: write to global {tilde}/.gitconfig file rather than\n \tthe repository .git/config.\n +\n-For reading options: read only from global ~/.gitconfig rather than\n+For reading options: read only from global {tilde}/.gitconfig rather than\n from all available files.\n +\n See also <<FILES>>.\n@@ -197,7 +197,7 @@ ENVIRONMENT\n \n GIT_CONFIG::\n \tTake the configuration from the given file instead of .git/config.\n-\tUsing the \"--global\" option forces this to ~/.gitconfig. Using the\n+\tUsing the \"--global\" option forces this to {tilde}/.gitconfig. Using the\n \t\"--system\" option forces this to $(prefix)/etc/gitconfig.\n \n See also <<FILES>>.\ndiff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt\nindex b08a08c..5c64647 100644\n--- a/Documentation/git-daemon.txt\n+++ b/Documentation/git-daemon.txt\n@@ -110,9 +110,9 @@ OPTIONS\n \n --user-path::\n --user-path=path::\n-\tAllow ~user notation to be used in requests.  When\n+\tAllow {tilde}user notation to be used in requests.  When\n \tspecified with no parameter, requests to\n-\tgit://host/~alice/foo is taken as a request to access\n+\tgit://host/{tilde}alice/foo is taken as a request to access\n \t'foo' repository in the home directory of user `alice`.\n \tIf `--user-path=path` is specified, the same request is\n \ttaken as a request to access `path/foo` repository in\ndiff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt\nindex b974e21..8f92545 100644\n--- a/Documentation/git-fast-export.txt\n+++ b/Documentation/git-fast-export.txt\n@@ -83,7 +83,7 @@ $ git fast-export master~5..master |\n \tgit fast-import\n -----------------------------------------------------\n \n-This makes a new branch called 'other' from 'master~5..master'\n+This makes a new branch called 'other' from 'master{tilde}5..master'\n (i.e. if 'master' has linear history, it will take the last 5 commits).\n \n Note that this assumes that none of the blobs and commit messages\ndiff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt\nindex c2f483a..39494e3 100644\n--- a/Documentation/git-fast-import.txt\n+++ b/Documentation/git-fast-import.txt\n@@ -103,7 +103,7 @@ amount of memory usage and processing time.  Assuming the frontend\n is able to keep up with fast-import and feed it a constant stream of data,\n import times for projects holding 10+ years of history and containing\n 100,000+ individual commits are generally completed in just 1-2\n-hours on quite modest (~$2,000 USD) hardware.\n+hours on quite modest ({tilde}$2,000 USD) hardware.\n \n Most bottlenecks appear to be in foreign source data access (the\n source just cannot extract revisions fast enough) or disk IO (fast-import\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex 45c9643..89fbc3d 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -37,7 +37,7 @@ OPTIONS\n \tthe destination ref.\n +\n The <src> side represents the source branch (or arbitrary\n-\"SHA1 expression\", such as `master~4` (four parents before the\n+\"SHA1 expression\", such as `master{tilde}4` (four parents before the\n tip of `master` branch); see linkgit:git-rev-parse[1]) that you\n want to push.  The <dst> side represents the destination location.\n +\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 59c1b02..9cf9940 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -334,7 +334,7 @@ errors), the loop will stop to let you fix things, and you can continue\n the loop with `git rebase --continue`.\n \n For example, if you want to reorder the last 5 commits, such that what\n-was HEAD~4 becomes the new HEAD. To achieve that, you would call\n+was HEAD{tilde}4 becomes the new HEAD. To achieve that, you would call\n 'git-rebase' like this:\n \n ----------------------\ndiff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt\nindex 6abaeac..c25ff2a 100644\n--- a/Documentation/git-reset.txt\n+++ b/Documentation/git-reset.txt\n@@ -80,7 +80,7 @@ $ git commit ...\n $ git reset --hard HEAD~3   <1>\n ------------\n +\n-<1> The last three commits (HEAD, HEAD^, and HEAD~2) were bad\n+<1> The last three commits (HEAD, HEAD{caret}, and HEAD{tilde}2) were bad\n and you do not want to ever see them again.  Do *not* do this if\n you have already given these commits to somebody else.\n \ndiff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt\nindex 2921da3..823ff52 100644\n--- a/Documentation/git-rev-parse.txt\n+++ b/Documentation/git-rev-parse.txt\n@@ -221,7 +221,7 @@ when you run 'git-merge'.\n \n * A suffix '{tilde}<n>' to a revision parameter means the commit\n   object that is the <n>th generation grand-parent of the named\n-  commit object, following only the first parent.  I.e. rev~3 is\n+  commit object, following only the first parent.  I.e. rev{tilde}3 is\n   equivalent to rev{caret}{caret}{caret} which is equivalent to\n   rev{caret}1{caret}1{caret}1.  See below for a illustration of\n   the usage of this form.\ndiff --git a/Documentation/git-show-branch.txt b/Documentation/git-show-branch.txt\nindex d3f2588..853eec4 100644\n--- a/Documentation/git-show-branch.txt\n+++ b/Documentation/git-show-branch.txt\n@@ -87,7 +87,7 @@ OPTIONS\n \n --sha1-name::\n \tInstead of naming the commits using the path to reach\n-\tthem from heads (e.g. \"master~2\" to mean the grandparent\n+\tthem from heads (e.g. \"master{tilde}2\" to mean the grandparent\n \tof \"master\"), name them with the unique prefix of their\n \tobject names.\n \ndiff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\nindex 48b612e..2ec3e88 100644\n--- a/Documentation/git-show.txt\n+++ b/Documentation/git-show.txt\n@@ -54,7 +54,7 @@ git show v1.0.0::\n git show v1.0.0^\\{tree\\}::\n \tShows the tree pointed to by the tag `v1.0.0`.\n \n-git show next~10:Documentation/README::\n+git show next{tilde}10:Documentation/README::\n \tShows the contents of the file `Documentation/README` as\n \tthey were current in the 10th last commit of the branch\n \t`next`.\ndiff --git a/Documentation/git-tools.txt b/Documentation/git-tools.txt\nindex a96403c..0592e56 100644\n--- a/Documentation/git-tools.txt\n+++ b/Documentation/git-tools.txt\n@@ -100,7 +100,7 @@ Foreign SCM interface\n Others\n ------\n \n-   - *(h)gct* (http://www.cyd.liu.se/users/~freku045/gct/)\n+   - *(h)gct* (http://www.cyd.liu.se/users/{tilde}freku045/gct/)\n \n    Commit Tool or (h)gct is a GUI enabled commit tool for git and\n    Mercurial (hg). It allows the user to view diffs, select which files\ndiff --git a/Documentation/gitcore-tutorial.txt b/Documentation/gitcore-tutorial.txt\nindex a417e59..1ba1188 100644\n--- a/Documentation/gitcore-tutorial.txt\n+++ b/Documentation/gitcore-tutorial.txt\n@@ -1650,7 +1650,7 @@ independent changes (if the order mattered, then they are not\n independent by definition).  You could instead merge those two\n branches into the current branch at once.  First let's undo what\n we just did and start over.  We would want to get the master\n-branch before these two merges by resetting it to 'master~2':\n+branch before these two merges by resetting it to 'master{tilde}2':\n \n ------------\n $ git reset --hard master~2\ndiff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt\nindex 59321a2..a10f2e4 100644\n--- a/Documentation/gitignore.txt\n+++ b/Documentation/gitignore.txt\n@@ -53,7 +53,7 @@ the repository but are specific to one user's workflow) should go into\n the `$GIT_DIR/info/exclude` file.  Patterns which a user wants git to\n ignore in all situations (e.g., backup or temporary files generated by\n the user's editor of choice) generally go into a file specified by\n-`core.excludesfile` in the user's `~/.gitconfig`.\n+`core.excludesfile` in the user's `{tilde}/.gitconfig`.\n \n The underlying git plumbing tools, such as\n 'git-ls-files' and 'git-read-tree', read\ndiff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\nindex 0ce916a..c917237 100644\n--- a/Documentation/rev-list-options.txt\n+++ b/Documentation/rev-list-options.txt\n@@ -535,7 +535,7 @@ These options are mostly targeted for packing of git repositories.\n --objects::\n \n \tPrint the object IDs of any object referenced by the listed\n-\tcommits.  '--objects foo ^bar' thus means \"send me\n+\tcommits.  '--objects foo {caret}bar' thus means \"send me\n \tall object IDs which I need to download if I have the commit\n \tobject 'bar', but not 'foo'\".\n \ndiff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt\nindex 08d1310..7e25b69 100644\n--- a/Documentation/user-manual.txt\n+++ b/Documentation/user-manual.txt\n@@ -570,7 +570,7 @@ $ git show HEAD~4   # the great-great-grandparent\n -------------------------------------------------\n \n Recall that merge commits may have more than one parent; by default,\n-^ and ~ follow the first parent listed in the commit, but you can\n+{caret} and {tilde} follow the first parent listed in the commit, but you can\n also choose:\n \n -------------------------------------------------\n@@ -1836,7 +1836,7 @@ We explain how to do this in the following sections.\n Setting up a public repository\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n \n-Assume your personal repository is in the directory ~/proj.  We\n+Assume your personal repository is in the directory {tilde}/proj.  We\n first create a new clone of the repository and tell git-daemon that it\n is meant to be public:\n \n@@ -3200,7 +3200,7 @@ Usually, dangling blobs and trees aren't very interesting. They're\n almost always the result of either being a half-way mergebase (the blob\n will often even have the conflict markers from a merge in it, if you\n have had conflicting merges that you fixed up by hand), or simply\n-because you interrupted a \"git-fetch\" with ^C or something like that,\n+because you interrupted a \"git-fetch\" with {caret}C or something like that,\n leaving _some_ of the new objects in the object database, but just\n dangling and useless.\n \n@@ -3991,7 +3991,7 @@ $ git cat-file blob cc44c73... >hello.c~3\n $ git merge-file hello.c~2 hello.c~1 hello.c~3\n ------------------------------------------------\n \n-This would leave the merge result in `hello.c~2` file, along\n+This would leave the merge result in `hello.c{tilde}2` file, along\n with conflict markers if there are conflicts.  After verifying\n the merge result makes sense, you can tell git what the final\n merge result for this file is by:\n-- \n1.6.0.2.451.ga9ffc\n"},{"id":"90791","messageId":"32541b130809151656n4f39018fu2045eb6280d6da00@mail.gmail.com","threadId":"15533","inReplyTo":"1221470398-8698-3-git-send-email-trast@student.ethz.ch","subject":"Re: [PATCH] Documentation: replace [^~] with escapes everywhere","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2008-09-15T23:56:48Z","receivedAt":"2008-09-15T23:56:48Z","isPatch":true,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Mon, Sep 15, 2008 at 5:19 AM, Thomas Rast <trast@student.ethz.ch> wrote:\n> Replaces all ^ and ~ that are not part of a \"literal\" paragraph with\n> {caret} and {tilde}.\n>\n> Tildes and carets are ordinarily used for ~sub~ and ^super^scripts.\n> This only triggers if a suitable chunk of text is found within the\n> current paragraph, so in most cases nothing happens (and the\n> tilde/caret is taken literally).  However, it is a pitfall for anyone\n> who later adds more text to the same paragraph, so we might as well do\n> it right.\n\nRather than uglifying all the documentation to work around the syntax,\nperhaps we just want to disable subscripts and superscripts\naltogether?  I can't really imagine the git documentation needing\nthem.\n\nTo do so, we can add these lines to asciidoc.conf (I just did this on\nanother project yesterday, but I haven't tested in git.git):\n\n[replacements]\n# Disable superscripts.\n\\^(.+?)\\^=^\\1^\n# Disable subscripts.\n~(.+?)~=~\\1~\n\n\n(For reference, the regexes on the left side of the equal sign came\nfrom a file in /etc/asciidoc somewhere.)\n\nHave fun,\n\nAvery\n"},{"id":"90792","messageId":"200809160205.23371.trast@student.ethz.ch","threadId":"15533","inReplyTo":"32541b130809151656n4f39018fu2045eb6280d6da00@mail.gmail.com","subject":"Re: [PATCH] Documentation: replace [^~] with escapes everywhere","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2008-09-16T00:05:19Z","receivedAt":"2008-09-16T00:05:19Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Avery Pennarun wrote:\n> Rather than uglifying all the documentation to work around the syntax,\n> perhaps we just want to disable subscripts and superscripts\n> altogether?  I can't really imagine the git documentation needing\n> them.\n> \n> To do so, we can add these lines to asciidoc.conf (I just did this on\n> another project yesterday, but I haven't tested in git.git):\n> \n> [replacements]\n> # Disable superscripts.\n> \\^(.+?)\\^=^\\1^\n> # Disable subscripts.\n> ~(.+?)~=~\\1~\n\nThat's indeed a far superior solution.  I withdraw my patches in\nfavour of this.\n\n-- \nThomas Rast\ntrast@student.ethz.ch\n\n"},{"id":"90794","messageId":"32541b130809151710j59963af9id84b3c1553ec738d@mail.gmail.com","threadId":"15533","inReplyTo":"200809160205.23371.trast@student.ethz.ch","subject":"Re: [PATCH] Documentation: replace [^~] with escapes everywhere","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2008-09-16T00:10:08Z","receivedAt":"2008-09-16T00:10:08Z","isPatch":true,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Mon, Sep 15, 2008 at 8:05 PM, Thomas Rast <trast@student.ethz.ch> wrote:\n> Avery Pennarun wrote:\n>> Rather than uglifying all the documentation to work around the syntax,\n>> perhaps we just want to disable subscripts and superscripts\n>> altogether?  I can't really imagine the git documentation needing\n>> them.\n>>\n>> To do so, we can add these lines to asciidoc.conf (I just did this on\n>> another project yesterday, but I haven't tested in git.git):\n>>\n>> [replacements]\n>> # Disable superscripts.\n>> \\^(.+?)\\^=^\\1^\n>> # Disable subscripts.\n>> ~(.+?)~=~\\1~\n>\n> That's indeed a far superior solution.  I withdraw my patches in\n> favour of this.\n\nEr, do you mind submitting (and testing :)) a new patch that does it?\nI don't have time right now.\n\nAvery\n"},{"id":"90821","messageId":"7vy71s7b26.fsf@gitster.siamese.dyndns.org","threadId":"15533","inReplyTo":"32541b130809151710j59963af9id84b3c1553ec738d@mail.gmail.com","subject":"Re: [PATCH] Documentation: replace [^~] with escapes everywhere","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-09-16T08:24:33Z","receivedAt":"2008-09-16T08:24:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Avery Pennarun\" <apenwarr@gmail.com> writes:\n\n> On Mon, Sep 15, 2008 at 8:05 PM, Thomas Rast <trast@student.ethz.ch> wrote:\n>> Avery Pennarun wrote:\n>>> Rather than uglifying all the documentation to work around the syntax,\n>>> perhaps we just want to disable subscripts and superscripts\n>>> altogether?  I can't really imagine the git documentation needing\n>>> them.\n>>>\n>>> To do so, we can add these lines to asciidoc.conf (I just did this on\n>>> another project yesterday, but I haven't tested in git.git):\n>>>\n>>> [replacements]\n>>> # Disable superscripts.\n>>> \\^(.+?)\\^=^\\1^\n>>> # Disable subscripts.\n>>> ~(.+?)~=~\\1~\n>>\n>> That's indeed a far superior solution.  I withdraw my patches in\n>> favour of this.\n>\n> Er, do you mind submitting (and testing :)) a new patch that does it?\n> I don't have time right now.\n\nSorry, but this unfortunately does not seem to help asciidoc 8.2.5 on FC9\nat all, which is the combination used at k.org machine that feeds the\nhtml/man branches to everybody else.\n\nasciidoc 7.1.2 on Deb does not have the problem in git-bundle.html to\nbegin with, but it does have the same issue in git-show-ref.html, which\nthe patch does fix.\n\ndiff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf\nindex 40d43b7..8fcdb54 100644\n--- a/Documentation/asciidoc.conf\n+++ b/Documentation/asciidoc.conf\n@@ -15,6 +15,12 @@ startsb=&#91;\n endsb=&#93;\n tilde=&#126;\n \n+[replacements]\n+# Disable superscripts.\n+\\^(.+?)\\^=^\\1^\n+# Disable subscripts.\n+~(.+?)~=~\\1~\n+\n ifdef::backend-docbook[]\n [linkgit-inlinemacro]\n {0%{target}}\n"},{"id":"90827","messageId":"1221569238-29263-1-git-send-email-trast@student.ethz.ch","threadId":"15533","inReplyTo":"7vy71s7b26.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] Documentation: disable sub/superscript characters ^/~","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2008-09-16T12:47:18Z","receivedAt":"2008-09-16T12:47:18Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Disables the special meaning of ^ and ~ as per the Asciidoc FAQ,\n\n  http://www.methods.co.nz/asciidoc/faq.html#_how_can_i_disable_a_quoted_text_substitution\n\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n\n---\n\nJunio C Hamano wrote:\n> Sorry, but this unfortunately does not seem to help asciidoc 8.2.5 on FC9\n> at all, which is the combination used at k.org machine that feeds the\n> html/man branches to everybody else.\n\nThis seems to do the trick on 8.2.5 here.\n\nUnfortunately, the changelog for 8.0 says that setting the quote\ncharacter to an empty replacement is new in 8.0 (I can't test with\n7.x), and I cannot find a way to make an 'if version >= 8' block.\n(Why does it have ifdef but no if?)\n\nSo maybe if someone sees a way to do this version-dependent, then we\ncan combine the two approaches and work with both 7.x and 8.x.\n\n- Thomas\n\n\n Documentation/asciidoc.conf |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf\nindex 40d43b7..37bf195 100644\n--- a/Documentation/asciidoc.conf\n+++ b/Documentation/asciidoc.conf\n@@ -15,6 +15,11 @@ startsb=&#91;\n endsb=&#93;\n tilde=&#126;\n \n+# disable sub/superscripts -- they collide with our ref notation\n+[quotes]\n+^=\n+~=\n+\n ifdef::backend-docbook[]\n [linkgit-inlinemacro]\n {0%{target}}\n-- \ntg: (5ab2757..) t/doc-disable-tilde (depends on: next)\n"},{"id":"90842","messageId":"32541b130809160858k3c019f6pdc4831c831e22b55@mail.gmail.com","threadId":"15533","inReplyTo":"7vy71s7b26.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Documentation: replace [^~] with escapes everywhere","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2008-09-16T15:58:58Z","receivedAt":"2008-09-16T15:58:58Z","isPatch":true,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Tue, Sep 16, 2008 at 4:24 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Sorry, but this unfortunately does not seem to help asciidoc 8.2.5 on FC9\n> at all, which is the combination used at k.org machine that feeds the\n> html/man branches to everybody else.\n>\n> asciidoc 7.1.2 on Deb does not have the problem in git-bundle.html to\n> begin with, but it does have the same issue in git-show-ref.html, which\n> the patch does fix.\n>\n> diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf\n> index 40d43b7..8fcdb54 100644\n> --- a/Documentation/asciidoc.conf\n> +++ b/Documentation/asciidoc.conf\n> @@ -15,6 +15,12 @@ startsb=&#91;\n>  endsb=&#93;\n>  tilde=&#126;\n>\n> +[replacements]\n> +# Disable superscripts.\n> +\\^(.+?)\\^=^\\1^\n> +# Disable subscripts.\n> +~(.+?)~=~\\1~\n> +\n>  ifdef::backend-docbook[]\n>  [linkgit-inlinemacro]\n>  {0%{target}}\n\nHmm, browsing around through a newer asciidoc package from Ubuntu, it\nappears that in asciidoc 8, those lines are in an\n\"ifdef::asciidoc7compatible[]\" section.  But the quoting mechanism in\n8 appears to be improved.\n\nPerhaps a section like this (guessing from the new\n/etc/asciidoc/asciidoc.conf) will do the job instead (or in addition,\nif we're trying to support both versions):\n\n[quotes]\n^=\n~=\n\n\nHTH.  I don't have a real system with asciidoc 8 installed, and now's\nnot a good time to risk breaking my asciidoc setup, so I definitely\ncan't test the above.\n\nHave fun,\n\nAvery\n"},{"id":"90845","messageId":"7vprn46odq.fsf@gitster.siamese.dyndns.org","threadId":"15533","inReplyTo":"32541b130809160858k3c019f6pdc4831c831e22b55@mail.gmail.com","subject":"Re: [PATCH] Documentation: replace [^~] with escapes everywhere","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-09-16T16:34:25Z","receivedAt":"2008-09-16T16:34:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Avery Pennarun\" <apenwarr@gmail.com> writes:\n\n> Hmm, browsing around through a newer asciidoc package from Ubuntu, it\n> appears that in asciidoc 8, those lines are in an\n> \"ifdef::asciidoc7compatible[]\" section.  But the quoting mechanism in\n> 8 appears to be improved.\n\nYeah, the thing is that we cannot say \"ifdef::asciidoc7compatible[]\"\nand feed it to asciidoc7 X-<.\n"},{"id":"90846","messageId":"7vhc8g6nqt.fsf@gitster.siamese.dyndns.org","threadId":"15533","inReplyTo":"32541b130809160858k3c019f6pdc4831c831e22b55@mail.gmail.com","subject":"Re: [PATCH] Documentation: replace [^~] with escapes everywhere","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-09-16T16:48:10Z","receivedAt":"2008-09-16T16:48:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Avery Pennarun\" <apenwarr@gmail.com> writes:\n\n> Hmm, browsing around through a newer asciidoc package from Ubuntu, it\n> appears that in asciidoc 8, those lines are in an\n> \"ifdef::asciidoc7compatible[]\" section.  But the quoting mechanism in\n> 8 appears to be improved.\n>\n> Perhaps a section like this (guessing from the new\n> /etc/asciidoc/asciidoc.conf) will do the job instead (or in addition,\n> if we're trying to support both versions):\n>\n> [quotes]\n> ^=\n> ~=\n\nOk, how about this patch?  I do not have an access to the box with\nAsciiDoc 8 handy right now, so I cannot test this myself, but there must\nbe somebody on the list who can give a quick test to this.\n\nThe procedure would be:\n\n\t$ cd Documentation\n        $ rm -fr ./+old ./+new && mkdir ./+old ./+new\n        $ make git-{bundle,show-ref}.{html,1}\n        $ mv git-{bundle,show-ref}.{html,1} ./+old\n        $ git apply < this-patch\n        $ make git-{bundle,show-ref}.{html,1}\n        $ mv git-{bundle,show-ref}.{html,1} ./+new\n        $ git diff --no-index --color-words ./+old ./+new\n\nThen eyeball the output, ignoring the timestamps and see if <sup>/<sub>\ndisappears and there is no other change.  Other documentation pages should\nalso be verified, but these two are I know of with the issue.\n\ndiff --git i/Documentation/asciidoc.conf w/Documentation/asciidoc.conf\nindex 40d43b7..36b6509 100644\n--- i/Documentation/asciidoc.conf\n+++ w/Documentation/asciidoc.conf\n@@ -15,6 +15,21 @@ startsb=&#91;\n endsb=&#93;\n tilde=&#126;\n \n+[replacements]\n+# Disable superscripts.\n+\\^(.+?)\\^=^\\1^\n+# Disable subscripts.\n+~(.+?)~=~\\1~\n+\n+# We define asciidoc7compatible macro when running with AsciiDoc 8;\n+# this ifdef protects the \"empty\" quotes rule that AsciiDoc 7 does\n+# not know how to handle.\n+ifdef::asciidoc7compatible[]\n+[quotes]\n+^=\n+~=\n+endif::asciidoc7compatible[]\n+\n ifdef::backend-docbook[]\n [linkgit-inlinemacro]\n {0%{target}}\n"},{"id":"90857","messageId":"20080916191241.GB9870@sigill.intra.peff.net","threadId":"15533","inReplyTo":"7vhc8g6nqt.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Documentation: replace [^~] with escapes everywhere","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-09-16T19:12:42Z","receivedAt":"2008-09-16T19:12:42Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Sep 16, 2008 at 09:48:10AM -0700, Junio C Hamano wrote:\n\n> Ok, how about this patch?  I do not have an access to the box with\n> AsciiDoc 8 handy right now, so I cannot test this myself, but there must\n> be somebody on the list who can give a quick test to this.\n\nNo, using this patch and your test procedure, +old and +new are\nidentically broken with my version of asciidoc (8.2.7). Both contain\n<sub> tags.\n\n-Peff\n"}]}