🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #979

Partial-clone merge requests a locally created blob from the remote

#979
From: Andrew Parmet
Date: Wed, 21 Oct 2026 03:15
71 lines
10691 bytes
Hello,

I have a large repository where I have set up partial clones.
Occasionally a merge fails with:

    fatal: remote error: upload-pack: not our ref <object-id>
    fatal: could not fetch <another-object-id> from promisor remote

The rejected object appears to be a blob created locally by the merge
itself. After restoring the worktree to its pre-merge state and
retrying the merge, it succeeds.

With some help from an LLM, I reduced this to a minimal reproducer
below. The same script succeeds when I remove `--filter=blob:none`:

---

#!/bin/sh
# Run with: sh /tmp/reproduce-promisor-merge.sh
# Optional: REPRO_GIT=/path/to/git (and GIT_EXEC_PATH for a separate install).
# Creates local temporary repositories only; retains them for inspection.
# Expected: a clean merge. Affected Git: "not our ref", then exit 128.
set -eu

git() { command "${REPRO_GIT:-git}" "$@"; }
export GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_GLOBAL=/dev/null
export GIT_AUTHOR_NAME=Reproducer GIT_AUTHOR_EMAIL=repro@example.invalid
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"

root=$(mktemp -d "${TMPDIR:-/tmp}/git-promisor-repro.XXXXXX")
printf 'Repositories retained in: %s\n' "$root"
cd "$root"

# With these contents, the local edit and merged result have blob IDs starting
# with 6c. They share a loose-object directory, exposing its stale cache.
contents() { printf '%s 31\n1\n2\n3\n4\n5\n6\n7\n8\n%s 31\n' "$1" "$2"; }

git init -q --object-format=sha1 -b main server
git -C server config uploadpack.allowFilter true
git -C server config uploadpack.allowAnySHA1InWant true
contents top bottom > server/file.txt
git -C server add file.txt
git -C server commit -qm base

# --no-local makes this local clone use the transport and honor blob filtering.
git clone -q --no-local --filter=blob:none server client
git -C client switch -qc topic
contents ours bottom > client/file.txt
git -C client commit -qam ours

# The upstream edit is at the opposite end, so it merges without conflicts.
# new.txt leaves a genuinely missing blob for the checkout fetch to obtain.
contents top theirs > server/file.txt
printf 'upstream only\n' > server/new.txt
git -C server add .
git -C server commit -qm theirs
git -C client fetch -q origin

# The bug requests the locally created merge result from the server, which
# cannot have it. That rejects the batch also containing the new.txt blob.
export GIT_TRACE_PACKET="$root/packets.log"
git -C client merge --no-edit origin/main

---

Is this a bug in git itself?

Thanks,
Andrew Parmet
Technical Details
Message-ID: <CADudEQNrfiP0VdYvxpWxNKZV=yXtc4LkSXPsmD++Bj8VRpXuQQ@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72633-linux-kernel-git=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72633-linux-kernel-git=dewy.ru
From: andrew@parmet.com (Andrew Parmet)
Newsgroups: linux.kernel.git
Subject: Partial-clone merge requests a locally created blob from the remote
Date: Tue, 20 Oct 2026 23:15:08 -0400
Organization: Usenet Network
Message-ID: <CADudEQNrfiP0VdYvxpWxNKZV=yXtc4LkSXPsmD++Bj8VRpXuQQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: usenet.network;
	logging-data="4025169"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:IkCrMkms3gxjZxwBvf/0gc95/lw= sha256:y1zUYrSASNnBCbt0GJz/htWvbLPhMu5aeKp7N0EqtEE=
	sha1:3E8u7njX7lzpqdVOwB15Ba5YHk4= sha256:FytToAaP5DuPnu9uG67iSCP8hsadRmlj5o/RVKlMb38=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id E0AC1110F02; Wed, 21 Oct 2026 06:21:45 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.949
