This commit is contained in:
Joey Hess 2024-10-19 16:43:35 -04:00
parent 93534b6a94
commit bbc2d47782
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,9 @@
[[!comment format=mdwn
username="joey"
subject="""comment 1"""
date="2024-10-19T20:23:21Z"
content="""
Here I see the error after `git-annex get`, but not after `git-annex add`.
git version 2.45.2
"""]]

View file

@ -0,0 +1,22 @@
[[!comment format=mdwn
username="joey"
subject="""comment 2"""
date="2024-10-19T20:24:21Z"
content="""
The git command that git-annex is running that outputs this message,
in the `git-annex get` case, is:
git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 335cd01e749bcfecc96b9d6d1f0bc3edb3ef2aec042da9a40379414a0f5d2243
Here 4b825dc642cb6eb9a060e54bf8d69288fbee4904 is the empty tree sha1, which is
hardcoded in git-annex as emptyTree. It must need to instead use the
corresponding sha256
(6ef19b41225c5369f1c104d45d8d85efa9b057b53b14b4b9b939dd74decc5321) when diffing
against a sha256.
A related problem is that deleteSha is the all 0 sha1, and it turns out that
using that rather than the sha256 version, in a sha256 repository, fails at
least when `git update-index --index-info` does it. This is a bit surprising
given the comment in deleteSha that says git will accept the sha1 in that
situation. deleteSha is used in a couple of other places too, which will need to be checked.
"""]]