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

2014-05-15 Thread Junio C Hamano
t;, 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. That is all true, and I didn't test on Windows, but it seems that the feature is very old in the upstream that we can rely on, so let's

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 typ

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

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 "

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

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 fe

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 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 wi

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-reg

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

2014-05-14 Thread Junio C Hamano
Jonathan Nieder 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 c

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 Jonathan Nieder
Hi, Junio C Hamano wrote: > Stepan Kasal 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 Matthieu Moy
Junio C Hamano writes: > Stepan Kasal writes: > >> From: Johannes Schindelin >> Date: Tue, 8 Feb 2011 00:17:24 -0600 >> >> Signed-off-by: Johannes Schindelin >> Signed-off-by: Stepan Kasal >> --- >> Hi, >> this patch has been in msysgit for 3 1/4 years. >> Stepan >> >> builtin/grep.c | 3 +

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

2014-05-14 Thread Junio C Hamano
Stepan Kasal writes: > From: Johannes Schindelin > Date: Tue, 8 Feb 2011 00:17:24 -0600 > > Signed-off-by: Johannes Schindelin > Signed-off-by: Stepan Kasal > --- > Hi, > this patch has been in msysgit for 3 1/4 years. > Stepan > > builtin/grep.c | 3 +++ > 1 file changed, 3 insertions(+) >

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

2014-05-14 Thread Stepan Kasal
From: Johannes Schindelin Date: Tue, 8 Feb 2011 00:17:24 -0600 Signed-off-by: Johannes Schindelin Signed-off-by: Stepan Kasal --- Hi, this patch has been in msysgit for 3 1/4 years. Stepan builtin/grep.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/grep.c b/builtin/grep.c