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

Re: git grep: search whole tree by default?

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Oct 23, 2013, 16:21 UTC
Message-ID
<vpqbo2guff7.fsf@anie.imag.fr>
In-Reply-To
<CAA01CsqgNKdDAc9OL9zdk=3tnK9GAG=6w+wP_XSoiefBOgfzRQ@mail.gmail.com>
Piotr Krukowiecki <piotr.krukowiecki@gmail.com> writes:
> I think there were discussion about how there are several git commands
> which do not search in whole tree by default and that it's going to be
> changed. I think "add" is one of such commands. Is 'grep' left
> unchanged?

In summary: changing is painful. The case of "git add" was really bad, since the same command had different behavior depending on the options given, so it was clearly worth the pain. In the case of "git grep", the current behavior is not _that_ bad, so nobody bothered to do the change.

(by "do the change", I mean propose a migration plan, convince people that it is good, ...)

I'd personally be slightly in favor of changing to tree-wide, but without strong opinion.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Piotr KrukowieckiNext: Junio C Hamano
Message 2 of 14 in “git grep: search whole tree by default?”
  1. Piotr KrukowieckiOct 23, 2013
  2. Matthieu MoyOct 23, 2013
  3. Junio C HamanoOct 23, 2013
  4. Jed BrownOct 23, 2013
  5. Junio C HamanoOct 23, 2013
  6. Jed BrownOct 23, 2013
  7. Junio C HamanoOct 23, 2013
  8. David AguilarOct 24, 2013
  9. Matthieu MoyOct 23, 2013
  10. Jeff KingOct 24, 2013
  11. Junio C HamanoOct 24, 2013
  12. David AguilarOct 25, 2013
  13. Jeff KingOct 25, 2013
  14. Duy NguyenOct 25, 2013

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.