Re: [RFC] http clone does not checkout working tree
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Jun 4, 2008, 19:59 UTC
- Message-ID
- <alpine.LNX.1.00.0806041535230.19665@iabervon.org>
- In-Reply-To
- <alpine.LFD.1.10.0806041222300.3473@woody.linux-foundation.org>
On Wed, 4 Jun 2008, Linus Torvalds wrote:
Show 29 quoted lines
> On Wed, 4 Jun 2008, Linus Torvalds wrote:
> >
> > and quite frankly, it's rather possible that we should get rid of the
> > "void *buffer" and "unsigned long size" in the tree *entirely*, because
> > the above would likely be better written as
> ..
>
> Side note: the actual historical context here is that "parse_tree()" used
> to create that "tree_entry_list" of all the entries in the tree. So we
> used to do things like
>
> struct tree_entry_list *list;
>
> if (parse_tree(tree))
> die(..)
> list = tree->entries;
> while (list) {
> ...
>
> so "parse_tree()" was something much bigger (and generated much slower and
> less dense data structures).
>
> These days, parse_tree() basically just reads the object buffer and
> length. So it boils down to just caching the result of "read_sha1_file()",
> but we have all those legacy uses that come from the old historical thing.
> And to some degree it may have made sense to drop the buffer, but keep the
> actual list of entries in that old model.
>
> See commit 2d9c58c69d1bab601e67b036d0546e85abcee7eb.I think the lineage of walker.c is to the version in fetch.c, which, in that commit, you added the same "drop the buffer" optimization from rev-list. If the old style ever dropped the buffer, it would have been in parse_tree_buffer() and you'd have had to remove it to get the new style to work at all.
-Daniel *This .sig left intentionally blank*