🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
1 messages
1 total messages Started by Sami Jawhar Sat, 28 Nov 2026 20:10
Re: [PATCH] pack-objects: handle missing objects when excluding promisor objects
#4047
Author: Sami Jawhar
Date: Sat, 28 Nov 2026 20:10
46 lines
13514 bytes
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>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads