From: "Shawn O. Pearce" <spearce@spearce.org>
To: Julian Phillips <julian@quantumfyre.co.uk>
Cc: Nicolas Pitre <nico@cam.org>, git@vger.kernel.org
Subject: Re: Debugging corrupt object generation
Date: Fri, 2 Nov 2007 01:15:55 -0400 [thread overview]
Message-ID: <20071102051555.GB14735@spearce.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0711020018400.18429@beast.quantumfyre.co.uk>
Julian Phillips <julian@quantumfyre.co.uk> wrote:
> On Thu, 1 Nov 2007, Nicolas Pitre wrote:
> >
> >Maybe fast-import hasn't flushed the needed data to the pack yet?
>
> Well, fast-import completes quite happily and outputs the normal summary
> status. I can look at logs and trees etc provided that I don't try and
> look at one particular part of the tree on one particular commit. I
> think the problem is that I've managed to do something inside fast-import
> that corrupts one particular tree object (though I've no idea what that
> might be).
Ahhh. I'm betting you messed up the version 0 and version 1 arrays
inside of the struct tree_entry. This could cause the delta
generator to look at the wrong base information when it creates
the delta, thus causing the delta to be created for a different
base than what the object is actually using in the packfile.
The version[0] is meant to hold the mode and SHA-1 of the tree_entry
in the base object. The version[1] is meant to hold the current
mode and SHA-1 of the tree_entry in the new object. A mode of 0
means the entry doesn't exist in that particular tree; so an add
is shown as "version[0].mode = 0; version[1].mode = 0100644".
Look at the store_tree function, this is where we regenerate the
canonical representation of both the version[0] and the version[1]
trees so the store_object function can generate a delta. Note that
we assume the base object name is root->versions[0].sha1. Maybe the
version[0] array doesn't actually match the tree named by that sha1?
--
Shawn.
prev parent reply other threads:[~2007-11-02 5:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-01 22:57 Debugging corrupt object generation Julian Phillips
2007-11-01 23:57 ` Nicolas Pitre
2007-11-02 0:26 ` Julian Phillips
2007-11-02 5:15 ` Shawn O. Pearce [this message]
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=20071102051555.GB14735@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=julian@quantumfyre.co.uk \
--cc=nico@cam.org \
/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