Git development
 help / color / mirror / Atom feed
From: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
To: git@vger.kernel.org
Subject: Convention for help in git commands?
Date: Tue, 25 Oct 2005 15:08:43 +0200	[thread overview]
Message-ID: <200510251508.43552.Josef.Weidendorfer@gmx.de> (raw)

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

             reply	other threads:[~2005-10-25 13:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-25 13:08 Josef Weidendorfer [this message]
2005-10-25 18:56 ` Convention for help in git commands? Junio C Hamano
2005-10-25 20:24   ` Martin Langhoff
2005-10-25 21:35     ` Josef Weidendorfer
2005-10-25 22:07       ` Martin Langhoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200510251508.43552.Josef.Weidendorfer@gmx.de \
    --to=josef.weidendorfer@gmx.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox