From: Junio C Hamano Date: Fri, 04 Aug 2006 04:33:13 GMT Subject: Re: [PATCH 9/10] Remove cmd_usage() routine and re-organize the help/usage code. Message-ID: <7vslkdnmra.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <000101c6b72a$51601a80$c47eedc1@ramsay1.demon.co.uk> "Ramsay Jones" 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.