From: Jeff King Date: Fri, 14 Dec 2007 04:08:03 GMT Subject: Re: [RFH] convert shortlog to use parse_options Message-ID: <20071214040803.GA10169@sigill.intra.peff.net> In-Reply-To: <1197571656.28742.13.camel@hinata.boston.redhat.com> On Thu, Dec 13, 2007 at 01:47:36PM -0500, Kristian Høgsberg wrote: > Oops, sorry about that. I just wanted to say we shouldn't jump through > all these hoops to make the option parser support every type of option > there ever was in the git command line ui. A lot of these were probably > decided somewhat arbitrarily by whoever implemented the command. > Instead it's an opportunity to retroactively enforce some consistency > and predictability to the various option-styles that have been > hand-rolled over time in different git commands. I agree. I am already a little bit uncomfortable with the "--abbrev 10" won't work but "--foo 10" will, because it requires that the user remember which arguments are optional and which are required. But switching it to "--abbrev 10 works, but --abbrev $foo does not, unless of course $foo is an integer, in which case you must use --abbrev=$foo" is just a little bit too DWIM. E.g., if you are scripting, it's just one more source of error (if I have $foo, how must I write --abbrev $foo for it to ensure that I _don't_ trigger the optional argument?). -Peff