Minor regression in 2.35 with reflog expire
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Mar 10, 2022, 19:08 UTC
- Message-ID
- <571c0796-66d4-e8c7-c5a5-2e7a28132aa9@kdbg.org>
Since daf1d8285eeb ("reflog expire: don't use lookup_commit_reference_gently()", 2021-12-22) we see
$ git reflog expire --all error: Could not read 0000000000000000000000000000000000000000
that was not there before.
The problem seem to be empty reflog files. I assume they can be created when reflogs expire completely. I have a handful of them in repository that was quiet for a long while.
To reproduce:
git init mkdir -p .git/logs/refs/heads touch .git/logs/refs/heads/foo git reflog expire --all
The "scary" aspect of the regression is that it happens as part of git gc and alarms users, see for example https://stackoverflow.com/questions/71364717/git-gc-error-could-not-read-0000000000000000000000000000000000000000
-- Hannes