Re: [RFC PATCH 0/3] grep: don't add subrepos to in-memory alternates

2019-09-27 Thread Matheus Tavares Bernardino
On Sat, Sep 28, 2019 at 12:24 AM Junio C Hamano wrote: > > Matheus Tavares Bernardino writes: > > > Right, this would be the best way of doing it. However, I think this > > is not how it's currently implemented. I if correctly understood the > > code in this call chain: > > > > grep_source_load_d

Re: [RFC PATCH 0/3] grep: don't add subrepos to in-memory alternates

2019-09-27 Thread Junio C Hamano
Matheus Tavares Bernardino writes: > Right, this would be the best way of doing it. However, I think this > is not how it's currently implemented. I if correctly understood the > code in this call chain: > > grep_source_load_driver() > userdiff_find_by_path() > > git_check_attr() > collect_some_

Re: [RFC PATCH 0/3] grep: don't add subrepos to in-memory alternates

2019-09-21 Thread Matheus Tavares Bernardino
On Fri, Sep 20, 2019 at 1:26 PM Junio C Hamano wrote: > > Matheus Tavares Bernardino writes: > > > Hmm, I may have gotten a little confused here. Are you talking > > about the attributes stack (which contains .gitattributes and > > info/attributes)? If so, isn't this stack already rebuild for >

Re: [RFC PATCH 0/3] grep: don't add subrepos to in-memory alternates

2019-09-20 Thread Junio C Hamano
Matheus Tavares Bernardino writes: > Hmm, I may have gotten a little confused here. Are you talking > about the attributes stack (which contains .gitattributes and > info/attributes)? If so, isn't this stack already rebuild for > every path? I mean, by the previous call chain it seems to me that

Re: [RFC PATCH 0/3] grep: don't add subrepos to in-memory alternates

2019-09-18 Thread Matheus Tavares Bernardino
On Wed, Sep 18, 2019 at 4:55 PM Junio C Hamano wrote: > > Matheus Tavares writes: > [...] > > - textconv cache is written to the_repository's object database even for > > submodules. Should it perhaps be written to submodules' odb instead? > > You mention "is written", but that is what happens

Re: [RFC PATCH 0/3] grep: don't add subrepos to in-memory alternates

2019-09-18 Thread Junio C Hamano
Matheus Tavares writes: > Make git-grep --recurse-submodules stop adding subrepos to the in-memory > alternates list and, instead, pass a reference to the subrepo struct > down to the threads. Nice. This is done by updating all the codepaths used by grep to use the lower-level helper functions