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

Re: [RFH] bug in unpack_trees

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Mar 5, 2008, 15:56 UTC
Message-ID
<alpine.LFD.1.00.0803050750400.12253@woody.linux-foundation.org>
In-Reply-To
<alpine.LNX.1.00.0803050130190.19665@iabervon.org>
On Wed, 5 Mar 2008, Daniel Barkalow wrote:
> 
> The thing that's hopeless isn't including the index; it's including the 
> index that's simultaneously being regenerated.

Yeah. I was thinking about just putting the result in a new index. It's *usually* what the user wants anyway. The whole complexity with updating the old index is really nasty.

There are other complexities there, but the index one is the worst.

When doing a stupid try at using "traverse_trees()" (which in itself was not that easy - traverse_trees() is a fundamentally simpler walker and _different_ enough to not match well), one of the bigger issues is that traverse_trees() wants to do the directories in a separate phase from the files (becasue they sort differently), and that coupled with the fact that we do a kind of "read-modify-write" on the index makes it all really ugly.

I'm still working on it, but it's nastier than I was hoping for. Maybe you can come up with a better solution.

		Linus
Previous: Daniel BarkalowNext: Linus Torvalds
Message 4 of 9 in “[RFH] bug in unpack_trees”
  1. Jeff KingMar 4, 2008
  2. Linus TorvaldsMar 4, 2008
  3. Daniel BarkalowMar 5, 2008
  4. Linus TorvaldsMar 5, 2008
  5. Linus TorvaldsMar 6, 2008
  6. Linus TorvaldsMar 8, 2008
  7. Daniel BarkalowMar 8, 2008
  8. Jeff KingMar 13, 2008
  9. John GoerzenMar 14, 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.