Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-15 Thread Johannes Schindelin
Hi Junio, On Wed, 14 May 2014, Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: + if (opt.ignore_case !strcmp(less, pager)) + string_list_append(path_list, -i); I have a feeling that this goes against the recent trend of not mucking with the

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-15 Thread Johannes Schindelin
Hi Peff, On Wed, 14 May 2014, Jeff King wrote: On Wed, May 14, 2014 at 11:26:54AM -0700, Jonathan Nieder wrote: git grep has other options that affect interpretation of the pattern which this patch does not help with: * -v / --ignore-match: probably should disable this feature of

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-15 Thread Jonathan Nieder
Hi, Johannes Schindelin wrote: On Wed, 14 May 2014, Junio C Hamano wrote: Spot on. The change, especially with -I, makes sense. Except that it was not tested with -I. If you change it that way and it stops working on Windows, it's useless to me. Are you saying that less on Windows doesn't

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-15 Thread Jonathan Nieder
Johannes Schindelin wrote: On Wed, 14 May 2014, Jeff King wrote: We've already found the lines of interest to the user. It would be nice if we could somehow point the pager at them by number, rather than repeating the (slightly incompatible) search. FWIW it is exactly that type of I want

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-15 Thread Johannes Schindelin
Hi, On Thu, 15 May 2014, Jonathan Nieder wrote: Johannes Schindelin wrote: On Wed, 14 May 2014, Junio C Hamano wrote: Spot on. The change, especially with -I, makes sense. Except that it was not tested with -I. If you change it that way and it stops working on Windows, it's useless

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-15 Thread Jeff King
On Thu, May 15, 2014 at 07:46:49PM +0200, Johannes Schindelin wrote: We've already found the lines of interest to the user. It would be nice if we could somehow point the pager at them by number, rather than repeating the (slightly incompatible) search. FWIW it is exactly that type of I

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-15 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: Jonathan Nieder jrnie...@gmail.com writes: +if (opt.ignore_case !strcmp(less, pager)) +string_list_append(path_list, -i); I have a feeling that this goes against the recent trend of not

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-14 Thread Junio C Hamano
Stepan Kasal ka...@ucw.cz writes: From: Johannes Schindelin johannes.schinde...@gmx.de Date: Tue, 8 Feb 2011 00:17:24 -0600 Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de Signed-off-by: Stepan Kasal ka...@ucw.cz --- Hi, this patch has been in msysgit for 3 1/4 years.

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-14 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Stepan Kasal ka...@ucw.cz writes: From: Johannes Schindelin johannes.schinde...@gmx.de Date: Tue, 8 Feb 2011 00:17:24 -0600 Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de Signed-off-by: Stepan Kasal ka...@ucw.cz --- Hi, this patch

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-14 Thread Jonathan Nieder
Hi, Junio C Hamano wrote: Stepan Kasal ka...@ucw.cz writes: --- a/builtin/grep.c +++ b/builtin/grep.c @@ -897,6 +897,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix) if (len 4 is_dir_sep(pager[len - 5])) pager += len - 4; +

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-14 Thread Stepan Kasal
Hello, On Wed, May 14, 2014 at 11:26:54AM -0700, Jonathan Nieder wrote: But as is, it's an improvement, so (except that -i should be replaced by -I) it seems like a good change. indeed, -I would match the semantics of git-grep -i . Stepan -- To unsubscribe from this list: send the line

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-14 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: + if (opt.ignore_case !strcmp(less, pager)) + string_list_append(path_list, -i); I have a feeling that this goes against the recent trend of not mucking with the expectation of the users on their pagers, if I recall

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-14 Thread Jeff King
On Wed, May 14, 2014 at 11:26:54AM -0700, Jonathan Nieder wrote: git grep has other options that affect interpretation of the pattern which this patch does not help with: * -v / --ignore-match: probably should disable this feature of -O. * -E / --extended-regexp * -P / --perl-regexp *