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.