X-Spam-Status: No, score=-2.949 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id pX37ckWpewUe;
	Wed, 21 Oct 2026 06:21:43 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-72633-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=parmet.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id A467D110F00; Wed, 21 Oct 2026 06:21:39 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 907164361E; Wed, 21 Oct 2026 03:16:12 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792552555;
	b=uc0PmeX7jAgqGzBX615ZUkjxJbifi8cfQNPICdYNzRMxAHtXagCk/5vTV3fRscccP/2Y
	 q6Uu++C/t23Nhx8Uf5wo0TbCiPrPp6/vQSBngajV0iutRn505dVayB2E6qYmYmYS+5d0a
	 jTSSN+TwPKJcq1DffTvGY1oRs8zbxRjx9jRMnRBz9Kj/4t2MsaSJTJUCuYzJ2wEMAWD5D
	 hYQaTDeDGtdwZ3jyj+fxCEferZ22iJgPFemY0eLu/0GcpTIf+KAHvvnYqFW5qTEkAMbjX
	 uYYoDR4yJKxZVzSr8wyJS4B/St1fkrg9QVvbjBcrqDuQTJQQ4cjrK3SKSGdZvIG/sbQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792552555;
	h=X-Original-To:Received:DMARC-Filter:Received:Received:
	 X-Authority-Analysis:Received:X-Gm-Message-State:X-Received:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:From:Date:
	 X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:Subject:To:
	 Content-Type:X-CMAE-Envelope;
	bh=8Jhkmwr7kCf+QWyWmoMtjL0SdVzWN2dMO5qs8ecK8Q8=;
	b=qzzSZWoz2SblX5sJBuG7isBRI6cZmc7+gF0ucX4iMMxHk0ovOlGjkBWipMETSuQ4EkX6
	 tFjDohBPMqJw96GFKTEYwZQtDIXOfYBtEfYuZGdyijfZVCxbeTqvw1pGJU3xFzC7ourk/
	 gBA7MjlElCwGbKPNOnPLM7gycH4mQtEK9o2erANS3ax1u0XHTIVhLhR81TTufbXRWjAjj
	 GvKWjDjeZq5FvQ4ZiV3zkl9vvPTfdtTGXZnW+DzXIC3ZTzgMkCb7h/s78HfZa816O6he8
	 hD3nQdVmmgsOzr5Y7N79bX+e06f06F8RzJXZwtuA7qmCYOYEXyw94pPu/8NOXNjBUGQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=none header.from=parmet.com;
	spf=pass smtp.mailfrom=parmet.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E23E60A381C;
	Wed, 21 Oct 2026 03:15:55 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=44.202.169.36
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792552554;
	b=MrxxheQF61f+XbDK2jsHaJu1JFKhV/fgaLtS8R9EdmGXcVu0EPbu/jblgTQ9Su/Y+TxJ
	 ZC2EJejmaCytfRyKirhO+9DckzlEkgTQCOHNQCrdOx0vp09MMgPCMgK/KP1VVIrhgQLXN
	 4B+5c/2GDN8/+AsaIs9Y7gdJKJp4j4Z+KxNbOoMUQTGld655x6e//+JnrHUAsv4f1iAF8
	 g4uq0dsOkSIfVA/m8v1mp30uy127Z3WVVQhH+/2iEw3ht4HhjTucdsKirIclKnskamYjK
	 dzXCC5avGdSsbVExy2jBtKe3h7DEEdYmqbHGbFgbZlur5xDOrfCjydT9efyq+LM6Yfw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792552554;
	h=DMARC-Filter:Received:Received:X-Authority-Analysis:Received:
	 X-Gm-Message-State:X-Received:MIME-Version:From:Date:
	 X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:Subject:To:
	 Content-Type:X-CMAE-Envelope;
	bh=8Jhkmwr7kCf+QWyWmoMtjL0SdVzWN2dMO5qs8ecK8Q8=;
	b=KcDJFHibC+WHtYmnpcL+MG8q8fBYc2+KVydry9lW27ESyCgWwip0ROTIhQ3GH5RUKZsv
	 99YAJEDXjrd6EwyOOkCfr2ILmbTLfx/st6EPHXClZBLbx39ARsZKMUPLk+bleS61vOnfN
	 Z1xi2JzjnArf3xgK3TkEXOMLIDftBVkSKoYHl9S2w5GeQ1mzVO2kACOz97AN6xmyGfVhD
	 OyZsiFeQCod6EteKmx3HEKzbSrofdok5l+HnUshW9YurZ4gEece8HeOJZmztuMgMlZQA+
	 dnXwWkL1543KnlXsUILEkRAECWY7tthGw8J7LGQhhGqJ0KIeahVuAce+O4RW4w5yu6w==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=parmet.com;
	spf=pass smtp.mailfrom=parmet.com;
	arc=none smtp.remote-ip=44.202.169.36
