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

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

From
APAndrew Parmet <andrew@parmet.com>
Date
Oct 21, 2026, 03:15 UTC
Message-ID
<CADudEQNrfiP0VdYvxpWxNKZV=yXtc4LkSXPsmD++Bj8VRpXuQQ@mail.gmail.com>
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

Message 1 of 1 in “Partial-clone merge requests a locally created blob from the remote”
  1. Andrew ParmetOct 21, 2026

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.