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

Re: [RFC PATCH 3/3] grep: add support for grepping in submodules

From
Jens Lehmann <jens.lehmann@web.de>
Date
Sep 30, 2010, 19:48 UTC
Message-ID
<4CA4E980.1010100@web.de>
In-Reply-To
<20100930185937.GA15457@book.hvoigt.net>
Am 30.09.2010 20:59, schrieb Heiko Voigt:
> How about dropping the option all together and making grep search all
> populated submodules by default and maybe have an option to turn it off.
And that option might be called "--no-recursive"? :-)

But when we add an config setting to control the default behavior later (which we had to do for all submodule recursion features so far where we changed the default to recursion) we'll need the "--recursive" option again anyway to be able to override the config setting. So I vote for just leaving the option as it is for now, and we can discuss the proper default as we go along (And in case of grep I have not made up my mind as to what a sane default would be, personally I'm fine with having to use the "--recursive" option when I want recursion, but I won't object to making it the default either).

> Since git grep is searching recursive by default this would be what I
> would expect as a user. Are there other reasons to turn off the search
> in submodules than the potential runtime penalty because of forks? 

The runtime penalty is a *very* important aspect, as we have some submodule users who have put huge trees into submodules especially to avoid the performance penalties (see the discussions for recursive diff and status). So if we change the default, we will have to provide an config option for that.

Previous: Heiko Voigt
Message 22 of 22 in “grep: submodule support”
  1. 0/3 grep: submodule supportChris Packham, Sep 29, 2010
  2. 1/3 add test for git grep --recursiveChris Packham, Sep 29, 2010
  3. Ævar Arnfjörð BjarmasonSep 29, 2010
  4. Chris PackhamSep 29, 2010
  5. Kevin BallardSep 29, 2010
  6. 2/3 grep: prepare grep for submodulesChris Packham, Sep 29, 2010
  7. Nguyen Thai Ngoc DuySep 30, 2010
  8. Chris PackhamSep 30, 2010
  9. Nguyen Thai Ngoc DuyOct 1, 2010
  10. Chris PackhamOct 1, 2010
  11. 3/3 grep: add support for grepping in submodulesChris Packham, Sep 29, 2010
  12. Jens LehmannSep 29, 2010
  13. Junio C HamanoSep 29, 2010
  14. Chris PackhamSep 29, 2010
  15. Jens LehmannSep 30, 2010
  16. Johannes SixtSep 30, 2010
  17. Jens LehmannSep 30, 2010
  18. Chris PackhamSep 29, 2010
  19. Jens LehmannSep 30, 2010
  20. Chris PackhamSep 30, 2010
  21. Heiko VoigtSep 30, 2010
  22. Jens LehmannSep 30, 2010

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.