X-Received: from omta037.useast.a.cloudfilter.net (omta037.useast.a.cloudfilter.net [44.202.169.36])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id A94E760A380F
	for <git@vger.kernel.org>; Wed, 21 Oct 2026 03:15:53 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A94E760A380F
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=parmet.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=parmet.com
X-Received: from eig-obgw-6007b.ext.cloudfilter.net ([10.0.30.166])
	by cmsmtp with ESMTPS
	id JANnx1OTGJFmFJMnrxRggE; Wed, 21 Oct 2026 03:15:47 +0000
X-Received: from mail-vk1-f177.google.com ([209.85.221.177])
	by cmsmtp with ESMTPSA
	id JMnpxqc2PgKkdJMnqxRDed; Wed, 21 Oct 2026 03:15:47 +0000
X-Authentication-Results: parmet.com; auth=pass (PLAIN)
 smtp.auth=andrew@parmet.com
X-Authority-Analysis: v=2.4 cv=a9cw9VSF c=1 sm=1 tr=0 ts=6ad82e63
 a=1Gtpy36QMqX7GAVeZi4eNA==:117 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10
 a=oVcKi2cZ8e-OidIuZFQA:9 a=QEXdDO2ut3YA:10
X-Received: by mail-vk1-f177.google.com with SMTP id 71dfb90a1353d-5eadadf23e5so163919e0c.2
        for <git@vger.kernel.org>; Tue, 20 Oct 2026 20:15:46 -0700 (PDT)
X-Gm-Message-State: AFq9FYJxuZQ8Ev5IDwlZTSuSl+Qxl0vaarHflvyhrc4gh1WI1EwtODi4
	28YiHsGnVwmDoaJiGvdeYVXOcNI06V2r9cwI/PhE+v4e+dUH0U7HPhRFxxF6FDZFWML0TBRnOlw
	dPfdOZAm6KQDSVy+rlDWTQAY3s4iUIeA=
X-Received: by 2002:a05:6122:1d41:b0:5e9:721c:72a8 with SMTP id
 71dfb90a1353d-5eaeba12f6cmr317285e0c.0.1792552545135; Tue, 20 Oct 2026
 20:15:45 -0700 (PDT)
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-Gmail-Original-Message-ID: <CADudEQNrfiP0VdYvxpWxNKZV=yXtc4LkSXPsmD++Bj8VRpXuQQ@mail.gmail.com>
X-Gm-Features: AclHuK9vRNwa1NqZSLpxdKb_NH9KVSZzMrQVGgayHZwJYOHv-0Tc-n2z9Z-zmn0
X-CMAE-Envelope: MS4xfCHtkmlgo/EU5+AjxO8kJSpdI0aPLpomPwoCx418dQUKCeSOm97kywjJYw1OwCs3dxHN8RwzcCQINT2KiEMljF0UH5bpqsRwh9o+RIh8RV/XNlWJObbD
 59JR6cYfSqEQqZ+MtSXtgweQMRKJdoI5pESWoO/UAadC9yNgUjnj/vDHkmcvXF8XBu2Bk/vowtJX4UX4aCtv0ttJh75PTTMyz9c=