{"thread":{"id":"45149","subject":"Back quote typo in error messages (?)","startedAt":"2017-02-15T21:06:52Z","lastAt":"2017-02-16T20:59:20Z","messageCount":8,"participants":["Fabrizio Cucci","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"311672","messageId":"CAOxYW4z=bABqhmHWCc9rizykMcGBjDvqLEuqpJ6DtPve5442Fw@mail.gmail.com","threadId":"45149","inReplyTo":null,"subject":"Back quote typo in error messages (?)","fromName":"Fabrizio Cucci","fromEmail":"fabrizio.cucci@gmail.com","sentAt":"2017-02-15T21:06:46Z","receivedAt":"2017-02-15T21:06:52Z","isPatch":false,"sender":{"key":"fabrizio.cucci@gmail.com","avatar":null},"body":"Hello everyone,\n\nit's been a couple of days that I keep noticing something (very minor)\nthat my OCD for symmetric things can't really stand.\n\nIf you run the following command:\n\n$ git branch --i-dont-exists\n\nyou should get:\n\nerror: unknown option `i-dont-exists'\n\nShouldn't the wrong flag be surrounded by two single quotes instead of\na back quote and a single quote?\n\nFor the sake of completeness, I'm on Mac running Git 2.10.1.\n\nThanks,\nFabrizio\n"},{"id":"311673","messageId":"20170215212157.qgscyglgzrd5cplf@sigill.intra.peff.net","threadId":"45149","inReplyTo":"CAOxYW4z=bABqhmHWCc9rizykMcGBjDvqLEuqpJ6DtPve5442Fw@mail.gmail.com","subject":"Re: Back quote typo in error messages (?)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-02-15T21:21:58Z","receivedAt":"2017-02-15T21:22:06Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Feb 15, 2017 at 09:06:46PM +0000, Fabrizio Cucci wrote:\n\n> it's been a couple of days that I keep noticing something (very minor)\n> that my OCD for symmetric things can't really stand.\n> \n> If you run the following command:\n> \n> $ git branch --i-dont-exists\n> \n> you should get:\n> \n> error: unknown option `i-dont-exists'\n> \n> Shouldn't the wrong flag be surrounded by two single quotes instead of\n> a back quote and a single quote?\n\nSome people use the matched backtick/single-quote to emulate the\nnon-symmetric start/end quotes used in traditional typography (and in\nfact, ``foo'' in languages like asciidoc are typically rendered using\nsmart-quotes).\n\nSo I think what you are seeing is not wrong in the sense of being\nunintended by the author of the message. But I do think that git mostly\nuses matched double or single quotes in its error messages, and the\nnon-symmetric quotes are relatively rare. Running:\n\n  git grep \"\\`.*'\" -- '*.c' ':!compat'\n\nshows that there are only a few `quoted' cases in the code base (there\nare 27 matches, but many of those are false positives, and some are in\ncomments).\n\nI don't know how much we care about standardizing that punctuation. If\nwe do, I suspect there is also inconsistency between single-quotes and\ndouble-quotes ('foo' versus \"foo\", which I think is an American versus\nEuropean thing; we seem to mostly use 'foo', though).\n\n-Peff\n"},{"id":"311677","messageId":"xmqqr32z2l9u.fsf@gitster.mtv.corp.google.com","threadId":"45149","inReplyTo":"20170215212157.qgscyglgzrd5cplf@sigill.intra.peff.net","subject":"Re: Back quote typo in error messages (?)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-02-15T21:31:57Z","receivedAt":"2017-02-15T21:32:03Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> So I think what you are seeing is not wrong in the sense of being\n> unintended by the author of the message. But I do think that git mostly\n> uses matched double or single quotes in its error messages, and the\n> non-symmetric quotes are relatively rare. Running:\n>\n>   git grep \"\\`.*'\" -- '*.c' ':!compat'\n>\n> shows that there are only a few `quoted' cases in the code base (there\n> are 27 matches, but many of those are false positives, and some are in\n> comments).\n\nI did a simpler \n\n    $ git grep \"\\`%s'\"\n\nand saw \"`git %s' is aliased to `%s'\" from builtin/help.c and\n\"unknown option `%s'\" from parse-options.c (and revision.c)\n\nWhat Fabrizio saw is the one in parse-options.c, so even though the\nnumber of strings in the code is small, they appear everywhere.\n\nI agree that we should standardise them, and we should do so early\nin a cycle, because these appear also in .po files.  It is too late\nfor this cycle, obviously.\n\n"},{"id":"311682","messageId":"CAOxYW4xqk4j6Uu86jq2Vi9Bpgihxfr2Tw-DQLc+7YTZiPmDtiA@mail.gmail.com","threadId":"45149","inReplyTo":"20170215212157.qgscyglgzrd5cplf@sigill.intra.peff.net","subject":"Re: Back quote typo in error messages (?)","fromName":"Fabrizio Cucci","fromEmail":"fabrizio.cucci@gmail.com","sentAt":"2017-02-15T21:51:30Z","receivedAt":"2017-02-15T21:51:36Z","isPatch":false,"sender":{"key":"fabrizio.cucci@gmail.com","avatar":null},"body":"On 15 February 2017 at 21:21, Jeff King <peff@peff.net> wrote:\n\n> On Wed, Feb 15, 2017 at 09:06:46PM +0000, Fabrizio Cucci wrote:\n>> Shouldn't the wrong flag be surrounded by two single quotes instead of\n>> a back quote and a single quote?\n>\n> Some people use the matched backtick/single-quote to emulate the\n> non-symmetric start/end quotes used in traditional typography (and in\n> fact, ``foo'' in languages like asciidoc are typically rendered using\n> smart-quotes).\n\nI definitely didn't know about the use of them in traditional typography!\nBut I couldn't find any example of non-symmetric quotes in AsciiDoc...\n\n> So I think what you are seeing is not wrong in the sense of being\n> unintended by the author of the message.\n\nI had the opposite impression from the quick search in the GitHub\nrepo, this is why I wrote here looking for some confirmation.\n\n> I don't know how much we care about standardizing that punctuation.\n\nI mentioned it was very minor but, still, in my opinion a project like\nGit deserves consistent punctuation! :)\n"},{"id":"311685","messageId":"20170215215633.deyxp76j7o3ceoq3@sigill.intra.peff.net","threadId":"45149","inReplyTo":"CAOxYW4xqk4j6Uu86jq2Vi9Bpgihxfr2Tw-DQLc+7YTZiPmDtiA@mail.gmail.com","subject":"Re: Back quote typo in error messages (?)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-02-15T21:56:34Z","receivedAt":"2017-02-15T21:56:42Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Feb 15, 2017 at 09:51:30PM +0000, Fabrizio Cucci wrote:\n\n> > Some people use the matched backtick/single-quote to emulate the\n> > non-symmetric start/end quotes used in traditional typography (and in\n> > fact, ``foo'' in languages like asciidoc are typically rendered using\n> > smart-quotes).\n> \n> I definitely didn't know about the use of them in traditional typography!\n> But I couldn't find any example of non-symmetric quotes in AsciiDoc...\n\nGrep for \"``\" in Git's documentation directory, and you will see many\nexamples (asciidoc only accepts the double-quote form, not singles).\n\nYou can also try:\n\n  echo \"this is \\`\\`quoted'' text\" >foo.txt\n  asciidoc foo.txt\n\nand then open \"foo.html\" in your browser.\n\n> > I don't know how much we care about standardizing that punctuation.\n> \n> I mentioned it was very minor but, still, in my opinion a project like\n> Git deserves consistent punctuation! :)\n\nI think patches would be welcome, but as Junio said, it probably should\nwait for the next cycle.\n\n-Peff\n"},{"id":"311791","messageId":"CAOxYW4x93cjMJoXYzSXCwqYVEstSLLcxzad_BPdvxfasrkxapw@mail.gmail.com","threadId":"45149","inReplyTo":"20170215215633.deyxp76j7o3ceoq3@sigill.intra.peff.net","subject":"Re: Back quote typo in error messages (?)","fromName":"Fabrizio Cucci","fromEmail":"fabrizio.cucci@gmail.com","sentAt":"2017-02-16T18:41:26Z","receivedAt":"2017-02-16T18:41:39Z","isPatch":false,"sender":{"key":"fabrizio.cucci@gmail.com","avatar":null},"body":"On 15 February 2017 at 21:56, Jeff King <peff@peff.net> wrote:\n> Grep for \"``\" in Git's documentation directory, and you will see many\n> examples (asciidoc only accepts the double-quote form, not singles).\n>\n> You can also try:\n>\n>   echo \"this is \\`\\`quoted'' text\" >foo.txt\n>   asciidoc foo.txt\n>\n> and then open \"foo.html\" in your browser.\n\nWe are probably going a bit OT here :) but AFAIK there is no such\nthing as non-symmetric start/end quotes in AsciiDoc.\n\nEven enclosing something in curved quotes is done as follows:\n\n'`single curved quotes`'\n\n\"`double curved quotes`\"\n\n(http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/)\n\n> I think patches would be welcome, but as Junio said, it probably should\n> wait for the next cycle.\n\nIt can definitely wait and I would be glad to contribute!\n"},{"id":"311795","messageId":"20170216190200.h362e52uxqlkduar@sigill.intra.peff.net","threadId":"45149","inReplyTo":"CAOxYW4x93cjMJoXYzSXCwqYVEstSLLcxzad_BPdvxfasrkxapw@mail.gmail.com","subject":"Re: Back quote typo in error messages (?)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-02-16T19:02:00Z","receivedAt":"2017-02-16T19:02:08Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Feb 16, 2017 at 06:41:26PM +0000, Fabrizio Cucci wrote:\n\n> On 15 February 2017 at 21:56, Jeff King <peff@peff.net> wrote:\n> > Grep for \"``\" in Git's documentation directory, and you will see many\n> > examples (asciidoc only accepts the double-quote form, not singles).\n> >\n> > You can also try:\n> >\n> >   echo \"this is \\`\\`quoted'' text\" >foo.txt\n> >   asciidoc foo.txt\n> >\n> > and then open \"foo.html\" in your browser.\n> \n> We are probably going a bit OT here :) but AFAIK there is no such\n> thing as non-symmetric start/end quotes in AsciiDoc.\n> \n> Even enclosing something in curved quotes is done as follows:\n> \n> '`single curved quotes`'\n> \n> \"`double curved quotes`\"\n> \n> (http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/)\n\nTry the \"Quoted Text\" section of the original asciidoc user manual:\n\n  http://www.methods.co.nz/asciidoc/userguide.html#X51\n\nAsciidoctor has introduced some new syntax (almost certainly because the\noriginal asymmetric formulations have a bunch of ambiguous corner\ncases). By default, it disables the asymmetric versions, but they work\nin \"compat\" mode (and the newer ones do not).\n\nGit's documentation is all written for the original asciidoc. If you\nbuild it with asciidoctor, it must be done in compat mode. This is the\ndefault when asciidoctor sees a two-line (i.e., underlined) section\ntitle, which all of our manpages have.\n\nMore details at:\n\n  http://asciidoctor.org/docs/migration/#migration-cheatsheet\n\nYes, we are off-topic,. but I think it is worth clarifying Git's\nasciidoc compatibility expectations. :)\n\n-Peff\n"},{"id":"311804","messageId":"CAOxYW4xF7iJFtYq6RPXROVRciVR970FZUZXhxS-aPx46cq6hVw@mail.gmail.com","threadId":"45149","inReplyTo":"20170216190200.h362e52uxqlkduar@sigill.intra.peff.net","subject":"Re: Back quote typo in error messages (?)","fromName":"Fabrizio Cucci","fromEmail":"fabrizio.cucci@gmail.com","sentAt":"2017-02-16T20:58:59Z","receivedAt":"2017-02-16T20:59:20Z","isPatch":false,"sender":{"key":"fabrizio.cucci@gmail.com","avatar":null},"body":"On 16 February 2017 at 19:02, Jeff King <peff@peff.net> wrote:\n> Try the \"Quoted Text\" section of the original asciidoc user manual:\n>\n>   http://www.methods.co.nz/asciidoc/userguide.html#X51\n>\n> Asciidoctor has introduced some new syntax (almost certainly because the\n> original asymmetric formulations have a bunch of ambiguous corner\n> cases). By default, it disables the asymmetric versions, but they work\n> in \"compat\" mode (and the newer ones do not).\n\nI can't say I had the pleasure of using Asciidoctor 0.1.4 or earlier! :)\n\n> Git's documentation is all written for the original asciidoc. If you\n> build it with asciidoctor, it must be done in compat mode. This is the\n> default when asciidoctor sees a two-line (i.e., underlined) section\n> title, which all of our manpages have.\n\nAnd I definitely didn't know that, but now I'm glad we went OT! :)\nThanks a lot for the clarifications.\n"}]}