git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 4, 2015, 20:56 UTC
Message-ID
<xmqq385k8ot1.fsf@gitster.dls.corp.google.com>
In-Reply-To
<54F6EB96.6080500@peralex.com>
Noel Grandin <noel@peralex.com> writes:
Show 11 quoted lines
> 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, this is really just about convenience for me on a
> per-project basis.
>
> 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 the "for the time being" activity? "git config --unset"?

If you forget to do so when the "for the time being" activity ends, and then you try to run 'git grep' and see that you did not get expected hits from hierarchies that you set to exclude earlier, you either (1) get misled to a wrong decison based on that false non-hit, or (2) start scratching your head, wasting time trying to figure out why 'git grep' is not hitting, no?

I expect the answer might be "No, I won't forget; I am very well organized and you do not have to worry for me". But a feature is an invitation for people other than yourself, so...

Previous: Noel GrandinNext: Jeff King
Message 19 of 21 in “feature request: excluding files/paths from "git grep"”
  1. Noel GrandinFeb 25, 2015
  2. Duy NguyenFeb 25, 2015
  3. Jeff KingFeb 25, 2015
  4. Junio C HamanoFeb 25, 2015
  5. Jeff KingFeb 25, 2015
  6. Junio C HamanoFeb 25, 2015
  7. Jeff KingFeb 25, 2015
  8. Michael J GruberFeb 26, 2015
  9. Duy NguyenFeb 26, 2015
  10. Junio C HamanoFeb 26, 2015
  11. Michael J GruberFeb 27, 2015
  12. Junio C HamanoFeb 27, 2015
  13. Trevor SaundersFeb 27, 2015
  14. Junio C HamanoMar 1, 2015
  15. Trevor SaundersMar 1, 2015
  16. Junio C HamanoMar 1, 2015
  17. Trevor SaundersMar 2, 2015
  18. Noel GrandinMar 4, 2015
  19. Junio C HamanoMar 4, 2015
  20. Jeff KingMar 5, 2015
  21. Junio C HamanoMar 5, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.