git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Back quote typo in error messages (?)

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 15, 2017, 21:31 UTC
Message-ID
<xmqqr32z2l9u.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170215212157.qgscyglgzrd5cplf@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> 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.

Previous: Jeff KingNext: Fabrizio Cucci
Message 3 of 8 in “Back quote typo in error messages (?)”
  1. Fabrizio CucciFeb 15, 2017
  2. Jeff KingFeb 15, 2017
  3. Junio C HamanoFeb 15, 2017
  4. Fabrizio CucciFeb 15, 2017
  5. Jeff KingFeb 15, 2017
  6. Fabrizio CucciFeb 16, 2017
  7. Jeff KingFeb 16, 2017
  8. Fabrizio CucciFeb 16, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.