Re: feature request: excluding files/paths from git grep

2015-03-04 Thread Junio C Hamano
Noel Grandin n...@peralex.com writes: On 2015-03-02 02:50 PM, Trevor Saunders wrote: I think they solve somewhat different problems, but maybe my problem is so specialized I should just have a wrapper around grep that changes defaults. Trev I'm with Trevor on this one. While I see the

Re: feature request: excluding files/paths from git grep

2015-03-04 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Wed, Mar 04, 2015 at 12:56:10PM -0800, Junio C Hamano wrote: As in, while working on a specific project, I sometimes just want to exclude, for the time being, a bunch of stuff from 'git grep'. The key word here is for the time being, though. What would

Re: feature request: excluding files/paths from git grep

2015-03-04 Thread Jeff King
On Wed, Mar 04, 2015 at 12:56:10PM -0800, Junio C Hamano wrote: As in, while working on a specific project, I sometimes just want to exclude, for the time being, a bunch of stuff from 'git grep'. The key word here is for the time being, though. What would you do once you are done with

Re: feature request: excluding files/paths from git grep

2015-03-04 Thread Noel Grandin
On 2015-03-02 02:50 PM, Trevor Saunders wrote: I think they solve somewhat different problems, but maybe my problem is so specialized I should just have a wrapper around grep that changes defaults. Trev I'm with Trevor on this one. While I see the appeal of the generality of a macro solution,

Re: feature request: excluding files/paths from git grep

2015-03-02 Thread Trevor Saunders
On Sun, Mar 01, 2015 at 03:22:11PM -0800, Junio C Hamano wrote: Trevor Saunders tbsau...@tbsaunde.org writes: ... For these per-invocation differences, attributes to declare permenent/inherent nature of the contents is much less suited than per-invocation inclusion/exclusion mechanism

Re: feature request: excluding files/paths from git grep

2015-03-01 Thread Junio C Hamano
Trevor Saunders tbsau...@tbsaunde.org writes: ... For these per-invocation differences, attributes to declare permenent/inherent nature of the contents is much less suited than per-invocation inclusion/exclusion mechanism based on pathspecs, I would think. I think that makes some amount of

Re: feature request: excluding files/paths from git grep

2015-03-01 Thread Trevor Saunders
On Sat, Feb 28, 2015 at 07:06:16PM -0800, Junio C Hamano wrote: Trevor Saunders tbsau...@tbsaunde.org writes: There have been cases where I wanted grep to always ignore certain files, but to still get text diffs for those files. One case is people insist on using ChangeLog files, and

Re: feature request: excluding files/paths from git grep

2015-02-28 Thread Junio C Hamano
Trevor Saunders tbsau...@tbsaunde.org writes: There have been cases where I wanted grep to always ignore certain files, but to still get text diffs for those files. One case is people insist on using ChangeLog files, and another is people who commit generated files of one sort or

Re: feature request: excluding files/paths from git grep

2015-02-27 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 26.02.2015 21:59: Michael J Gruber g...@drmicha.warpmail.net writes: So, as a summary of the discussion, it seems it's time to switch the default to --textconv for git grep? Hmmm, why? Nobody seems to be asking for such a change in this thread. The

Re: feature request: excluding files/paths from git grep

2015-02-27 Thread Junio C Hamano
Michael J Gruber g...@drmicha.warpmail.net writes: Junio C Hamano venit, vidit, dixit 26.02.2015 21:59: So that does not sound to me a summary of the discussion at all. Well, your conditional I do not recall its conclusion, but it it were Yes, that is what it means, then it might be

Re: feature request: excluding files/paths from git grep

2015-02-27 Thread Trevor Saunders
On Wed, Feb 25, 2015 at 02:11:08PM -0500, Jeff King wrote: On Wed, Feb 25, 2015 at 11:01:22AM -0800, Junio C Hamano wrote: Jeff King p...@peff.net writes: So I think _if_ using diff attributes is enough for this purpose, then there is no code to be written. But if somebody wants to

Re: feature request: excluding files/paths from git grep

2015-02-26 Thread Michael J Gruber
Jeff King venit, vidit, dixit 25.02.2015 20:11: On Wed, Feb 25, 2015 at 11:01:22AM -0800, Junio C Hamano wrote: Jeff King p...@peff.net writes: So I think _if_ using diff attributes is enough for this purpose, then there is no code to be written. But if somebody wants to draw a

feature request: excluding files/paths from git grep

2015-02-25 Thread Noel Grandin
Hi In our repo (LibreOffice) we have various test files which tend to show up on 'grit grep', which just generate noise because (a) they have lots of common keywords that one might search for in them and (b) they have very little in the way of linebreaks So they tend to generate a lot of noise

Re: feature request: excluding files/paths from git grep

2015-02-25 Thread Jeff King
On Wed, Feb 25, 2015 at 08:46:37PM +0700, Duy Nguyen wrote: On Wed, Feb 25, 2015 at 7:23 PM, Noel Grandin n...@peralex.com wrote: What would be nice is a per-user/repo config setting that excludes certain files and paths from the 'git grep' search. Does this sound reasonable/acceptable?

Re: feature request: excluding files/paths from git grep

2015-02-25 Thread Duy Nguyen
On Wed, Feb 25, 2015 at 7:23 PM, Noel Grandin n...@peralex.com wrote: What would be nice is a per-user/repo config setting that excludes certain files and paths from the 'git grep' search. Does this sound reasonable/acceptable? There is no config setting to do that, but since v1.9.5 you can

Re: feature request: excluding files/paths from git grep

2015-02-25 Thread Jeff King
On Wed, Feb 25, 2015 at 10:33:53AM -0800, Junio C Hamano wrote: Jeff King p...@peff.net writes: If it's an attribute of the file, and not the request, maybe gitattributes would be a better fit. You can already do this with: *.foo -diff in your .gitattributes file, though that

Re: feature request: excluding files/paths from git grep

2015-02-25 Thread Junio C Hamano
Jeff King p...@peff.net writes: If it's an attribute of the file, and not the request, maybe gitattributes would be a better fit. You can already do this with: *.foo -diff in your .gitattributes file, though that _also_ marks the files as not for diffing, which may not be desired.

Re: feature request: excluding files/paths from git grep

2015-02-25 Thread Junio C Hamano
Jeff King p...@peff.net writes: So I think _if_ using diff attributes is enough for this purpose, then there is no code to be written. But if somebody wants to draw a distinction between the uses (I want to diff foo files, but never see them in grep) then we could introduce a grep attribute

Re: feature request: excluding files/paths from git grep

2015-02-25 Thread Jeff King
On Wed, Feb 25, 2015 at 11:01:22AM -0800, Junio C Hamano wrote: Jeff King p...@peff.net writes: So I think _if_ using diff attributes is enough for this purpose, then there is no code to be written. But if somebody wants to draw a distinction between the uses (I want to diff foo files,