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

Re: git-grep in sparse checkout

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 2, 2019, 06:18 UTC
Message-ID
<xmqq36gbfz62.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<f3101c8f-9709-5bcb-35f0-39ffaf8aa809@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
> Is that the expected behavior? In a sparse-checkout, wouldn't you _want_
> Git to report things outside the cone?

That should be optional, I would think. When you declare "by default, this the subset of the project I am interested in", we should honor it, I would think.

> At minimum, I would expect a new option to have "git grep" go back to
> the old behavior, so users who really want a tree-wide search can have
> one.

Yeah, a bugfix to honor SKIP_WORKTREE bit, followed by a new feature to ignore it, would be pretty sensible way to go.

Previous: Matheus Tavares BernardinoNext: Derrick Stolee
Message 8 of 9 in “git-grep in sparse checkout”
  1. Matheus Tavares BernardinoOct 1, 2019
  2. Bert WesargOct 1, 2019
  3. Elijah NewrenOct 1, 2019
  4. Junio C HamanoOct 2, 2019
  5. Elijah NewrenOct 2, 2019
  6. Derrick StoleeOct 1, 2019
  7. Matheus Tavares BernardinoOct 2, 2019
  8. Junio C HamanoOct 2, 2019
  9. Derrick StoleeOct 2, 2019

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.