Re: Back quote typo in error messages (?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 15, 2017 at 09:06:46PM +0000, 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]