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

Re: git-grep in sparse checkout

From
Derrick Stolee <stolee@gmail.com>
Date
Oct 2, 2019, 12:09 UTC
Message-ID
<48ebe9a4-23a8-8679-f380-195d7fc93d60@gmail.com>
In-Reply-To
<xmqq36gbfz62.fsf@gitster-ct.c.googlers.com>
On 10/2/2019 2:18 AM, Junio C Hamano wrote:
Show 15 quoted lines
> 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.
Thanks for everyone's responses here. I am satisfied with this direction.
-Stolee
Previous: Junio C Hamano
Message 9 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.