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 wrote: > Duy Nguyen writes: > >> On Sat, Mar 8, 2014 at 2:20 AM, Junio C Hamano 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. >>

Re: Microproject idea: new OPT_* macros for PARSE_OPT_NONEG

2014-03-13 Thread Junio C Hamano
Duy Nguyen writes: > On Sat, Mar 8, 2014 at 2:20 AM, Junio C Hamano 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 bu

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 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 > OPT_NONEG? There a

Re: Microproject idea: new OPT_* macros for PARSE_OPT_NONEG

2014-03-07 Thread Junio C Hamano
Duy Nguyen 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 flexible. What does a

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 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 update all "struct

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

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 anywa