Re: Back quote typo in error messages (?)
On 16 February 2017 at 19:02, Jeff Kingwrote: > Try the "Quoted Text" section of the original asciidoc user manual: > > http://www.methods.co.nz/asciidoc/userguide.html#X51 > > Asciidoctor has introduced some new syntax (almost certainly because the > original asymmetric formulations have a bunch of ambiguous corner > cases). By default, it disables the asymmetric versions, but they work > in "compat" mode (and the newer ones do not). I can't say I had the pleasure of using Asciidoctor 0.1.4 or earlier! :) > Git's documentation is all written for the original asciidoc. If you > build it with asciidoctor, it must be done in compat mode. This is the > default when asciidoctor sees a two-line (i.e., underlined) section > title, which all of our manpages have. And I definitely didn't know that, but now I'm glad we went OT! :) Thanks a lot for the clarifications.
Re: Back quote typo in error messages (?)
On Thu, Feb 16, 2017 at 06:41:26PM +, Fabrizio Cucci wrote: > On 15 February 2017 at 21:56, Jeff Kingwrote: > > Grep for "``" in Git's documentation directory, and you will see many > > examples (asciidoc only accepts the double-quote form, not singles). > > > > You can also try: > > > > echo "this is \`\`quoted'' text" >foo.txt > > asciidoc foo.txt > > > > and then open "foo.html" in your browser. > > We are probably going a bit OT here :) but AFAIK there is no such > thing as non-symmetric start/end quotes in AsciiDoc. > > Even enclosing something in curved quotes is done as follows: > > '`single curved quotes`' > > "`double curved quotes`" > > (http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/) Try the "Quoted Text" section of the original asciidoc user manual: http://www.methods.co.nz/asciidoc/userguide.html#X51 Asciidoctor has introduced some new syntax (almost certainly because the original asymmetric formulations have a bunch of ambiguous corner cases). By default, it disables the asymmetric versions, but they work in "compat" mode (and the newer ones do not). Git's documentation is all written for the original asciidoc. If you build it with asciidoctor, it must be done in compat mode. This is the default when asciidoctor sees a two-line (i.e., underlined) section title, which all of our manpages have. More details at: http://asciidoctor.org/docs/migration/#migration-cheatsheet Yes, we are off-topic,. but I think it is worth clarifying Git's asciidoc compatibility expectations. :) -Peff
Re: Back quote typo in error messages (?)
On 15 February 2017 at 21:56, Jeff Kingwrote: > Grep for "``" in Git's documentation directory, and you will see many > examples (asciidoc only accepts the double-quote form, not singles). > > You can also try: > > echo "this is \`\`quoted'' text" >foo.txt > asciidoc foo.txt > > and then open "foo.html" in your browser. We are probably going a bit OT here :) but AFAIK there is no such thing as non-symmetric start/end quotes in AsciiDoc. Even enclosing something in curved quotes is done as follows: '`single curved quotes`' "`double curved quotes`" (http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/) > I think patches would be welcome, but as Junio said, it probably should > wait for the next cycle. It can definitely wait and I would be glad to contribute!
Re: Back quote typo in error messages (?)
On Wed, Feb 15, 2017 at 09:51:30PM +, Fabrizio Cucci wrote: > > Some people use the matched backtick/single-quote to emulate the > > non-symmetric start/end quotes used in traditional typography (and in > > fact, ``foo'' in languages like asciidoc are typically rendered using > > smart-quotes). > > I definitely didn't know about the use of them in traditional typography! > But I couldn't find any example of non-symmetric quotes in AsciiDoc... Grep for "``" in Git's documentation directory, and you will see many examples (asciidoc only accepts the double-quote form, not singles). You can also try: echo "this is \`\`quoted'' text" >foo.txt asciidoc foo.txt and then open "foo.html" in your browser. > > I don't know how much we care about standardizing that punctuation. > > I mentioned it was very minor but, still, in my opinion a project like > Git deserves consistent punctuation! :) I think patches would be welcome, but as Junio said, it probably should wait for the next cycle. -Peff
Re: Back quote typo in error messages (?)
On 15 February 2017 at 21:21, Jeff Kingwrote: > On Wed, Feb 15, 2017 at 09:06:46PM +, Fabrizio Cucci wrote: >> Shouldn't the wrong flag be surrounded by two single quotes instead of >> a back quote and a single quote? > > Some people use the matched backtick/single-quote to emulate the > non-symmetric start/end quotes used in traditional typography (and in > fact, ``foo'' in languages like asciidoc are typically rendered using > smart-quotes). I definitely didn't know about the use of them in traditional typography! But I couldn't find any example of non-symmetric quotes in AsciiDoc... > So I think what you are seeing is not wrong in the sense of being > unintended by the author of the message. I had the opposite impression from the quick search in the GitHub repo, this is why I wrote here looking for some confirmation. > I don't know how much we care about standardizing that punctuation. I mentioned it was very minor but, still, in my opinion a project like Git deserves consistent punctuation! :)
Re: Back quote typo in error messages (?)
Jeff Kingwrites: > So I think what you are seeing is not wrong in the sense of being > unintended by the author of the message. But I do think that git mostly > uses matched double or single quotes in its error messages, and the > non-symmetric quotes are relatively rare. Running: > > git grep "\`.*'" -- '*.c' ':!compat' > > shows that there are only a few `quoted' cases in the code base (there > are 27 matches, but many of those are false positives, and some are in > comments). I did a simpler $ git grep "\`%s'" and saw "`git %s' is aliased to `%s'" from builtin/help.c and "unknown option `%s'" from parse-options.c (and revision.c) What Fabrizio saw is the one in parse-options.c, so even though the number of strings in the code is small, they appear everywhere. I agree that we should standardise them, and we should do so early in a cycle, because these appear also in .po files. It is too late for this cycle, obviously.
Re: Back quote typo in error messages (?)
On Wed, Feb 15, 2017 at 09:06:46PM +, Fabrizio Cucci wrote: > it's been a couple of days that I keep noticing something (very minor) > that my OCD for symmetric things can't really stand. > > If you run the following command: > > $ git branch --i-dont-exists > > you should get: > > error: unknown option `i-dont-exists' > > Shouldn't the wrong flag be surrounded by two single quotes instead of > a back quote and a single quote? Some people use the matched backtick/single-quote to emulate the non-symmetric start/end quotes used in traditional typography (and in fact, ``foo'' in languages like asciidoc are typically rendered using smart-quotes). So I think what you are seeing is not wrong in the sense of being unintended by the author of the message. But I do think that git mostly uses matched double or single quotes in its error messages, and the non-symmetric quotes are relatively rare. Running: git grep "\`.*'" -- '*.c' ':!compat' shows that there are only a few `quoted' cases in the code base (there are 27 matches, but many of those are false positives, and some are in comments). I don't know how much we care about standardizing that punctuation. If we do, I suspect there is also inconsistency between single-quotes and double-quotes ('foo' versus "foo", which I think is an American versus European thing; we seem to mostly use 'foo', though). -Peff
Back quote typo in error messages (?)
Hello everyone, it's been a couple of days that I keep noticing something (very minor) that my OCD for symmetric things can't really stand. If you run the following command: $ git branch --i-dont-exists you should get: error: unknown option `i-dont-exists' Shouldn't the wrong flag be surrounded by two single quotes instead of a back quote and a single quote? For the sake of completeness, I'm on Mac running Git 2.10.1. Thanks, Fabrizio