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

From: Stephen Boyd <[email-masked]>
Date: Fri, 03 Dec 2010 09:53:42 -0800

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.