Re: [PATCH 2/5] revision.c: group ref selection options together

2017-01-26 Thread Jeff King
On Thu, Jan 26, 2017 at 04:18:06PM +0700, Duy Nguyen wrote: > > Hmm. I see what you're trying to do here, and abstract the repeated > > bits. But I'm not sure the line-count reflects a real simplification. > > Everything ends up converted to an enum, and then that enum just expands > > to similar

Re: [PATCH 2/5] revision.c: group ref selection options together

2017-01-26 Thread Duy Nguyen
On Thu, Jan 26, 2017 at 3:50 AM, Jeff King wrote: > On Wed, Jan 25, 2017 at 07:50:51PM +0700, Nguyễn Thái Ngọc Duy wrote: > >> These options have on thing in common: when specified right after >> --exclude, they will de-select refs instead of selecting them by >> default. >> >> This change makes i

Re: [PATCH 2/5] revision.c: group ref selection options together

2017-01-26 Thread Duy Nguyen
On Thu, Jan 26, 2017 at 4:11 AM, Junio C Hamano wrote: > * I am expecting that the new one yet to be introduced will not >share the huge "switch (selector)" part, but does its own things >in a separate function with a similar structure. The only thing >common between these two functi

Re: [PATCH 2/5] revision.c: group ref selection options together

2017-01-25 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > These options have on thing in common: when specified right after one thing. > --exclude, they will de-select refs instead of selecting them by > default. > > This change makes it possible to introduce new options that use these > options in the same way as --exc

Re: [PATCH 2/5] revision.c: group ref selection options together

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 07:50:51PM +0700, Nguyễn Thái Ngọc Duy wrote: > These options have on thing in common: when specified right after > --exclude, they will de-select refs instead of selecting them by > default. > > This change makes it possible to introduce new options that use these > optio