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

Re: [PATCH] pack-objects: handle missing objects when excluding promisor objects

From
SJSami Jawhar <sami@theorem.dev>
Date
Nov 28, 2026, 20:10 UTC
Message-ID
<CAOJ8FdcTRUEOJhTnUzX5a4F2H+34PwG_GuXEtW-nO3pY-ULh8Q@mail.gmail.com>
In-Reply-To
<20261027-b4-pks-pack-objects-repack-links-with-missing-objects-v1-1-f50f90651274@pks.im>
On Tue, Oct 27, 2026 at 08:00:28AM +0100, Patrick Steinhardt wrote:
> This bug can trigger in situations where we have e.g. a combination of
> shallow and partial clones, [...]

The BUG occurs with no moved ref, in a depth-2 clone of a merge commit. A CI job in one repository ran this fetch after a depth-2 checkout of a pull request's merge commit:

    set -e
    export GIT_AUTHOR_NAME=t GIT_AUTHOR_EMAIL=t@example.com
    export GIT_COMMITTER_NAME=t GIT_COMMITTER_EMAIL=t@example.com
    cd "$(mktemp -d)"
    git init -q -b main origin
    cd origin
    git config uploadpack.allowFilter true
    echo root >f && git add f && git commit -q -m root
    echo main >f && git commit -q -am main1
    git checkout -q -b side
    echo 1 >s && git add s && git commit -q -m side1
    echo 2 >s && git commit -q -am side2
    git checkout -q main
    git merge -q --no-ff -m merge side
    cd ..
    git clone -q --depth 2 "file://$PWD/origin" clone
    git -C clone fetch --filter=tree:0 --unshallow origin
Exit status of the last command:
    d43b9acb05^                 0
    d43b9acb05                  128, BUG at pack-objects.c:5004
    v2.56.1                     128, BUG at pack-objects.c:5098
    master (acba8bf975)         128, BUG at pack-objects.c:5139
    v2.56.1 with this patch     0, and "git fsck" exits 0
    master with v5 of [1]       0, and "git fsck" exits 0
On v2.56.1 the fetch exits 0 in each of these cases:
  - --filter=blob:none in place of --filter=tree:0
  - no filter
  - side has one commit
  - side forks from root
[1] <pull.2333.v5.git.1795650160536.gitgitgadget@gmail.com>
Tested-by: Sami Jawhar <sami@theorem.dev>
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 6 of 11 in “pack-objects: handle missing objects when excluding promisor objects”
  1. pack-objects: handle missing objects when excluding promisor objectsPatrick Steinhardt, Oct 27, 2026
  2. Mark C. Chu-CarrollOct 27, 2026
  3. Patrick SteinhardtOct 28, 2026
  4. Junio C HamanoOct 28, 2026
  5. Patrick SteinhardtOct 28, 2026
  6. Sami JawharNov 28, 2026
  7. pack-objects: handle missing objects when excluding promisor objectsPatrick Steinhardt, Dec 2, 2026
  8. Junio C HamanoDec 2, 2026
  9. Patrick SteinhardtDec 3, 2026
  10. Patrick SteinhardtDec 3, 2026
  11. ATTILIO ALESSIODec 3, 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.