git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Minor regression in 2.35 with reflog expire
Date: Thu, 10 Mar 2022 20:08:32 +0100	[thread overview]
Message-ID: <571c0796-66d4-e8c7-c5a5-2e7a28132aa9@kdbg.org> (raw)

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

             reply	other threads:[~2022-03-10 19:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10 19:08 Johannes Sixt [this message]
2022-03-10 22:56 ` [PATCH] reflog: don't be noisy on empty reflogs Ævar Arnfjörð Bjarmason
2022-03-11  7:37   ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=571c0796-66d4-e8c7-c5a5-2e7a28132aa9@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).