[JGit] Mismatch CRC in packed objects from `jgit push`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi list,

When I working with jgit-over-freenet, I found the pack files as
generated by `jgit push` give CRC error in `git fsck` and `git clone`,
but they are perfectly okay if I do a `git unpack-objects` manually.

You can download the pack file here:
 http://sdiz.net/temp/pack-fcedfaa7130866c884e208769661360563a3081f.idx
 http://sdiz.net/temp/pack-fcedfaa7130866c884e208769661360563a3081f.pack


Here is the diagnose session:

sdiz@sp2:/tmp$ git clone --verbose http://........
[...]
Getting index for pack fcedfaa7130866c884e208769661360563a3081f
Getting pack fcedfaa7130866c884e208769661360563a3081f
 which contains f197d4578a1b8ed195981d1e1ad4c390875c353a
error: index CRC mismatch for object
f197d4578a1b8ed195981d1e1ad4c390875c353a from
/tmp/egit-freenet/.git/objects/pack/pack-fcedfaa7130866c884e208769661360563a3081f.pack
at offset 12
error: index CRC mismatch for object
0b2cb180fef969e0da259765564f9bf8bcd8cf25 from
/tmp/egit-freenet/.git/objects/pack/pack-fcedfaa7130866c884e208769661360563a3081f.pack
at offset 183
error: index CRC mismatch for object
d88f5a430841925629c30199e666473d201bdf5a from
/tmp/egit-freenet/.git/objects/pack/pack-fcedfaa7130866c884e208769661360563a3081f.pack
at offset 379
error: index CRC mismatch for object
40d3204c679fc5d25281331b981d968016030930 from
/tmp/egit-freenet/.git/objects/pack/pack-fcedfaa7130866c884e208769661360563a3081f.pack
at offset 558
[...]
sdiz@sp2:/tmp$ git --version
git version 1.6.2


// Using the pack file directly seems okay, but fsck give the CRC error :

sdiz@sp2:/tmp/z$ git init
Initialized empty Git repository in /tmp/z/.git/
sdiz@sp2:/tmp/z$ cp ../pack-* .git/objects/pack/
sdiz@sp2:/tmp/z$ git checkout f197d4578a1b8ed195981d1e1ad4c390875c353a
warning: You appear to be on a branch yet to be born.
warning: Forcing checkout of f197d4578a1b8ed195981d1e1ad4c390875c353a.
Note: moving to "f197d4578a1b8ed195981d1e1ad4c390875c353a" which isn't
a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
  git checkout -b <new_branch_name>
HEAD is now at f197d45... Instruction for cloning with git+fproxy
sdiz@sp2:/tmp/z$ ls
0x7494252.asc  activelink.png  freenet-bunny.svg  index.html  jgit
jgit.jar  jgit_src.zip
sdiz@sp2:/tmp/z$
sdiz@sp2:/tmp/z$ git fsck f197d4578a1b8ed195981d1e1ad4c390875c353a
error: index CRC mismatch for object
f197d4578a1b8ed195981d1e1ad4c390875c353a from
.git/objects/pack/pack-fcedfaa7130866c884e208769661360563a3081f.pack
at offset 12
error: index CRC mismatch for object
0b2cb180fef969e0da259765564f9bf8bcd8cf25 from
.git/objects/pack/pack-fcedfaa7130866c884e208769661360563a3081f.pack
at offset 183
error: index CRC mismatch for object
d88f5a430841925629c30199e666473d201bdf5a from
.git/objects/pack/pack-fcedfaa7130866c884e208769661360563a3081f.pack
at offset 379
[...]

// unpack the objects manually seems to fix the issue
sdiz@sp2:/tmp/z$ rm -f .git/objects/*/*
sdiz@sp2:/tmp/z$ git unpack-objects --strict -r <
../pack-fcedfaa7130866c884e208769661360563a3081f.pack
Unpacking objects: 100% (26/26), done.
sdiz@sp2:/tmp/z$ git fsck --full f197d4578a1b8ed195981d1e1a
sdiz@sp2:/tmp/z$

// diff'ing the checkout with the original repository is also okay
sdiz@sp2:/tmp/z$ diff -Nau ~/build/egit/ .
Common subdirectories: /home/sdiz/build/egit/.git and ./.git
sdiz@sp2:/tmp/z$

// Fsck'ing in original repository is perfectly okay:

sdiz@sp2:~/build/egit$ git fsck --full f197d4
dangling commit 9900ac0df33e046c2f3f77ad8e084d535d3c023d
dangling commit 2e12ce6571923190124e86cc6b877ccb3ace9219
dangling commit f8150b71a352176f672270ffced6958682b215f3
dangling commit 101ae6bff9ca647c7c8297556314757162fbc2f2
[..]
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux