From: Junio C Hamano Date: Wed, 27 Oct 2010 04:19:08 GMT Subject: Re: [RFC/PATCH 0/4] update-index: migrate to parse-options API Message-ID: <7vfwvse08z.fsf@alter.siamese.dyndns.org> In-Reply-To: <20101024081316.GA29630@burratino> Jonathan Nieder writes: > Jonathan Nieder wrote: > >> Here's a helper to make it easier for commands that use parse-options >> to adopt that nicer behavior. It writes its output to stdout, so it >> should only be used to be used to handle the -h option. > > Alas, "git update-index" does not use parse-options yet. But that > is easily enough changed... > > Patch 1 introduces an OPTION_LOWLEVEL_CALLBACK backdoor to > parse-options, so new option types (like the three-argument type > used by update-index --cacheinfo) can be supported without tempting > inventors of other commands through mention in the public API. I like the idea of this one. I imagine it can also be used to finally whip the command line parsing of "log -L" series Thomas mentored into a reasonable shape, which needs to parse the -L option that takes and an optional (not ) as arguments.