Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC/PATCH 0/4] update-index: migrate to parse-options API

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:54

Jonathan Nieder [off-list ref] writes:
Jonathan Nieder wrote:
quoted
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 <range>
and an optional <path> (not <pathspec>) as arguments.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help