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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]