Re: [PATCH 9/10] Remove cmd_usage() routine and re-organize the help/usage code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Ramsay Jones" <ramsay@xxxxxxxxxxxxxxxxxxx> writes:

> Speaking of consistency, I noticed some inconsistent command
> names in various usage strings. I attach a patch (p0011.txt)
> for your consideration.

Thanks, all look good.

> During one of my "grep-fests", I also noticed some calls to
> die(usage_string) rather than usage(usage_string). Calling die()
> rather than usage() means that a "fatal: " (rather than "usage: ")
> prefix is output prior the usage string, and the exit code
> is 128 (rather than 129).
>
> It looks like to choice of die() was deliberate, particularly in
> builtin-rm.c and hash-object.c since they call both die() and
> usage(). However, It's not clear to me why this choice was made.
> (Which is not to say there isn't a perfectly good reason for the
> choice; it's just that I don't see it.)

I think these were all sloppy coding.  The fix you did with
p0012 look good -- all of them are complaining that the command
line parsing found something unexpected, so I think usage() is
more appropriate.

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]