Re: git-grep in sparse checkout

2019-10-02 Thread Elijah Newren
On Tue, Oct 1, 2019 at 11:33 PM Junio C Hamano wrote: > > Elijah Newren writes: > > > * other commands (archive, bisect, clean?, gitk, shortlog, blame, > > fsck?, etc.) likely need to pay attention to sparsity patterns as > > well, but there are some special cases: > > "git archive" falls into th

Re: git-grep in sparse checkout

2019-10-02 Thread Derrick Stolee
On 10/2/2019 2:18 AM, Junio C Hamano wrote: > Derrick Stolee 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

Re: git-grep in sparse checkout

2019-10-01 Thread Junio C Hamano
Elijah Newren writes: > * other commands (archive, bisect, clean?, gitk, shortlog, blame, > fsck?, etc.) likely need to pay attention to sparsity patterns as > well, but there are some special cases: "git archive" falls into the same class as fast-(im|ex)port; it should ignore the sparse cone by

Re: git-grep in sparse checkout

2019-10-01 Thread Junio C Hamano
Derrick Stolee 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.

Re: git-grep in sparse checkout

2019-10-01 Thread Matheus Tavares Bernardino
On Tue, Oct 1, 2019 at 3:29 PM Derrick Stolee wrote: > > On 10/1/2019 9:06 AM, Matheus Tavares Bernardino wrote: > > Hi, > > > > During Git Summit it was mentioned that git-grep searches outside > > sparsity pattern which is not aligned with user expectation. I took a > > quick look at it and it s

Re: git-grep in sparse checkout

2019-10-01 Thread Derrick Stolee
On 10/1/2019 9:06 AM, Matheus Tavares Bernardino wrote: > Hi, > > During Git Summit it was mentioned that git-grep searches outside > sparsity pattern which is not aligned with user expectation. I took a > quick look at it and it seems the reason is > builtin/grep.c:grep_cache() (which also greps

Re: git-grep in sparse checkout

2019-10-01 Thread Elijah Newren
On Tue, Oct 1, 2019 at 6:30 AM Bert Wesarg wrote: > > Hi, > > On Tue, Oct 1, 2019 at 3:06 PM Matheus Tavares Bernardino > wrote: > > > > Hi, > > > > During Git Summit it was mentioned that git-grep searches outside > > sparsity pattern which is not aligned with user expectation. I took a > > quic

Re: git-grep in sparse checkout

2019-10-01 Thread Bert Wesarg
Hi, On Tue, Oct 1, 2019 at 3:06 PM Matheus Tavares Bernardino wrote: > > Hi, > > During Git Summit it was mentioned that git-grep searches outside > sparsity pattern which is not aligned with user expectation. I took a > quick look at it and it seems the reason is > builtin/grep.c:grep_cache() (w