Re: Convention for help in git commands?

From: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Date: 2005-10-26 07:35:47
On Tuesday 25 October 2005 22:24, you wrote:
> On 10/26/05, Junio C Hamano <junkio@cox.net> wrote:
> > > * 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.
> 
> This could lead to subtle bugs when git is used by porcelains. If
> there are going to be changes in default behaviours, let's have them
> soon-ish ;-)

What is the difference for a porcelain between error out,
presumable with an error message, and printing the usage alone?

Is there any dependency of porcelains to the fact the e.g.
"git-rev-list" currently does nothing if not called with a
commit-id? Somehow I think "git-rev-list" should give an error,
as the usage string (with lots of options on a line of its own ?!)
requires a commit-id as argument.

BTW, the error message of "mv" is:
===
mv: missing file operand
Try `mv --help' for more information.
===
What about something similar to this? Mentioning the command
which triggered the error is probably a good idea.

And I would add as another convention:
* "git-cmd -h" always should give the usage, and not error out
with "fatal: Not a git repository" before.

Josef
-
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 07:36:20 2005

This archive was generated by hypermail 2.1.8 : 2005-10-26 07:36:24 EST