Git development
 help / color / mirror / Atom feed
* Convention for help in git commands?
@ 2005-10-25 13:08 Josef Weidendorfer
  2005-10-25 18:56 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Josef Weidendorfer @ 2005-10-25 13:08 UTC (permalink / raw)
  To: git

Hi,

is there a commonly accepted way how to handle help messages
in git commands? In git-mv/git-rename, there is a full help
message with description of options when "-h" is given.
This seems to be the Cogito way; git commands seem to be used
to output an one-liner usage only, and rely on the man
page otherwise.

This should be more consistent. Proposal:
* All git commands should react on command line option "-h"
for help, dumping a few lines to stderr, prefixed by "usage:", giving
the command usage without further descriptions. For the usage
output, use the base name of the command, and not the absolute
path to the binary.
* For commands which need at least one argument, the usage
is also printed, if the command is run without argument
* On a error condition, prefix the message with "error:", and
do not print out anything else (like the usage line, or things
produced by the PERL "die", which appends "at scriptname line nn").

Perhaps these things should be done only for commands of the
git lightwight porcelain?

Josef

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-10-25 22:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-25 13:08 Convention for help in git commands? Josef Weidendorfer
2005-10-25 18:56 ` Junio C Hamano
2005-10-25 20:24   ` Martin Langhoff
2005-10-25 21:35     ` Josef Weidendorfer
2005-10-25 22:07       ` Martin Langhoff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox