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

Re: [WARNING] Proposed future changes that are backward incompatible

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 27, 2009, 19:59 UTC
Message-ID
<7v3adzk5wb.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090227192708.6266.qmail@science.horizon.com>
"George Spelvin" <linux@horizon.com> writes:
Show 8 quoted lines
> There's one more change that was suggested that I'd like to propose:
> - Make "git grep" search the whole repository by default; include an
>   explicit "." path limiter to search only the current directory.
>
> In addition to being more consistent with other commands like "git log",
> this saves a lot of typing working in drivers/net/usb/ if the identifier
> you're looking for is in include/.  Typing the additional space-dot
> is pretty trivial if you want the current directory only.

I do not remember it was ever suggested, let alone coming to anything near consensus.

The only way you could justify such a default change is to say:
    Almost all the time, everybody wants to use this new behaviour; the
    old behaviour is almost never useful in any situation other than a
    narrow corner case; and if somebody wants to do such a useless thing
    in a corner case, he can always add " ." at the end, so nothing is
    lost.

I do not think that is true for the change you are proposing here. 'He can always add " ." at the end' alone is not a good enough justification.

I however think your use case deserves to be supported, and I would not mind at all accepting a new "--full-tree" (or some shorter synonym) option if the patch is cleanly done (hint, hint).

I'd rather not add this to "future changes that are backward incompatible" list. It may be a useful new feature, but that is not what the topic of this thread is about.

Previous: Pascal ObryNext: George Spelvin
Message 6 of 9 in “Re: [WARNING] Proposed future changes that are backward incompatible”
  1. George SpelvinFeb 27, 2009
  2. Nicolas PitreFeb 27, 2009
  3. Sverre RabbelierFeb 27, 2009
  4. Johannes SchindelinFeb 27, 2009
  5. Pascal ObryFeb 27, 2009
  6. Junio C HamanoFeb 27, 2009
  7. George SpelvinFeb 27, 2009
  8. Junio C HamanoFeb 27, 2009
  9. Markus HeidelbergFeb 28, 2009

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.