Re: [PATCH v2 2/3] config: Introduce diff.algorithm variable

2013-01-15 Thread Junio C Hamano
Jeff King writes: >> Also it is rather unusual to parse the keyword values case insensitively. > > Is it? "git grep strcasecmp" shows that we already do so in many cases > (e.g., any bool option, core.autocrlf, receive.deny*, etc). Yeah, I did the same grep after I wrote the message. Thanks for

Re: [PATCH v2 2/3] config: Introduce diff.algorithm variable

2013-01-15 Thread Jeff King
On Mon, Jan 14, 2013 at 01:05:27PM -0800, Junio C Hamano wrote: > Michal Privoznik writes: > > > +static long parse_algorithm_value(const char *value) > > +{ > > + if (!value || !strcasecmp(value, "myers")) > > + return 0; > > [diff] > algorithm > > should probably error out.

Re: [PATCH v2 2/3] config: Introduce diff.algorithm variable

2013-01-14 Thread Junio C Hamano
Michal Privoznik writes: > +static long parse_algorithm_value(const char *value) > +{ > + if (!value || !strcasecmp(value, "myers")) > + return 0; [diff] algorithm should probably error out. Also it is rather unusual to parse the keyword values case insensitively. > +

[PATCH v2 2/3] config: Introduce diff.algorithm variable

2013-01-14 Thread Michal Privoznik
Some users or projects prefer different algorithms over others, e.g. patience over myers or similar. However, specifying appropriate argument every time diff is to be used is impractical. Moreover, creating an alias doesn't play nicely with other tools based on diff (git-show for instance). Hence,