Thread (21 messages) flat view 21 messages, 3 authors, 2016-06-15

Re: [PATCH 06/10] parse-options: never suppress arghelp if LITERAL_ARGHELP is set

From: Stephen Boyd <hidden>
Date: 2016-06-15 22:50:10

On 12/03/10 01:40, Jonathan Nieder wrote:
Just to clarify: the NOARG was not meant to affect the usage message
but the actual accepted usage.  The idea was that

	git update-index --cacheinfo=100644 87a8767c87b file.c

should be rejected, because if it is accepted that would tempt people
to try

	git update-index --cacheinfo=100644 -q 87a8767c87b file.c

which fails.  That is, the argument to --cacheinfo is not <mode>,
since --cacheinfo takes _three_ arguments and therefore the sticked
form sends a wrong message.
Sorry, I don't quite understand why we should reject the sticked form
when we don't advertise its usage anywhere (man pages or usageh). Maybe
I'm just not thinking right since I'm' optimistic people won't do that
-q thing.

But if you really want to do it we don't really need to add a new flag
right? We can just die in the cacheinfo callback if the context's opt
pointer is set. If this ever becomes a common thing we can add the flag
later. Putting a comment like "if only we had PARSE_OPT_NOSTICKED..."
would be fine too.

I'll be fine with or without the flag though.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help