Re: Convention for help in git commands?

From: Junio C Hamano <junkio@cox.net>
Date: 2005-10-26 04:56:34
Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes:

> * 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.

It drives me nuts when an error message shows only basename not
full path and I find out that I was running a wrong executable
much later after wasting a lot of time trying to debug it.  But
I think "usage: " saying the basename only is user friendly and
a good convention.

> * For commands which need at least one argument, the usage
> is also printed, if the command is run without argument

This is slightly debatable.  I'd rather see it error out for one
thing, and we might want to do a sane default given no arguments
later.

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

Probably.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Oct 26 04:57:08 2005

This archive was generated by hypermail 2.1.8 : 2005-10-26 04:57:12 EST