From: Junio C Hamano <junkio@cox.net>
To: Andreas Ericsson <ae@op5.se>
Cc: git@vger.kernel.org, Sergio Callegari <scallegari@arces.unibo.it>
Subject: Re: Problem with pack
Date: Fri, 25 Aug 2006 03:58:33 -0700 [thread overview]
Message-ID: <7vbqq95bfq.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <44EECEDC.7090608@op5.se> (Andreas Ericsson's message of "Fri, 25 Aug 2006 12:20:12 +0200")
Andreas Ericsson <ae@op5.se> writes:
>> Btw, even without that, if I understand correctly, git packs are
>> collections of compressed objects, each of which has its own header
>> stating how long is the compressed object itself. In my case, the
>> error is in inflating one object (git unpack-objects says inflate
>> returns -3)... so shouldn't there be a way to try to skip to the
>> next object even in this case?
>
> It should be possible, assuming the pack index is still intact. The
> pack index is where the headers are stored, afaik.
The problem Sergio seems to be having is because somehow he does
not have a base object that another object that is in the pack
depends on, because the latter object is stored in deltified
form.
This should never happen unless .pack itself is corrupted
(git-pack-objects, unless explicitly told to do so with --thin
flag to git-rev-list upstream, would not make a delta against
objects not in the same pack).
When a delta is written to the pack file, unless its base object
has already written out, git-pack-objects writes out the base
object immediately after that deltified object. So one
possibility is that the pack was truncated soon after the delta
that is having trouble with finding its base object. In such a
case, the proposed recovery measure of skipping the corruption
and keep going would not buy you that much. On the other hand,
if the corruption is in the middle (e.g. a single disk block was
wiped out), having .idx file might help you resync.
Does the pack pass git-verify-pack test, I wonder?
next prev parent reply other threads:[~2006-08-25 10:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-25 10:07 Problem with pack Sergio Callegari
2006-08-25 10:20 ` Andreas Ericsson
2006-08-25 10:41 ` Jakub Narebski
2006-08-25 10:58 ` Junio C Hamano [this message]
2006-08-26 10:09 ` Junio C Hamano
2006-08-26 10:31 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2006-08-27 17:45 Sergio Callegari
2006-08-27 18:27 ` Linus Torvalds
2006-08-27 19:26 ` Nicolas Pitre
2006-08-27 21:55 ` Junio C Hamano
2006-08-26 18:53 Sergio Callegari
2006-08-26 19:24 ` Linus Torvalds
2006-08-26 18:49 Sergio Callegari
2006-08-25 12:31 Sergio Callegari
2006-08-26 18:20 ` Linus Torvalds
2006-08-25 8:45 Sergio Callegari
2006-08-25 9:12 ` Johannes Schindelin
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=7vbqq95bfq.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=scallegari@arces.unibo.it \
/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).