2013-07-20 112 views
2

我无法克隆FFmpeg回购。使用 binary search algorithm, 我想我围绕一个特定的深度缩小了这个问题。注意不一致的结果在很大的深度克隆失败

 
$ git clone --depth 916 git://source.ffmpeg.org/ffmpeg 
Cloning into 'ffmpeg'... 
remote: Counting objects: 16737, done. 
remote: Compressing objects: 100% (8454/8454), done. 
remote: Total 16737 (delta 11293), reused 11481 (delta 8105) 
Receiving objects: 100% (16737/16737), 11.32 MiB | 398.00 KiB/s, done. 
Resolving deltas: 100% (11293/11293), done. 
 
$ git clone --depth 916 git://source.ffmpeg.org/ffmpeg 
Cloning into 'ffmpeg'... 
remote: Counting objects: 16737, done. 
remote: Compressing objects: 100% (8454/8454), done. 
remote: Total 16737 (delta 11291), reused 11482 (delta 8105) 
Receiving objects: 100% (16737/16737), 11.32 MiB | 390.00 KiB/s, done. 
fatal: pack is corrupted (SHA1 mismatch) 
fatal: index-pack failed 
 
$ git clone --depth 916 git://source.ffmpeg.org/ffmpeg 
Cloning into 'ffmpeg'... 
remote: Counting objects: 16737, done. 
remote: Compressing objects: 100% (8454/8454), done. 
remote: Total 16737 (delta 11290), reused 11481 (delta 8105) 
Receiving objects: 100% (16737/16737), 11.32 MiB | 401.00 KiB/s, done. 
Resolving deltas: 100% (11290/11290), done. 
fatal: missing blob object 'e893922133e1837d51077b07b6eb2ef3d5f269ec' 
fatal: remote did not send all necessary objects 
 
$ git clone --depth 916 git://source.ffmpeg.org/ffmpeg 
Cloning into 'ffmpeg'... 
remote: Counting objects: 16737, done. 
remote: Compressing objects: 100% (8454/8454), done. 
remote: Total 16737 (delta 11292), reused 11481 (delta 8105) 
Receiving objects: 100% (16737/16737), 11.32 MiB | 394.00 KiB/s, done. 
Resolving deltas: 100% (11292/11292), done. 
Checking out files: 100% (3637/3637), done. 

我该如何解决这个问题,这样我可以在此和全深度克隆?

 
$ git --version 
git version 1.8.3.1 
+0

我没有任何'git clone git:// source.ffmpeg.org/ffmpeg'或'git clone --depth 916 git://source.ffmpeg问题。组织/ ffmpeg'。你还有麻烦吗?什么版本的git?什么OS? – Christopher

+0

无论您或服务器的硬件失败?第二和第三看起来像腐败。鉴于不同的失败,它看起来并不像提交的数量是关键。试试'git clone -v',也许我们会得到更多的信息。 –

回答

2

在这种情况下,问题是由使用 最新的Cygwin(1.7.21) 从Cygwin的港口最新的Git(1.8.3.1)引起的。

解决方法是使用 Adam Dinwoodie’s build

wget tastycake.net/~adam/cygwin/x86/git/git-1.8.5.2-1.tar.xz 
tar -x -C/-f git-1.8.5.2-1.tar.xz 
+2

我有一个类似的设置(来自Cygwin Ports的git),但是这个问题对我来说只是零星发生 - 一个相同的命令行重新运行通常会起作用。 – mheyman

1

这一直困扰我好几个月了,我刚才发现,似乎是为我工作的一种替代方法。

我注意到,每次我在Cygwin下从源代码编译git,并尝试检查一个大的repo(〜1GB的repo与一个额外的1GB子模块)时,我几乎100%的时间都会因此错误而失败。但是,如果我使用Cygwin的setup.exe预编译的git,它一直有效。即使我自己编译了相同的版本(1.7.9),我的编译也会失败并且它们的编译工作。我在两个.exe文件中都使用了objdump,唯一显着的区别是我的.exe使用了cygcrypto-1.0.0.dll,并且他们使用了cygcrypto-0.9.8.dll。

因此,我将cygcrypto-1.0.0.dll和symlinked cygcrypto-1.0.0.dll备份到了0.9.8。我现在已经成功地连续3次成功地检出了回购和子模块(与之前接近100%的失败率相比)。我不能保证这个问题能够100%解决问题,但它看起来非常有前景。

我假设你是否在使用Git,那么你可能有一个将新DLL版本符号链接到旧版本的可能问题。使用风险自负。

(如果有人回答如何让我的git build直接连接到0.9.8,所以我不需要符号链接DLL。我只使用cygwin的Git,并不知道构建系统足以知道如何链接旧版本)