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

Re: [RFC][PATCH] Print the usage string on stdout instead of stderr.

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
May 17, 2010, 13:30 UTC
Message-ID
<4BF14500.30806@drmicha.warpmail.net>
In-Reply-To
<buofx1qhgum.fsf@dhlpc061.dev.necel.com>
Miles Bader venit, vidit, dixit 17.05.2010 14:07:
Show 8 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> writes:
>> Now, usage messages are displayed on specific request (-h) as well as
>> when a command is used with wrong arguments. So the classification
>> depends on the use case! But I reckon that even with '-h', usage strings
>> are not exactly "regular output", so stderr looks more natural to me.
> 
> Usage info specifically requested by the user is not error output, it is
> the output of the command.  It should be output to stdout, not stderr.

Well sure it is, just as I wrote. So do you suggest that the file handle should depend on the use case? Care to implement?

> [Note that for GNU progs, this behavior is explicitly required by the
> GNU coding standards, and I think it's a pretty reasonable rule.]
Fortunately, Git is not GNU software.
Michael
Previous: Miles BaderNext: Miles Bader
Message 4 of 14 in “Print the usage string on stdout instead of stderr.”
  1. Giuseppe ScrivanoMay 17, 2010
  2. Michael J GruberMay 17, 2010
  3. Miles BaderMay 17, 2010
  4. Michael J GruberMay 17, 2010
  5. Miles BaderMay 17, 2010
  6. Giuseppe ScrivanoMay 17, 2010
  7. Tay Ray ChuanMay 17, 2010
  8. Giuseppe ScrivanoMay 17, 2010
  9. Michael J GruberMay 17, 2010
  10. Giuseppe ScrivanoMay 17, 2010
  11. Michael J GruberMay 18, 2010
  12. Giuseppe ScrivanoMay 24, 2010
  13. Michael J GruberMay 25, 2010
  14. Print the usage string on stdout instead of stderr.Giuseppe Scrivano, May 25, 2010

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.