Raku / raku.org

Source code for https://raku.org/
https://raku.org/
Artistic License 2.0
70 stars 50 forks source link

FSCK errors in repo #50

Open rmloveland opened 8 years ago

rmloveland commented 8 years ago
$ git clone https://github.com/perl6/perl6.org
Cloning into 'perl6.org'...
remote: Counting objects: 6355, done.
error: object 552c801ce329aab35ec7a165998e114da4edbd8e: zeroPaddedFilemode: contains zero-padded file modes
fatal: Error in object
fatal: index-pack failed

Here are the settings in my ~/.gitconfig that I believe are causing git to catch these issues:

[transfer]
    fsckObjects = true
[fetch]
    fsckObjects = true
[receive]
    fsckObjects = true
rmloveland commented 8 years ago

Luckily git clone --depth 1 works.

moritz commented 8 years ago

I've enabled the same settings as you have, and cloned fine without any problem, both via HTTPS and ssh. So I'd guess this is either a problem with your git version or the network.

moritz commented 8 years ago

Wait, I cloned the wrong repo, my bad. I can reproduce it.

juanfra684 commented 2 years ago

If someone with commit access wants to fix the problem, here is a fix:

$ cd /tmp/
$ git clone -c fetch.fsckObjects=false https://github.com/Raku/raku.org.git
$ git init raku.org-fixed
$ cd raku.org
$ git fast-export --all | (cd ../raku.org-fixed && git fast-import)
$ find . -type f ! -path '*/.git/*' -exec sha256sum "{}" + > /tmp/sha256sum.txt
$ cd ../raku.org-fixed
$ git checkout
$ sha256sum --quiet -c /tmp/sha256sum.txt

And then you need to force push the repository.

Works on Linux. The find command ignores the .git directory because the SHAs of the repository have changed.

You're going to lose all the external links to the old IDs and the 3 pull requests will be broken but the error is very annoying. And disabling the fsck to clone a repo is never a good idea or the right solution to the problem.

patrickbkr commented 2 years ago

Difficult to come to a decision here. Any git experts with deeper insights of the tradeoffs?

coke commented 9 months ago

I thought I had already tagged @dontlaugh here.

dontlaugh commented 9 months ago

I can't reproduce this on my btrfs filesystem. I've asked some friends to try the clone to try and reproduce.