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

Re: Patch that modifies git usage message

From
Eric Sunshine <sunshine@sunshineco.com>
Date
May 1, 2015, 17:40 UTC
Message-ID
<CAPig+cROY5ZaXtAWpaMpe8JsuG1eSp2jhAsSh1dAsCSACgoFxw@mail.gmail.com>
In-Reply-To
<CAKB+oNtKi6e7H9U75WEJDKH2KK349JT+vGE8+acHvM6SasCWfQ@mail.gmail.com>
(Etiquette on this list is to reply inline rather than top-posting[1].)
On Fri, May 1, 2015 at 12:38 PM, Alangi Derick <alangiderick@gmail.com> wrote:
Show 5 quoted lines
> What about the other strings used for
> error display? For example
> die("cannot handle %s as a builtin", cmd);
> Can't i change the "cannot" to "Cannot"? Or is there a problem with
> that one too?

Despite inconsistencies in existing code, lowercase in new error messages is intentional. Documentation/CodingGuidelines has this to say[2]:

    Error Messages
    - Do not capitalize ("unable to open %s", not "Unable to
      open %s")

Therefore, a goal more aligned with this recommendation would be to submit a patch which changes capitalized error messages to lowercase, however, heed this warning[3] from CodingGuidelines:

   - Fixing style violations while working on a real change as a
     preparatory clean-up step is good, but otherwise avoid useless
     code churn for the sake of conforming to the style.
     "Once it _is_ in the tree, it's not really worth the patch noise
     to go and fix it up."
     Cf. http://article.gmane.org/gmane.linux.kernel/943020

Sometimes there are exceptions. One may be able to argue that making user-facing messages more consistent is worthwhile (for instance [4]).

Finally, changing "usage:" to "Usage:" would undo recent work to improve consistency of usage messages[4].

[1]: https://lkml.org/lkml/2005/1/11/111 [2]: https://github.com/git/git/blob/master/Documentation/CodingGuidelines#L416 [3]: https://github.com/git/git/blob/master/Documentation/CodingGuidelines#L21 [4]: http://thread.gmane.org/gmane.comp.version-control.git/216961

Previous: Stefan BellerNext: Alangi Derick
Message 7 of 10 in “Patch that modifies git usage message”
  1. Alangi DerickMay 1, 2015
  2. Stefan BellerMay 1, 2015
  3. Alangi DerickMay 1, 2015
  4. Junio C HamanoMay 1, 2015
  5. Alangi DerickMay 1, 2015
  6. Stefan BellerMay 1, 2015
  7. Eric SunshineMay 1, 2015
  8. Alangi DerickMay 1, 2015
  9. Eric SunshineMay 1, 2015
  10. Stefan BellerMay 1, 2015

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.