git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Jeff King <peff@peff.net>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	John Goerzen <jgoerzen@complete.org>
Subject: Re: [RFH] bug in unpack_trees
Date: Wed, 5 Mar 2008 07:56:11 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.1.00.0803050750400.12253@woody.linux-foundation.org> (raw)
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

  reply	other threads:[~2008-03-05 15:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04 11:59 [RFH] bug in unpack_trees Jeff King
2008-03-04 21:31 ` Linus Torvalds
2008-03-05  6:47   ` Daniel Barkalow
2008-03-05 15:56     ` Linus Torvalds [this message]
2008-03-06  0:35       ` Linus Torvalds
2008-03-08 22:25 ` Linus Torvalds
2008-03-08 22:36   ` Daniel Barkalow
2008-03-13 14:00   ` Jeff King
2008-03-14 14:09     ` John Goerzen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.1.00.0803050750400.12253@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jgoerzen@complete.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).