Re: RFC: git cat-file --follow-symlinks?
- From
David Turner <dturner@twopensource.com>
- Date
- Apr 30, 2015, 18:44 UTC
- Message-ID
- <1430419490.22711.30.camel@ubuntu>
- In-Reply-To
- <20150430183226.GA2855@peff.net>
On Thu, 2015-04-30 at 14:32 -0400, Jeff King wrote:
Show 16 quoted lines
> On Thu, Apr 30, 2015 at 11:28:42AM -0700, David Turner wrote: > > > On Thu, 2015-04-30 at 11:19 -0700, Junio C Hamano wrote: > > > David Turner <dturner@twopensource.com> writes: > > > > > > > In no case did we do a ls-files command,... > > > > > > "ls-tree -r" is what I would have imagined you would be using, as > > > somebody needs to have the full repository in order to resolve the > > > symbolic links _anyway_, and that somebody does not need to have a > > > checkout in order to do so. > > > > Yes, they have the full repo, but we are only exploring a small fraction > > of it. ls-tree -r would require parsing the entire thing. > > git ls-tree HEAD -- BUILD ?
This does not actually seem to work (even with -r); it only recurses into directories that are named BUILD, rather than being equivalent to git ls-tree -r HEAD |grep /BUILD$.
Also, BUILD files are scattered throughout the tree, so the entire tree would still need to be traversed. At present, our monorepo is not quite large enough for this to matter (a full ls-tree only takes me 0.6s), but it is growing.