reflog expire: don't use lookup_commit_reference_gently()
commitdaf1d8285eeb44eeb8be92b7b01706e887f718ed
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 22 Dec 2021 04:06:45 +0000 (22 05:06 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Dec 2021 00:24:13 +0000 (22 16:24 -0800)
tree83b0461380ff2c0d181ac477ccc911144730b287
parent07815e2d97aa177780ea0d67069b5abd0524f936
reflog expire: don't use lookup_commit_reference_gently()

In the initial implementation of "git reflog" in 4264dc15e19 (git
reflog expire, 2006-12-19) we had this
lookup_commit_reference_gently().

I don't think we've ever found tags that we need to recursively
dereference in reflogs, so this should at least be changed to a
"lookup commit" as I'm doing here, although I can't think of a way
where it mattered in practice.

I also think we'd probably like to just die here if we have a NULL
object, but as this code needs to handle potentially broken
repositories let's just show an "error" but continue, the non-quiet
lookup_commit() will do for us. None of our tests cover the case where
"commit" is NULL after this lookup.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/reflog.c