reftable: fix compatibility with SHA256 repos
In t5601 there's a test failing where we play some games with SHA1/SHA256. This test is currently failing:
test_expect_success 'clone with GIT_DEFAULT_HASH' '
(
sane_unset GIT_DEFAULT_HASH &&
git init --object-format=sha1 test-sha1 &&
git init --object-format=sha256 test-sha256
) &&
test_commit -C test-sha1 foo &&
test_commit -C test-sha256 foo &&
GIT_DEFAULT_HASH=sha1 git clone test-sha256 test-clone-sha256 &&
GIT_DEFAULT_HASH=sha256 git clone test-sha1 test-clone-sha1 &&
git -C test-clone-sha1 status &&
git -C test-clone-sha256 status
'
We need to investigate and fix the issue.
Edited by Patrick Steinhardt