From: Patrick Steinhardt <ps@pks.im>
To: Patrick Ohly <patrick.ohly@intel.com>
Cc: Kristofer Karlsson <krka@spotify.com>,
git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [BUG] Lazy fetch in partial clone fails with "not our ref" since 5946a564 (odb/source: make read_object_info() pluggable)
Date: Wed, 4 Nov 2026 13:22:18 +0100 [thread overview]
Message-ID: <ausjegMf8AM-URB2@pks.im> (raw)
In-Reply-To: <yrjhld78q06y.fsf@pohly-mobl1.fritz.box>
On Wed, Nov 04, 2026 at 12:56:53PM +0100, Patrick Ohly wrote:
> Kristofer Karlsson <krka@spotify.com> writes:
>
> > On Tue, 3 Nov 2026 at 14:31, Patrick Ohly <patrick.ohly@intel.com> wrote:
> >>
> >> Hello,
> >>
> >> "git merge" in a blobless partial clone fails with "not our ref" while
> >> lazily fetching a missing object. This started to occur today in the
> >> Kubernetes CI, completely breaking the merging of PRs. We should have
> >> been using git 2.54.0, the affected version, for a few days at least
> >> without issues, so it can't be ruled out that this is at least partly
> >> caused by a change on the GitHub side. We are about to revert to git
> >> 2.52.0 to unblock the Kubernetes project.
> >>
> >> [...]
> >>
> >> I bisected v2.52.0 (good) to v2.54.0 (bad). The first bad commit is:
> >>
> >> 5946a564cddc0bf471f27ae4c3fe205441e3ef65
> >> odb/source: make `read_object_info()` function pluggable
> >>
> >> The parent, 3bc3177ad7 ( 2.53.0.185.g3bc3177ad7 ), is good.
> >
> > Thanks for the detailed report. I think I have found the cause: I
> > can reproduce the failure with your steps and make it go away with a
> > small change to the loose object cache.
>
> Any idea why this suddenly started to occur?
>
> We were using 2.54.0 for several days without issues prior to the
> failure. For example,
> https://storage.googleapis.com/kubernetes-ci-logs/pr-logs/pull/batch/pull-kubernetes-cmd/2117551425255903232/clone-log.txt
> merged several different PRs for
> https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/batch/pull-kubernetes-cmd/2117551425255903232
> using
> us-docker.pkg.dev/k8s-infra-prow/images/clonerefs:v20261028-c06373a3e
> as environment. It contains 2.54.0.
The issue here depends on the actual objects IDs that you're merging.
You need to merge at least one object with the same first two hex
characters into a newly written object that same first two characters.
If so, you can trigger a stale loose object cache that makes Git think
that the object does not exist locally, and it then tries to fetch it
from the promisor remote.
I've sent a fix for this bug via [1]. Thanks!
Patrick
[1]: <20261104-pks-odb-loose-stale-cache-v1-0-a00d5cdb5e7d@pks.im>
next prev parent reply other threads:[~2026-11-04 12:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 13:24 [BUG] Lazy fetch in partial clone fails with "not our ref" since 5946a564 (odb/source: make read_object_info() pluggable) Patrick Ohly
2026-11-04 10:11 ` Kristofer Karlsson
2026-11-04 11:56 ` Patrick Ohly
2026-11-04 12:22 ` Patrick Steinhardt [this message]
2026-11-04 12:19 ` Patrick Steinhardt
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ausjegMf8AM-URB2@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=krka@spotify.com \
--cc=patrick.ohly@intel.com \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.