Re: Microproject idea: new OPT_* macros for PARSE_OPT_NONEG

2014-03-13 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Sat, Mar 8, 2014 at 2:20 AM, Junio C Hamano gits...@pobox.com wrote: Looking at git grep -B3 OPT_NONEG output, it seems that NONEG is associated mostly with OPTION_CALLBACK and OPTION_SET_INT in the existing code. Perhaps OPT_SET_INT should default to

Re: Microproject idea: new OPT_* macros for PARSE_OPT_NONEG

2014-03-13 Thread Duy Nguyen
On Fri, Mar 14, 2014 at 2:00 AM, Junio C Hamano gits...@pobox.com wrote: Duy Nguyen pclo...@gmail.com writes: On Sat, Mar 8, 2014 at 2:20 AM, Junio C Hamano gits...@pobox.com wrote: Looking at git grep -B3 OPT_NONEG output, it seems that NONEG is associated mostly with OPTION_CALLBACK and

Re: Microproject idea: new OPT_* macros for PARSE_OPT_NONEG

2014-03-12 Thread Duy Nguyen
On Sat, Mar 8, 2014 at 2:20 AM, Junio C Hamano gits...@pobox.com wrote: Looking at git grep -B3 OPT_NONEG output, it seems that NONEG is associated mostly with OPTION_CALLBACK and OPTION_SET_INT in the existing code. Perhaps OPT_SET_INT should default to not just OPT_NOARG but also

Re: Microproject idea: new OPT_* macros for PARSE_OPT_NONEG

2014-03-07 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: I don't know the scope of these microprojects, but yes I think it'll take a few hours for this. By the way, a bit more thought on the idea: instead of making OPT_BOOL_NONEG() that sets NONEG, we could make OPT_BOOL_FLAGS(..., NONEG), which is more

Microproject idea: new OPT_* macros for PARSE_OPT_NONEG

2014-03-06 Thread Duy Nguyen
Currently in order to avoid --[no]-xxx form we have to resort to declare full struct option. It'd be nice to have a set of OPT_* macros with PARSE_OPT_NONEG set. Find and update all struct option [] declarations with the new macros (including ones that should never accept --no- form, but do

Re: Microproject idea: new OPT_* macros for PARSE_OPT_NONEG

2014-03-06 Thread Michael Haggerty
On 03/07/2014 02:38 AM, Duy Nguyen wrote: Currently in order to avoid --[no]-xxx form we have to resort to declare full struct option. It'd be nice to have a set of OPT_* macros with PARSE_OPT_NONEG set. Find and update all struct option [] declarations with the new macros (including ones that

Re: Microproject idea: new OPT_* macros for PARSE_OPT_NONEG

2014-03-06 Thread Duy Nguyen
On Fri, Mar 7, 2014 at 2:39 PM, Michael Haggerty mhag...@alum.mit.edu wrote: On 03/07/2014 02:38 AM, Duy Nguyen wrote: Currently in order to avoid --[no]-xxx form we have to resort to declare full struct option. It'd be nice to have a set of OPT_* macros with PARSE_OPT_NONEG set. Find and