Gitでreftableとsha256を試す
gitのconfig推奨設定を試してみる。
reftableを使う
Section titled “reftableを使う”既存のリポジトリでも git clone するときにオプションで reftable を使うよう構成できる。
git clone --ref-format=reftable https://github.com/lufia/qsh.gitsha256ハッシュを使う
Section titled “sha256ハッシュを使う”git clone には —object-format= オプションが無いので最初から。しかし2025年3月時点では、GitHubが対応していなかった。
$ git init --object-format=sha256 [--ref-format=reftable]$ git remote add origin https://github.com/lufia/git-sha256.git
$ git commit -m 'first commit'[main (root-commit) 867d8e2] first commit 1 file changed, 1 insertion(+) create mode 100644 README.md
$ git push -u origin mainfatal: the receiving end does not support this repository's hash algorithmfatal: the remote end hung up unexpectedlyerror: failed to push some refs to 'https://github.com/lufia/git-sha256.git'compatObjectFormat を設定すればいけるか?
$ git config extensions.compatObjectFormat sha1$ git push -u origin mainfatal: the receiving end does not support this repository's hash algorithmfatal: the remote end hung up unexpectedlyerror: failed to push some refs to 'https://github.com/lufia/mofu.git'2025-03-20時点では設定してもだめだった。