git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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*
Previous: Linus TorvaldsNext: Daniel Barkalow
Message 4 of 7 in “[RFC] http clone does not checkout working tree”
  1. Jeff KingJun 4, 2008
  2. Linus TorvaldsJun 4, 2008
  3. Linus TorvaldsJun 4, 2008
  4. Daniel BarkalowJun 4, 2008
  5. Daniel BarkalowJun 4, 2008
  6. Junio C HamanoJun 4, 2008
  7. Jeff KingJun 4, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.