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

Re: [PATCH] grep: provide a noop --recursive option

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 5, 2018, 08:19 UTC
Message-ID
<xmqqftxkztzb.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAGZ79kbw96x2Dow7d-sUfOHXiVN8j9KgqEObo+TrVd5zWKbaEA@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
> git-grep is always file/tree recursive, but there is --recurse-submodules
> which is off by default. Instead of providing a short alias to a noop,
> we could use -r for submodules. (And if you happen to have no
> submodules, this is a noop for you)

I am not sure if it is an overall win for those who do have and use submodules to easily be able to go recursive with a short-and-sweet 'r', or even they want to work inside one project at a time most of the time. If the latter, then using 'r' for recurse-submodules is going to be a mistake (besides, other commands that have 'recursive' typically use 'r' for its shorthand,and 'r' does not stand for 'recurse-submodules' for them).

Previous: Christoph BergNext: Mischa POSLAWSKY
Message 13 of 15 in “wishlist: git grep -r”
  1. Christoph BergSep 29, 2018
  2. grep: provide a noop --recursive optionÆvar Arnfjörð Bjarmason, Sep 29, 2018
  3. Duy NguyenSep 29, 2018
  4. Ævar Arnfjörð BjarmasonSep 29, 2018
  5. Duy NguyenSep 29, 2018
  6. Junio C HamanoSep 29, 2018
  7. Christoph BergSep 29, 2018
  8. René ScharfeOct 1, 2018
  9. Junio C HamanoOct 5, 2018
  10. Ævar Arnfjörð BjarmasonOct 5, 2018
  11. Stefan BellerOct 1, 2018
  12. Christoph BergOct 5, 2018
  13. Junio C HamanoOct 5, 2018
  14. Mischa POSLAWSKYOct 5, 2018
  15. Stefan BellerOct 5, 2018

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.