From: Jeff King <peff@peff.net>
To: Robert Garrigos <robert@garrigos.cat>
Cc: git@vger.kernel.org
Subject: Re: unable to get type of object
Date: Wed, 1 Jun 2011 12:04:48 -0400 [thread overview]
Message-ID: <20110601160447.GA7132@sigill.intra.peff.net> (raw)
In-Reply-To: <4DE5E60B.2030903@garrigos.cat>
On Wed, Jun 01, 2011 at 09:11:07AM +0200, Robert Garrigos wrote:
> ************
> predircam@eduab:~/public_html/idosing> git pull
> Generating pack...
> Done counting 117 objects.
> error: unable to find c3117d23df0c01ba8558bad81ad3488f0e8d430a
> fatal: unable to get type of object c3117d23df0c01ba8558bad81ad3488f0e8d430a
> fatal: early EOF
> fatal: git-unpack-objects died with error code 128
> Fetch failure: /home/predircam/gitrepos/idosing.git
> ***************
>
> google suggests me to run git fsck to get a list of corrupted files.
> Besides that I'm running git 1.2.4 and that the git command for that
> version is fsck-objects, I'm not having any result at all.
Wow, that's pretty ancient by git standards.
> Could this be a compatibility problem? As I said, I run git 1.2.4 on
> the repo server and git 1.7.0.2 on my development server. BTW, on my
> devel server running the git command fsck gives no result either.
It could be. In the 1.6.x series we started using some newer encodings
for packfiles and their associated indexes. From the 1.6.0 release
notes:
By default, packfiles created with this version uses delta-base-offset
encoding introduced in v1.4.4. Pack idx files are using version 2
that allows larger packs and added robustness thanks to its CRC
checking, introduced in v1.5.2 and v1.4.4.5. If you want to keep your
repositories backwards compatible past these versions, set
repack.useDeltaBaseOffset to false or pack.indexVersion to 1,
respectively.
However, note that this is for the _local_ pack storage. When two git
versions are talking to each other on the network, they will negotiate
the use of delta-base-offsets (and the index is never transmitted, but
regenerated locally on the receiving side).
But you can still run into problems if you are accessing the repo at the
filesystem level with two different versions (e.g., by mounting from a
remote server, or by copying your .git directory from machine to
machine).
For example (I keep many old git versions around as git.$version, but
in your case it would presumably happen on separate machines).
# set up a simple repo with v1.7.0.2
git.v1.7.0.2 init repo
cd repo
echo content >file
git.v1.7.0.2 add file
git.v1.7.0.2 commit -m foo
git.v1.7.0.2 repack -ad
# now try accessing with v1.2.4, which yields:
# error: non-monotonic index
# fatal: bad object ab929d107cceaf4d4b4d6a2d9b0aac275fd6e227
git.v1.2.4 log
It can be fixed with:
git.v1.7.0.2 config repack.useDeltaBaseOffset false
git.v1.7.0.2 config pack.indexVersion 1
git.v1.7.0.2 repack -ad
# and now this works
git.v1.2.4 log
where again, you would do the v1.7.0.2 bits on the machine with the
newer git.
Does this apply to your situation (two versions of git accessing the
same repo at the filesystem level)? If so, does setting that config and
repacking clear things up?
-Peff
next prev parent reply other threads:[~2011-06-01 16:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 7:11 unable to get type of object Robert Garrigos
2011-06-01 9:39 ` Jakub Narebski
2011-06-01 10:05 ` Robert Garrigos
2011-06-01 16:04 ` Jeff King [this message]
2011-06-01 18:18 ` Tomas Carnecky
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=20110601160447.GA7132@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=robert@garrigos.cat \
/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).