Underscore: レポはgitfsckに失敗します

作成日 2020年10月31日  ·  5コメント  ·  ソース: jashkenas/underscore

再現:

$ git config --system receive.fsckObjects true
$ git clone [email protected]:jashkenas/underscore.git  # or `git submodule add -- [email protected]:jashkenas/underscore.git`
Cloning into 'underscore'...
remote: Enumerating objects: 215, done.
remote: Counting objects: 100% (215/215), done.
remote: Compressing objects: 100% (130/130), done.
error: object b252cd0cf660db8fea1a40ae7d3ba0e34a41ffd3: zeroPaddedFilemode: contains zero-padded file modes
fatal: fsck error in packed object
bug

全てのコメント5件

@zackschusterお問い合わせいただきありがとうございます。

git fsckやこの特定のエラーについて聞いたことがなかったので、オンラインで詳細情報を探す必要がありました。 私は最終的にhttps://github.com/pallets/flask/issues/2029で、このタイプの問題に対して2つの可能な解決策があることを発見しました。 1つ目は、リポジトリを再構築することで問題を実際に解決しますが、障害のあるオブジェクトの後のすべてのハッシュが変更されるため、破壊的すぎます。 2つ目は、問題について人々に警告し、問題を回避する方法を指示するためのドキュメントを追加することです(これは完全に実行可能と思われます)。 このリポジトリでは、後者のソリューションのみが実行可能です。

ただし、エラーを再現できないため、これらすべては私には少し議論の余地があるように思われます。 システム全体の設定を変更するために必要なため、最初のコマンドの前にsudoを付けた場合を除いて、Git2.26.2を使用して最初の投稿から正確なコマンドを実行してみました。 リポジトリはエラーなしで複製されました。 また、b252cd0cf660db8fea1a40ae7d3ba0e34a41ffd3ハッシュのオブジェクトも見つかりませんでした。

@zackschuster発生した問題が、ネットワーク転送の障害、ディスクの読み取りの障害、またはGitの特定のバージョンのバグの結果ではないことを再確認してください。 この問題は今すぐ終了します。 結局のところ、エラーを再現するために実行できる追加の手順を見つけた場合、または他の誰かがこれが本当にアンダースコアリポジトリの問題であることを確認できる場合は、もちろん再開します。

@jgonggrijp私はmacOSでgit2.29.2を使用しており、autoconfとmakeを使用して標準的な方法でコンパイルされています。 consoleコマンドのエラーについてお詫びします。 正直なところ、私は$HOME/.gitconfigからreceive.fsckObjectsを設定しています。

自分の側でBLOBエラーを追跡する方法がわかりませんが、詳細を取得しようとします:smile:

@jgonggrijp私はいくつかの情報を見つけました。 注意の:

  1. git clone --config transfer.fsckobjects=false [email protected]:jashkenas/underscore.gitを実行すると、エラーが回避されます( transfer.fsckobjects注意してください。元のレポートの設定が間違っていました。お詫びします!)
  2. その後、リポジトリでgit fsckを実行すると( v2.29.2 )、2つのzeroPaddedFilemodeエラーが発生します
  3. git cat-file -pはファイルのリストを表示します。これは、それらが不正なコミットであることを示しています。 git cat-file -tは、それらをタイプtreeとしてマークします。 git show出力は、 git cat-file -p情報量の少ないバージョンです。 git logは何も返しません。

参考のためにコンソール出力を含めました:

~/Source
$ git clone --config transfer.fsckobjects=false [email protected]:jashkenas/underscore.git
Cloning into 'underscore'...
remote: Enumerating objects: 215, done.
remote: Counting objects: 100% (215/215), done.
remote: Compressing objects: 100% (130/130), done.
remote: Total 10434 (delta 185), reused 101 (delta 85), pack-reused 10219
Receiving objects: 100% (10434/10434), 5.61 MiB | 9.21 MiB/s, done.
Resolving deltas: 100% (6770/6770), done.

~/Source
$ cd underscore 

~/Source/underscore
$ git fsck
Checking object directories: 100% (256/256), done.
warning in tree b252cd0cf660db8fea1a40ae7d3ba0e34a41ffd3: zeroPaddedFilemode: contains zero-padded file modes
warning in tree 8a654ec549a230dcab28e54c6e53c460cb9e190d: zeroPaddedFilemode: contains zero-padded file modes
Checking objects: 100% (10434/10434), done.

