2013-07-20 113 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,並不知道構建系統足以知道如何鏈接舊版本)