{"thread":{"id":"52738","subject":"[PATCH] git-filter-branch.txt: use {caret} for ^","startedAt":"2020-02-02T19:33:39Z","lastAt":"2020-02-03T21:03:07Z","messageCount":5,"participants":["Martin Ågren","Jeff King","Elijah Newren"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"391008","messageId":"20200202193319.1966-1-martin.agren@gmail.com","threadId":"52738","inReplyTo":null,"subject":"[PATCH] git-filter-branch.txt: use {caret} for ^","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2020-02-02T19:33:19Z","receivedAt":"2020-02-02T19:33:39Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"In this paragraph, we have a few instances of the '^' character, which\nwe give as \"\\^\". This renders well with AsciiDoc (\"^\"), but Asciidoctor\nrenders it literally as \"\\^\". Dropping the backslashes renders fine\nwith Asciidoctor, but not AsciiDoc... Let's use \"{caret}\" instead, to\navoid these escaping problems.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/git-filter-branch.txt | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt\nindex a530fef7e5..9e58d34c6a 100644\n--- a/Documentation/git-filter-branch.txt\n+++ b/Documentation/git-filter-branch.txt\n@@ -467,9 +467,9 @@ impossible for a backward-compatible implementation to ever be fast:\n \n * In editing files, git-filter-branch by design checks out each and\n   every commit as it existed in the original repo.  If your repo has\n-  10\\^5 files and 10\\^5 commits, but each commit only modifies 5\n-  files, then git-filter-branch will make you do 10\\^10 modifications,\n-  despite only having (at most) 5*10^5 unique blobs.\n+  10{caret}5 files and 10{caret}5 commits, but each commit only modifies 5\n+  files, then git-filter-branch will make you do 10{caret}10 modifications,\n+  despite only having (at most) 5*10{caret}5 unique blobs.\n \n * If you try and cheat and try to make git-filter-branch only work on\n   files modified in a commit, then two things happen\n-- \n2.25.0\n\n"},{"id":"391038","messageId":"20200203114549.GA4157558@coredump.intra.peff.net","threadId":"52738","inReplyTo":"20200202193319.1966-1-martin.agren@gmail.com","subject":"Re: [PATCH] git-filter-branch.txt: use {caret} for ^","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-02-03T11:45:49Z","receivedAt":"2020-02-03T11:45:51Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Feb 02, 2020 at 08:33:19PM +0100, Martin Ågren wrote:\n\n> In this paragraph, we have a few instances of the '^' character, which\n> we give as \"\\^\". This renders well with AsciiDoc (\"^\"), but Asciidoctor\n> renders it literally as \"\\^\". Dropping the backslashes renders fine\n> with Asciidoctor, but not AsciiDoc... Let's use \"{caret}\" instead, to\n> avoid these escaping problems.\n\nMakes sense.\n\nThe source is pretty ugly to read both before and after, though. I\nwonder if using a literal like `5*10^5` would be even nicer. That makes\nthe source pretty readable, and the output would put it in <tt> or\nsimilar. Which maybe is a little funny, but kind of makes sense to me\ntypographically as a kind of \"this is math\" style.\n\n-Peff\n"},{"id":"391053","messageId":"20200203203650.31914-1-martin.agren@gmail.com","threadId":"52738","inReplyTo":"20200203114549.GA4157558@coredump.intra.peff.net","subject":"Re: git-filter-branch.txt: wrap \"maths\" notation in backticks","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2020-02-03T20:36:50Z","receivedAt":"2020-02-03T20:37:12Z","isPatch":false,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Mon, 3 Feb 2020 at 12:45, Jeff King <peff@peff.net> wrote:\n>\n> On Sun, Feb 02, 2020 at 08:33:19PM +0100, Martin Ågren wrote:\n>\n> > In this paragraph, we have a few instances of the '^' character, which\n> > we give as \"\\^\". This renders well with AsciiDoc (\"^\"), but Asciidoctor\n> > renders it literally as \"\\^\". Dropping the backslashes renders fine\n> > with Asciidoctor, but not AsciiDoc... Let's use \"{caret}\" instead, to\n> > avoid these escaping problems.\n>\n> Makes sense.\n>\n> The source is pretty ugly to read both before and after, though. I\n\nYeah, I was happy to have improved the situation a bit, but didn't quite\nfeel that it looked great..\n\n> wonder if using a literal like `5*10^5` would be even nicer. That makes\n> the source pretty readable, and the output would put it in <tt> or\n> similar. Which maybe is a little funny, but kind of makes sense to me\n> typographically as a kind of \"this is math\" style.\n\nHmm, that somehow makes sense. How about the below? Outside of RelNotes/\nand technical/, I only saw one spot where we could do something similar\n(\"O(n^2)\" in diff-options.txt; it has an accompanying loose \"n\"). I had\nactually expected more. Most hits for \"{caret}\" are in revisions.txt\n(duh) and the one hit for \"\\^\" that remains after this patch is a shell\nsnippet.\n\nGoing for \"1e5\" and so on would be one way, I guess, but suffers from\nthe same problem that it somehow looks like a random pile of characters\nin the middle of a sentence (unless it's typeset in, e.g., monospace).\n\nOne could of course move in a different direction entirely and talk\nabout \"a thousand\", \"a million\" and so on...\n\n--->8---\nSubject: [PATCH v2] git-filter-branch.txt: wrap \"maths\" notation in backticks\n\nIn this paragraph, we have a few instances of the '^' character, which\nwe give as \"\\^\". This renders well with AsciiDoc (\"^\"), but Asciidoctor\nrenders it literally as \"\\^\". Dropping the backslashes renders fine\nwith Asciidoctor, but not AsciiDoc...\n\nAn earlier version of this patch used \"{caret}\" instead of \"^\", which\navoided these escaping problems. The rendering was still so-so, though\n-- these expressions end up set as normal text, similarly to when one\nprovides, e.g., computer code in the middle of running text, without\nproperly marking it with `backticks` to be monospaced.\n\nAs noted by Jeff King, this suggests actually wrapping these\nexpressions in backticks, setting them in monospace.\n\nThe lone \"5\" could be left as is or wrapped as `5`. Spell it out as\n\"five\" instead -- this generally looks better anyway for small numbers\nin the middle of text like this.\n\nSuggested-by: Jeff King <peff@peff.net>\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/git-filter-branch.txt | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt\nindex a530fef7e5..40ba4aa3e6 100644\n--- a/Documentation/git-filter-branch.txt\n+++ b/Documentation/git-filter-branch.txt\n@@ -467,9 +467,9 @@ impossible for a backward-compatible implementation to ever be fast:\n \n * In editing files, git-filter-branch by design checks out each and\n   every commit as it existed in the original repo.  If your repo has\n-  10\\^5 files and 10\\^5 commits, but each commit only modifies 5\n-  files, then git-filter-branch will make you do 10\\^10 modifications,\n-  despite only having (at most) 5*10^5 unique blobs.\n+  `10^5` files and `10^5` commits, but each commit only modifies five\n+  files, then git-filter-branch will make you do `10^10` modifications,\n+  despite only having (at most) `5*10^5` unique blobs.\n \n * If you try and cheat and try to make git-filter-branch only work on\n   files modified in a commit, then two things happen\n-- \n2.25.0\n\n"},{"id":"391054","messageId":"CABPp-BHQ_qSMa-VNMbXCvHxRuk04Tyth8HP8yTbktAXSGjFZJA@mail.gmail.com","threadId":"52738","inReplyTo":"20200203203650.31914-1-martin.agren@gmail.com","subject":"Re: git-filter-branch.txt: wrap \"maths\" notation in backticks","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2020-02-03T20:40:08Z","receivedAt":"2020-02-03T20:40:21Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Mon, Feb 3, 2020 at 12:37 PM Martin Ågren <martin.agren@gmail.com> wrote:\n>\n> On Mon, 3 Feb 2020 at 12:45, Jeff King <peff@peff.net> wrote:\n> >\n> > On Sun, Feb 02, 2020 at 08:33:19PM +0100, Martin Ågren wrote:\n> >\n> > > In this paragraph, we have a few instances of the '^' character, which\n> > > we give as \"\\^\". This renders well with AsciiDoc (\"^\"), but Asciidoctor\n> > > renders it literally as \"\\^\". Dropping the backslashes renders fine\n> > > with Asciidoctor, but not AsciiDoc... Let's use \"{caret}\" instead, to\n> > > avoid these escaping problems.\n> >\n> > Makes sense.\n> >\n> > The source is pretty ugly to read both before and after, though. I\n>\n> Yeah, I was happy to have improved the situation a bit, but didn't quite\n> feel that it looked great..\n>\n> > wonder if using a literal like `5*10^5` would be even nicer. That makes\n> > the source pretty readable, and the output would put it in <tt> or\n> > similar. Which maybe is a little funny, but kind of makes sense to me\n> > typographically as a kind of \"this is math\" style.\n>\n> Hmm, that somehow makes sense. How about the below? Outside of RelNotes/\n> and technical/, I only saw one spot where we could do something similar\n> (\"O(n^2)\" in diff-options.txt; it has an accompanying loose \"n\"). I had\n> actually expected more. Most hits for \"{caret}\" are in revisions.txt\n> (duh) and the one hit for \"\\^\" that remains after this patch is a shell\n> snippet.\n>\n> Going for \"1e5\" and so on would be one way, I guess, but suffers from\n> the same problem that it somehow looks like a random pile of characters\n> in the middle of a sentence (unless it's typeset in, e.g., monospace).\n>\n> One could of course move in a different direction entirely and talk\n> about \"a thousand\", \"a million\" and so on...\n>\n> --->8---\n> Subject: [PATCH v2] git-filter-branch.txt: wrap \"maths\" notation in backticks\n>\n> In this paragraph, we have a few instances of the '^' character, which\n> we give as \"\\^\". This renders well with AsciiDoc (\"^\"), but Asciidoctor\n> renders it literally as \"\\^\". Dropping the backslashes renders fine\n> with Asciidoctor, but not AsciiDoc...\n>\n> An earlier version of this patch used \"{caret}\" instead of \"^\", which\n> avoided these escaping problems. The rendering was still so-so, though\n> -- these expressions end up set as normal text, similarly to when one\n> provides, e.g., computer code in the middle of running text, without\n> properly marking it with `backticks` to be monospaced.\n>\n> As noted by Jeff King, this suggests actually wrapping these\n> expressions in backticks, setting them in monospace.\n>\n> The lone \"5\" could be left as is or wrapped as `5`. Spell it out as\n> \"five\" instead -- this generally looks better anyway for small numbers\n> in the middle of text like this.\n>\n> Suggested-by: Jeff King <peff@peff.net>\n> Signed-off-by: Martin Ågren <martin.agren@gmail.com>\n> ---\n>  Documentation/git-filter-branch.txt | 6 +++---\n>  1 file changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt\n> index a530fef7e5..40ba4aa3e6 100644\n> --- a/Documentation/git-filter-branch.txt\n> +++ b/Documentation/git-filter-branch.txt\n> @@ -467,9 +467,9 @@ impossible for a backward-compatible implementation to ever be fast:\n>\n>  * In editing files, git-filter-branch by design checks out each and\n>    every commit as it existed in the original repo.  If your repo has\n> -  10\\^5 files and 10\\^5 commits, but each commit only modifies 5\n> -  files, then git-filter-branch will make you do 10\\^10 modifications,\n> -  despite only having (at most) 5*10^5 unique blobs.\n> +  `10^5` files and `10^5` commits, but each commit only modifies five\n> +  files, then git-filter-branch will make you do `10^10` modifications,\n> +  despite only having (at most) `5*10^5` unique blobs.\n\nLooks good to me.\n\n>  * If you try and cheat and try to make git-filter-branch only work on\n>    files modified in a commit, then two things happen\n\nIt's so tempting to remove \"try and\" to get rid of the duplicate \"try\"\nat the same time...\n"},{"id":"391056","messageId":"20200203210305.GA11902@coredump.intra.peff.net","threadId":"52738","inReplyTo":"20200203203650.31914-1-martin.agren@gmail.com","subject":"Re: git-filter-branch.txt: wrap \"maths\" notation in backticks","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-02-03T21:03:05Z","receivedAt":"2020-02-03T21:03:07Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Feb 03, 2020 at 09:36:50PM +0100, Martin Ågren wrote:\n\n> --->8---\n> Subject: [PATCH v2] git-filter-branch.txt: wrap \"maths\" notation in backticks\n\nYep, this looks fine to me. Thanks.\n\n(I'd consider it fine to also put the O(n^2) you found in backticks, but\nif it renders fine in both places already, I'm happy either way).\n\n-Peff\n"}]}