~/Source/underscore
$ git cat-file -p b252cd0cf660db8fea1a40ae7d3ba0e34a41ffd3
100644 blob d8cef485ec7309b938b4c3bc19171458e9139811    LICENSE
100644 blob 333b13f45b62427fd0840c77bb55bfc8fb96be6b    README
100644 blob 721c294b3ddb1d3e6ed35a7d9336e162aab01bb9    Rakefile
100644 blob bdaef73ca2ca82b90d37cec4b9c38606b440d619    index.html
100644 blob 6771de07ecd088853df1376f3693e81584ec2560    package.json
040000 tree d0a277f748b309f3d26e13d1cb5133ff003c468d    test
100644 blob 7cfbf993705f83e7fde17e9745b4187f7a4047b2    underscore-min.js
100644 blob 625411233e487b5cd8da1a32a69e5693b1862c09    underscore.js

~/Source/underscore
$ git cat-file -p 8a654ec549a230dcab28e54c6e53c460cb9e190d
100644 blob 9644b34c3f5c16753d1061497aa7aab426e6c896    LICENSE
100644 blob e41015cd7cc04a940ac4e7a451aeb0b0b384c3a3    README
100644 blob 6af14bb6d570698990d30aa0b46e398ae3fd48b1    Rakefile
100644 blob 1a03be19fc8ddf61b113f71c19d6892fb74ff4f5    index.html
100644 blob 2cbc8128d9db1feabc44a3be14c504e40b6b7e2e    package.json
040000 tree fae9dcb01827d13b2b5fbd9afab07489b249dab8    test
100644 blob 2c8b499882c2a5d662ea35c80ec7ea0fa111814f    underscore-min.js
100644 blob 42bf31a27545d0d5460c655d13ce9bbf76e540b3    underscore.js

~/Source/underscore
$ git cat-file -t b252cd0cf660db8fea1a40ae7d3ba0e34a41ffd3
tree

~/Source/underscore
$ git cat-file -t 8a654ec549a230dcab28e54c6e53c460cb9e190d
tree

~/Source/underscore
$ git show b252cd0cf660db8fea1a40ae7d3ba0e34a41ffd3
tree b252cd0cf660db8fea1a40ae7d3ba0e34a41ffd3

LICENSE
README
Rakefile
index.html
package.json
test/
underscore-min.js
underscore.js

~/Source/underscore
$ git show 8a654ec549a230dcab28e54c6e53c460cb9e190d
tree 8a654ec549a230dcab28e54c6e53c460cb9e190d

LICENSE
README
Rakefile
index.html
package.json
test/
underscore-min.js
underscore.js

~/Source/underscore
$ git log b252cd0cf660db8fea1a40ae7d3ba0e34a41ffd3

~/Source/underscore
$ git log 8a654ec549a230dcab28e54c6e53c460cb9e190d

~/Source/underscore
$ 

これで問題を再現できます。 頑張ってくれてありがとう、@ zackschuster。

したがって、この問題が存在するという事実を文書化し、人々がそれを回避する方法を説明する必要があります。 おそらく、 CLONING.mdがそのようなドキュメントの適切な場所になるでしょう。

または、どのコミットがこのツリーを参照しているかをどうにかして把握できるかもしれません。 運が良ければ、削除(または再構築)できるのは重要でない側のブランチだけかもしれません。 おそらく最初にこれを試してみるべきです。

ようこそ。

git fast-export + git fast-importを使用してみましたこれでリポジトリが修正されましたが、ハッシュが変更されました。 フラスコは貢献の下に彼らのzeroPaddedFilemode命令をリストしているので、彼らのテキストをCONTRIBUTING.mdコピーすることはオプションかもしれません。

このページは役に立ちましたか?
0 / 5 - 0 評価

関連する問題

githublyp picture githublyp  ·  3コメント

acl0056 picture acl0056  ·  5コメント

afranioce picture afranioce  ·  8コメント

arieljake picture arieljake  ·  4コメント

ksullivan picture ksullivan  ·  9コメント