我在两台不同的机器上使用git,repo在机器A上,包含git 1.9.1
在机器B上我通过NFS挂载了repo,而机器B包含git 2.7.4
在机器A上一切正常,但在机器B上,当我尝试做 git fetch
我得到
error: inflate: data stream error (unknown compression method)
fatal: loose object cdf74c69f4317b887e499fbabdf4d291807058ff (stored in .git/objects/cd/f74c69f4317b887e499fbabdf4d291807058ff) is corrupt
请注意 git fsck --full
没有报告错误 1.9.1
和 2.7.4
反而告诉我有一些错误的引用:
error: inflate: data stream error (unknown compression method)
error: unable to unpack header of .git/objects/cd/f74c69f4317b887e499fbabdf4d291807058ff
error: cdf74c69f4317b887e499fbabdf4d291807058ff: object corrupt or missing: .git/objects/cd/f74c69f4317b887e499fbabdf4d291807058ff
Checking object directories: 100% (256/256), done.
Checking objects: 100% (235088/235088), done.
error: refs/heads/QA-5595: invalid sha1 pointer 0000000000000000000000000000000000000000
机器B上的 git status
也显示已删除的文件 .
这两个版本之间是否存在已知的不兼容性?
谢谢
1 回答
似乎
umount
/mount
解决了这个问题 . 这让我想起了Gitlab对NFS的问题 . 我试过ls
和git gc
,但我没有为我工作 . 进一步阅读检查 How we spent two weeks hunting an NFS bug in the Linux kernel :https://about.gitlab.com/2018/11/14/how-we-spent-two-weeks-hunting-an-nfs-bug/