git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Next: Ævar Arnfjörð Bjarmason
Message 1 of 3 in “Minor regression in 2.35 with reflog expire”
  1. Johannes SixtMar 10, 2022
  2. reflog: don't be noisy on empty reflogsÆvar Arnfjörð Bjarmason, Mar 10, 2022
  3. Johannes SixtMar 11, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.