{"thread":{"id":"66933","subject":"[PATCH] pack-objects: handle missing promisor objects","startedAt":"2026-11-25T19:40:24Z","lastAt":"2026-11-26T10:48:54Z","messageCount":8,"participants":["Alessio Attilio via GitGitGadget","Junio C Hamano","ATTILIO ALESSIO"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"559394","messageId":"pull.2333.git.1795635624820.gitgitgadget@gmail.com","threadId":"66933","inReplyTo":null,"subject":"[PATCH] pack-objects: handle missing promisor objects","fromName":"Alessio Attilio via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-11-25T19:40:24Z","receivedAt":"2026-11-25T19:40:24Z","isPatch":true,"sender":{"key":"name:Alessio Attilio","avatar":null},"body":"From: Alessio Attilio <attilio.alessio@protonmail.com>\n\nObjects missing from a partial clone are expected to be absent.\nWhen checking whether an object is in a promisor pack, do not BUG()\nif its object info cannot be read. Such an object cannot be included\nin the pack, so skip it.\n\nSigned-off-by: Alessio Attilio <attilio.alessio@protonmail.com>\n---\n    pack-objects: handle missing promisor objects\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2333%2Fkairosci%2Fattilio%2Fpack-objects-missing-promisor-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2333/kairosci/attilio/pack-objects-missing-promisor-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/2333\n\n builtin/pack-objects.c   |  2 +-\n t/t0410-partial-clone.sh | 20 ++++++++++++++++++++\n 2 files changed, 21 insertions(+), 1 deletion(-)\n\ndiff --git a/builtin/pack-objects.c b/builtin/pack-objects.c\nindex 65c2ad9a86..5228d7f90d 100644\n--- a/builtin/pack-objects.c\n+++ b/builtin/pack-objects.c\n@@ -5092,7 +5092,7 @@ static int is_not_in_promisor_pack_obj(struct object *obj, void *data UNUSED)\n \t};\n \n \tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info, 0))\n-\t\tBUG(\"should_include_obj should only be called on existing objects\");\n+\t\treturn 0;\n \treturn source_info.source->type != ODB_SOURCE_PACKED || !source_info.u.packed.pack->pack_promisor;\n }\n \ndiff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh\nindex 788e9a1631..a858aa0a85 100755\n--- a/t/t0410-partial-clone.sh\n+++ b/t/t0410-partial-clone.sh\n@@ -32,6 +32,26 @@ promise_and_delete () {\n \tdelete_object repo \"$HASH\"\n }\n \n+test_expect_success 'fetch --unshallow with tree filter when remote has advanced' '\n+\trm -rf server server.bare client &&\n+\ttest_create_repo server &&\n+\ttest_commit -C server c1 &&\n+\ttest_commit -C server c2 &&\n+\ttest_commit -C server c3 &&\n+\ttest_commit -C server c4 &&\n+\tgit clone --bare server server.bare &&\n+\tgit -C server.bare config uploadpack.allowfilter true &&\n+\tgit -C server.bare config uploadpack.allowanysha1inwant true &&\n+\tgit init client &&\n+\tgit -C client remote add origin \"file://$(pwd)/server.bare\" &&\n+\ttip=$(git -C server rev-parse HEAD~1) &&\n+\tgit -C client fetch --no-tags --depth=1 origin \"+$tip:refs/remotes/origin/master\" &&\n+\tgit -C client checkout -b master refs/remotes/origin/master &&\n+\tgit -C client fetch --no-tags --filter=tree:0 --unshallow origin \\\n+\t\t+refs/heads/master:refs/remotes/origin/master &&\n+\trm -rf server server.bare client\n+'\n+\n test_expect_success 'extensions.partialclone without filter' '\n \ttest_create_repo server &&\n \tgit clone --filter=\"blob:none\" \"file://$(pwd)/server\" client &&\n\nbase-commit: 1630431f326e15fcde608827b5ff38422528eb59\n-- \ngitgitgadget\n\n"},{"id":"559396","messageId":"pull.2333.v2.git.1795636170423.gitgitgadget@gmail.com","threadId":"66933","inReplyTo":"pull.2333.git.1795635624820.gitgitgadget@gmail.com","subject":"[PATCH v2] pack-objects: handle missing promisor objects","fromName":"Alessio Attilio via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-11-25T19:49:30Z","receivedAt":"2026-11-25T19:49:30Z","isPatch":true,"sender":{"key":"name:Alessio Attilio","avatar":null},"body":"From: Alessio Attilio <attilio.alessio@protonmail.com>\n\nObjects missing from a partial clone are expected to be absent.\nWhen checking whether an object is in a promisor pack, do not BUG()\nif its object info cannot be read. Such an object cannot be included\nin the pack, so skip it.\n\nPass OBJECT_INFO_SKIP_FETCH_OBJECT explicitly so the lookup does not\ntrigger a lazy fetch.\n\nTest filtered --unshallow and --deepen fetches, as well as a subsequent\nfetch that repacks links to promisor commits with missing trees.\n\nSigned-off-by: Alessio Attilio <attilio.alessio@protonmail.com>\n---\n    pack-objects: handle missing promisor objects\n    \n    Changes since v1:\n    \n     * Pass OBJECT_INFO_SKIP_FETCH_OBJECT explicitly to avoid lazy fetching\n       during the lookup.\n     * Cover both filtered --unshallow and --deepen fetches, and a later\n       fetch after unshallowing a filtered clone.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2333%2Fkairosci%2Fattilio%2Fpack-objects-missing-promisor-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2333/kairosci/attilio/pack-objects-missing-promisor-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/2333\n\nRange-diff vs v1:\n\n 1:  16a9cac809 ! 1:  a7e378ca3d pack-objects: handle missing promisor objects\n     @@ Commit message\n          if its object info cannot be read. Such an object cannot be included\n          in the pack, so skip it.\n      \n     +    Pass OBJECT_INFO_SKIP_FETCH_OBJECT explicitly so the lookup does not\n     +    trigger a lazy fetch.\n     +\n     +    Test filtered --unshallow and --deepen fetches, as well as a subsequent\n     +    fetch that repacks links to promisor commits with missing trees.\n     +\n          Signed-off-by: Alessio Attilio <attilio.alessio@protonmail.com>\n      \n       ## builtin/pack-objects.c ##\n      @@ builtin/pack-objects.c: static int is_not_in_promisor_pack_obj(struct object *obj, void *data UNUSED)\n     + \t\t.source_infop = &source_info,\n       \t};\n       \n     - \tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info, 0))\n     +-\tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info, 0))\n      -\t\tBUG(\"should_include_obj should only be called on existing objects\");\n     ++\tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info,\n     ++\t\t\t\t\t  OBJECT_INFO_SKIP_FETCH_OBJECT)) {\n     ++\t\t/* Missing; assume it is a promisor object. */\n      +\t\treturn 0;\n     ++\t}\n       \treturn source_info.source->type != ODB_SOURCE_PACKED || !source_info.u.packed.pack->pack_promisor;\n       }\n       \n      \n     - ## t/t0410-partial-clone.sh ##\n     -@@ t/t0410-partial-clone.sh: promise_and_delete () {\n     - \tdelete_object repo \"$HASH\"\n     - }\n     + ## t/t5616-partial-clone.sh ##\n     +@@ t/t5616-partial-clone.sh: test_expect_success 'after fetching descendants of non-promisor commits, gc work\n     + \tgit -C partial gc --prune=now\n     + '\n       \n     -+test_expect_success 'fetch --unshallow with tree filter when remote has advanced' '\n     -+\trm -rf server server.bare client &&\n     -+\ttest_create_repo server &&\n     -+\ttest_commit -C server c1 &&\n     -+\ttest_commit -C server c2 &&\n     -+\ttest_commit -C server c3 &&\n     -+\ttest_commit -C server c4 &&\n     -+\tgit clone --bare server server.bare &&\n     -+\tgit -C server.bare config uploadpack.allowfilter true &&\n     -+\tgit -C server.bare config uploadpack.allowanysha1inwant true &&\n     -+\tgit init client &&\n     -+\tgit -C client remote add origin \"file://$(pwd)/server.bare\" &&\n     -+\ttip=$(git -C server rev-parse HEAD~1) &&\n     -+\tgit -C client fetch --no-tags --depth=1 origin \"+$tip:refs/remotes/origin/master\" &&\n     -+\tgit -C client checkout -b master refs/remotes/origin/master &&\n     -+\tgit -C client fetch --no-tags --filter=tree:0 --unshallow origin \\\n     -+\t\t+refs/heads/master:refs/remotes/origin/master &&\n     -+\trm -rf server server.bare client\n     ++for opt in --unshallow --deepen=1\n     ++do\n     ++\ttest_expect_success \"filtered fetch $opt of a moved ref repacks local links\" '\n     ++\t\ttest_when_finished \"rm -rf source target\" &&\n     ++\n     ++\t\tgit init source &&\n     ++\t\ttest_commit_bulk -C source 4 &&\n     ++\t\tgit -C source config uploadpack.allowFilter true &&\n     ++\t\tgit -C source config uploadpack.allowAnySHA1InWant true &&\n     ++\t\tCOMMIT=$(git -C source rev-parse main~1) &&\n     ++\n     ++\t\tgit init target &&\n     ++\t\tgit -C target remote add origin \"file://$(pwd)/source\" &&\n     ++\t\tgit -C target fetch --no-tags --depth=1 origin \"+$COMMIT:refs/remotes/origin/main\" &&\n     ++\n     ++\t\t# The fetched pack has the new tip whose parent is the local shallow\n     ++\t\t# tip, so index-pack repacks it into a promisor pack. That process\n     ++\t\t# inherits the shallow file and walks into promisor commits whose\n     ++\t\t# trees do not exist.\n     ++\t\tgit -C target fetch --no-tags --filter=tree:0 \"$opt\" origin \\\n     ++\t\t\t+refs/heads/main:refs/remotes/origin/main &&\n     ++\t\tgit -C target rev-parse --verify refs/remotes/origin/main >actual &&\n     ++\t\tgit -C source rev-parse --verify refs/heads/main >expect &&\n     ++\t\ttest_cmp expect actual &&\n     ++\t\tgit -C target fsck\n     ++\t'\n     ++done\n     ++\n     ++test_expect_success 'repacking local links tolerates missing trees of promisor commits' '\n     ++\ttest_when_finished \"rm -rf source target\" &&\n     ++\n     ++\tgit init source &&\n     ++\ttest_commit_bulk -C source 4 &&\n     ++\tgit -C source config uploadpack.allowFilter true &&\n     ++\tgit -C source config uploadpack.allowAnySHA1InWant true &&\n     ++\tCOMMIT=$(git -C source rev-parse main~1) &&\n     ++\n     ++\t# Fetch a single commit as a non-promisor object, then unshallow it\n     ++\t# with a filter that omits trees. The commits below the former\n     ++\t# shallow boundary are now promisor objects whose trees are missing.\n     ++\tgit init target &&\n     ++\tgit -C target remote add origin \"file://$(pwd)/source\" &&\n     ++\tgit -C target fetch --no-tags --depth=1 origin \"+$COMMIT:refs/remotes/origin/main\" &&\n     ++\tgit -C target fetch --no-tags --filter=tree:0 --unshallow origin \\\n     ++\t\t\"+$COMMIT:refs/remotes/origin/main\" &&\n     ++\ttest_path_is_missing target/.git/shallow &&\n     ++\n     ++\t# Fetching a descendant of the local non-promisor commit causes\n     ++\t# index-pack to repack that commit into a promisor pack. The revision\n     ++\t# walk must not die when it reaches the missing trees of promisor commits.\n     ++\tgit -C target fetch --no-tags --filter=tree:0 origin \\\n     ++\t\t+refs/heads/main:refs/remotes/origin/main &&\n     ++\tgit -C target rev-parse --verify refs/remotes/origin/main &&\n     ++\tgit -C target fsck\n      +'\n      +\n     - test_expect_success 'extensions.partialclone without filter' '\n     - \ttest_create_repo server &&\n     - \tgit clone --filter=\"blob:none\" \"file://$(pwd)/server\" client &&\n     + \n     + . \"$TEST_DIRECTORY\"/lib-httpd.sh\n     + start_httpd\n\n\n builtin/pack-objects.c   |  7 +++--\n t/t5616-partial-clone.sh | 56 ++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 61 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/pack-objects.c b/builtin/pack-objects.c\nindex 65c2ad9a86..0b40b23b33 100644\n--- a/builtin/pack-objects.c\n+++ b/builtin/pack-objects.c\n@@ -5091,8 +5091,11 @@ static int is_not_in_promisor_pack_obj(struct object *obj, void *data UNUSED)\n \t\t.source_infop = &source_info,\n \t};\n \n-\tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info, 0))\n-\t\tBUG(\"should_include_obj should only be called on existing objects\");\n+\tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info,\n+\t\t\t\t\t  OBJECT_INFO_SKIP_FETCH_OBJECT)) {\n+\t\t/* Missing; assume it is a promisor object. */\n+\t\treturn 0;\n+\t}\n \treturn source_info.source->type != ODB_SOURCE_PACKED || !source_info.u.packed.pack->pack_promisor;\n }\n \ndiff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh\nindex 7cc6f58a31..bee6261411 100755\n--- a/t/t5616-partial-clone.sh\n+++ b/t/t5616-partial-clone.sh\n@@ -747,6 +747,62 @@ test_expect_success 'after fetching descendants of non-promisor commits, gc work\n \tgit -C partial gc --prune=now\n '\n \n+for opt in --unshallow --deepen=1\n+do\n+\ttest_expect_success \"filtered fetch $opt of a moved ref repacks local links\" '\n+\t\ttest_when_finished \"rm -rf source target\" &&\n+\n+\t\tgit init source &&\n+\t\ttest_commit_bulk -C source 4 &&\n+\t\tgit -C source config uploadpack.allowFilter true &&\n+\t\tgit -C source config uploadpack.allowAnySHA1InWant true &&\n+\t\tCOMMIT=$(git -C source rev-parse main~1) &&\n+\n+\t\tgit init target &&\n+\t\tgit -C target remote add origin \"file://$(pwd)/source\" &&\n+\t\tgit -C target fetch --no-tags --depth=1 origin \"+$COMMIT:refs/remotes/origin/main\" &&\n+\n+\t\t# The fetched pack has the new tip whose parent is the local shallow\n+\t\t# tip, so index-pack repacks it into a promisor pack. That process\n+\t\t# inherits the shallow file and walks into promisor commits whose\n+\t\t# trees do not exist.\n+\t\tgit -C target fetch --no-tags --filter=tree:0 \"$opt\" origin \\\n+\t\t\t+refs/heads/main:refs/remotes/origin/main &&\n+\t\tgit -C target rev-parse --verify refs/remotes/origin/main >actual &&\n+\t\tgit -C source rev-parse --verify refs/heads/main >expect &&\n+\t\ttest_cmp expect actual &&\n+\t\tgit -C target fsck\n+\t'\n+done\n+\n+test_expect_success 'repacking local links tolerates missing trees of promisor commits' '\n+\ttest_when_finished \"rm -rf source target\" &&\n+\n+\tgit init source &&\n+\ttest_commit_bulk -C source 4 &&\n+\tgit -C source config uploadpack.allowFilter true &&\n+\tgit -C source config uploadpack.allowAnySHA1InWant true &&\n+\tCOMMIT=$(git -C source rev-parse main~1) &&\n+\n+\t# Fetch a single commit as a non-promisor object, then unshallow it\n+\t# with a filter that omits trees. The commits below the former\n+\t# shallow boundary are now promisor objects whose trees are missing.\n+\tgit init target &&\n+\tgit -C target remote add origin \"file://$(pwd)/source\" &&\n+\tgit -C target fetch --no-tags --depth=1 origin \"+$COMMIT:refs/remotes/origin/main\" &&\n+\tgit -C target fetch --no-tags --filter=tree:0 --unshallow origin \\\n+\t\t\"+$COMMIT:refs/remotes/origin/main\" &&\n+\ttest_path_is_missing target/.git/shallow &&\n+\n+\t# Fetching a descendant of the local non-promisor commit causes\n+\t# index-pack to repack that commit into a promisor pack. The revision\n+\t# walk must not die when it reaches the missing trees of promisor commits.\n+\tgit -C target fetch --no-tags --filter=tree:0 origin \\\n+\t\t+refs/heads/main:refs/remotes/origin/main &&\n+\tgit -C target rev-parse --verify refs/remotes/origin/main &&\n+\tgit -C target fsck\n+'\n+\n \n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\n\nbase-commit: 1630431f326e15fcde608827b5ff38422528eb59\n-- \ngitgitgadget\n\n"},{"id":"559418","messageId":"xmqqzeuwwmt1.fsf@gitster.g","threadId":"66933","inReplyTo":"pull.2333.v2.git.1795636170423.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] pack-objects: handle missing promisor objects","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-11-25T22:47:38Z","receivedAt":"2026-11-25T22:47:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Alessio Attilio via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Alessio Attilio <attilio.alessio@protonmail.com>\n>\n> Objects missing from a partial clone are expected to be absent.\n> When checking whether an object is in a promisor pack, do not BUG()\n> if its object info cannot be read. Such an object cannot be included\n> in the pack, so skip it.\n>\n> Pass OBJECT_INFO_SKIP_FETCH_OBJECT explicitly so the lookup does not\n> trigger a lazy fetch.\n>\n> Test filtered --unshallow and --deepen fetches, as well as a subsequent\n> fetch that repacks links to promisor commits with missing trees.\n\nWhat is missing from the above is when this loose assumption is\nactivated and why it is safe to \"assume it is a promisor object\" without\nactually validating.  To help that, I would imagine that starting the\ndescription by stepping back further and describe what the end user\nwould does to trigger the code path and what the effects visible to the\nend user is that comes from the affected code paths.  Such a descriptoin\nmay start like this, perhaps (I do not claim what you are trying to fix,\nso it may be way off---take it as a way to explain why a good commit log\nmessage is important by demonstrating what kind of misunderstanding can\nresult if the message is not written clearly ;-):\n\n    If you try \"git repack\" in a partial clone, it may try to fetch\n    objects from the promisor remote when it tries see if they are\n    not packed (and needs packing), and ...\n\n> diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c\n> index 65c2ad9a86..0b40b23b33 100644\n> --- a/builtin/pack-objects.c\n> +++ b/builtin/pack-objects.c\n> @@ -5091,8 +5091,11 @@ static int is_not_in_promisor_pack_obj(struct object *obj, void *data UNUSED)\n>  \t\t.source_infop = &source_info,\n>  \t};\n>  \n> -\tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info, 0))\n> -\t\tBUG(\"should_include_obj should only be called on existing objects\");\n> +\tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info,\n> +\t\t\t\t\t  OBJECT_INFO_SKIP_FETCH_OBJECT)) {\n> +\t\t/* Missing; assume it is a promisor object. */\n> +\t\treturn 0;\n> +\t}\n>  \treturn source_info.source->type != ODB_SOURCE_PACKED || !source_info.u.packed.pack->pack_promisor;\n>  }\n\nThis function is called only when pack-objects is run with the\n(undocumented) \"--exclude-promisor-objects-best-effort\" option that was\nintroduced by c08589efdc (index-pack: repack local links into promisor\npacks, 2024-11-01), and it is given only when index-pack is running with\nthe \"--promisor\" option.  In a repository that is not a lazy clone, such\na loose assumption will not get in the picture, which may be what makes\nthis change less risky.\n\nIt is also something worth documenting in the commit log message.\n\nWhenever you write \"assume X\" in an in-code comment, you should be\ncareful to say why making such an assumption is safe, and what the\nimplications are when the assumption turns out to be incorrect.\n\nThanks.\n\n"},{"id":"559419","messageId":"pull.2333.v3.git.1795648282594.gitgitgadget@gmail.com","threadId":"66933","inReplyTo":"pull.2333.git.1795635624820.gitgitgadget@gmail.com","subject":"[PATCH v3] pack-objects: handle missing promisor objects","fromName":"Alessio Attilio via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-11-25T23:11:22Z","receivedAt":"2026-11-25T23:11:22Z","isPatch":true,"sender":{"key":"name:Alessio Attilio","avatar":null},"body":"From: Alessio Attilio <attilio.alessio@protonmail.com>\n\nObjects missing from a partial clone are expected to be absent.\nWhen checking whether an object is in a promisor pack, do not BUG()\nif its object info cannot be read. Such an object cannot be included\nin the pack, so skip it.\n\nPass OBJECT_INFO_SKIP_FETCH_OBJECT explicitly so the lookup does not\ntrigger a lazy fetch.\n\nTest filtered --unshallow and --deepen fetches, as well as a subsequent\nfetch that repacks links to promisor commits with missing trees.\n\nSigned-off-by: Alessio Attilio <attilio.alessio@protonmail.com>\n---\n    pack-objects: handle missing promisor objects\n    \n    Changes since v1:\n    \n     * Pass OBJECT_INFO_SKIP_FETCH_OBJECT explicitly to avoid lazy fetching\n       during the lookup.\n     * Cover filtered --unshallow and --deepen fetches, and a later fetch\n       after unshallowing a filtered clone.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2333%2Fkairosci%2Fattilio%2Fpack-objects-missing-promisor-v3\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2333/kairosci/attilio/pack-objects-missing-promisor-v3\nPull-Request: https://github.com/gitgitgadget/git/pull/2333\n\nRange-diff vs v2:\n\n 1:  a7e378ca3d ! 1:  cbe2fc475c pack-objects: handle missing promisor objects\n     @@ builtin/pack-objects.c: static int is_not_in_promisor_pack_obj(struct object *ob\n       \n      \n       ## t/t5616-partial-clone.sh ##\n     -@@ t/t5616-partial-clone.sh: test_expect_success 'after fetching descendants of non-promisor commits, gc work\n     - \tgit -C partial gc --prune=now\n     +@@ t/t5616-partial-clone.sh: test_expect_success 'merge does not lazy-fetch locally written objects' '\n     + \tdone &&\n     + \ttest_cmp server/only-in-C client/only-in-C\n       '\n     - \n      +for opt in --unshallow --deepen=1\n      +do\n      +\ttest_expect_success \"filtered fetch $opt of a moved ref repacks local links\" '\n     @@ t/t5616-partial-clone.sh: test_expect_success 'after fetching descendants of non\n      +\tgit -C target rev-parse --verify refs/remotes/origin/main &&\n      +\tgit -C target fsck\n      +'\n     -+\n       \n       . \"$TEST_DIRECTORY\"/lib-httpd.sh\n       start_httpd\n\n\n builtin/pack-objects.c   |  7 +++--\n t/t5616-partial-clone.sh | 55 ++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 60 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/pack-objects.c b/builtin/pack-objects.c\nindex 87c3102e62..371f16c59b 100644\n--- a/builtin/pack-objects.c\n+++ b/builtin/pack-objects.c\n@@ -5135,8 +5135,11 @@ static int is_not_in_promisor_pack_obj(struct object *obj, void *data UNUSED)\n \t\t.source_infop = &source_info,\n \t};\n \n-\tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info, 0))\n-\t\tBUG(\"should_include_obj should only be called on existing objects\");\n+\tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info,\n+\t\t\t\t\t  OBJECT_INFO_SKIP_FETCH_OBJECT)) {\n+\t\t/* Missing; assume it is a promisor object. */\n+\t\treturn 0;\n+\t}\n \treturn source_info.source->type != ODB_SOURCE_PACKED || !source_info.u.packed.pack->pack_promisor;\n }\n \ndiff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh\nindex 9636652362..44ce9a1ee8 100755\n--- a/t/t5616-partial-clone.sh\n+++ b/t/t5616-partial-clone.sh\n@@ -790,6 +790,61 @@ test_expect_success 'merge does not lazy-fetch locally written objects' '\n \tdone &&\n \ttest_cmp server/only-in-C client/only-in-C\n '\n+for opt in --unshallow --deepen=1\n+do\n+\ttest_expect_success \"filtered fetch $opt of a moved ref repacks local links\" '\n+\t\ttest_when_finished \"rm -rf source target\" &&\n+\n+\t\tgit init source &&\n+\t\ttest_commit_bulk -C source 4 &&\n+\t\tgit -C source config uploadpack.allowFilter true &&\n+\t\tgit -C source config uploadpack.allowAnySHA1InWant true &&\n+\t\tCOMMIT=$(git -C source rev-parse main~1) &&\n+\n+\t\tgit init target &&\n+\t\tgit -C target remote add origin \"file://$(pwd)/source\" &&\n+\t\tgit -C target fetch --no-tags --depth=1 origin \"+$COMMIT:refs/remotes/origin/main\" &&\n+\n+\t\t# The fetched pack has the new tip whose parent is the local shallow\n+\t\t# tip, so index-pack repacks it into a promisor pack. That process\n+\t\t# inherits the shallow file and walks into promisor commits whose\n+\t\t# trees do not exist.\n+\t\tgit -C target fetch --no-tags --filter=tree:0 \"$opt\" origin \\\n+\t\t\t+refs/heads/main:refs/remotes/origin/main &&\n+\t\tgit -C target rev-parse --verify refs/remotes/origin/main >actual &&\n+\t\tgit -C source rev-parse --verify refs/heads/main >expect &&\n+\t\ttest_cmp expect actual &&\n+\t\tgit -C target fsck\n+\t'\n+done\n+\n+test_expect_success 'repacking local links tolerates missing trees of promisor commits' '\n+\ttest_when_finished \"rm -rf source target\" &&\n+\n+\tgit init source &&\n+\ttest_commit_bulk -C source 4 &&\n+\tgit -C source config uploadpack.allowFilter true &&\n+\tgit -C source config uploadpack.allowAnySHA1InWant true &&\n+\tCOMMIT=$(git -C source rev-parse main~1) &&\n+\n+\t# Fetch a single commit as a non-promisor object, then unshallow it\n+\t# with a filter that omits trees. The commits below the former\n+\t# shallow boundary are now promisor objects whose trees are missing.\n+\tgit init target &&\n+\tgit -C target remote add origin \"file://$(pwd)/source\" &&\n+\tgit -C target fetch --no-tags --depth=1 origin \"+$COMMIT:refs/remotes/origin/main\" &&\n+\tgit -C target fetch --no-tags --filter=tree:0 --unshallow origin \\\n+\t\t\"+$COMMIT:refs/remotes/origin/main\" &&\n+\ttest_path_is_missing target/.git/shallow &&\n+\n+\t# Fetching a descendant of the local non-promisor commit causes\n+\t# index-pack to repack that commit into a promisor pack. The revision\n+\t# walk must not die when it reaches the missing trees of promisor commits.\n+\tgit -C target fetch --no-tags --filter=tree:0 origin \\\n+\t\t+refs/heads/main:refs/remotes/origin/main &&\n+\tgit -C target rev-parse --verify refs/remotes/origin/main &&\n+\tgit -C target fsck\n+'\n \n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\n\nbase-commit: acba8bf9753134d9bde89f94369f775838a8c5fe\n-- \ngitgitgadget\n\n"},{"id":"559420","messageId":"pull.2333.v4.git.1795648951606.gitgitgadget@gmail.com","threadId":"66933","inReplyTo":"pull.2333.git.1795635624820.gitgitgadget@gmail.com","subject":"[PATCH v4] pack-objects: handle missing promisor objects","fromName":"Alessio Attilio via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-11-25T23:22:31Z","receivedAt":"2026-11-25T23:22:31Z","isPatch":true,"sender":{"key":"name:Alessio Attilio","avatar":null},"body":"From: Alessio Attilio <attilio.alessio@protonmail.com>\n\nDuring a filtered fetch in a partial clone, index-pack --promisor\nre-packs local links from the incoming pack into promisor packs. It\ninvokes pack-objects with --exclude-promisor-objects-best-effort to\nskip links already stored in promisor packs. After a filtered\n--unshallow or --deepen, this walk can encounter a promisor commit\nwhose tree is missing. The object-info lookup then hits a BUG and the\nfetch fails.\n\nDo not lazy-fetch while checking these links: this is a best-effort\nrepack, not a request to retrieve missing objects. If the object is\nmissing, pack-objects cannot include it, so treat it like an object\nalready in a promisor pack and continue. This callback is used only by\nthe best-effort repack started for an incoming promisor pack, whose\noutput is itself marked promisor. If the missing object was not\nactually promised, this still cannot discard available data; the\nobject was already absent and any later access would fail unless the\npromisor remote can provide it.\n\nTest filtered --unshallow and --deepen fetches, as well as a subsequent\nfetch that repacks links to promisor commits with missing trees.\n\nSigned-off-by: Alessio Attilio <attilio.alessio@protonmail.com>\n---\n    pack-objects: handle missing promisor objects\n    \n    Changes since v1:\n    \n     * Pass OBJECT_INFO_SKIP_FETCH_OBJECT explicitly to avoid lazy fetching\n       during the lookup.\n     * Cover filtered --unshallow and --deepen fetches, and a later fetch\n       after unshallowing a filtered clone.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2333%2Fkairosci%2Fattilio%2Fpack-objects-missing-promisor-v4\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2333/kairosci/attilio/pack-objects-missing-promisor-v4\nPull-Request: https://github.com/gitgitgadget/git/pull/2333\n\nRange-diff vs v3:\n\n 1:  cbe2fc475c ! 1:  b2112b07dd pack-objects: handle missing promisor objects\n     @@ Metadata\n       ## Commit message ##\n          pack-objects: handle missing promisor objects\n      \n     -    Objects missing from a partial clone are expected to be absent.\n     -    When checking whether an object is in a promisor pack, do not BUG()\n     -    if its object info cannot be read. Such an object cannot be included\n     -    in the pack, so skip it.\n     +    During a filtered fetch in a partial clone, index-pack --promisor\n     +    re-packs local links from the incoming pack into promisor packs. It\n     +    invokes pack-objects with --exclude-promisor-objects-best-effort to\n     +    skip links already stored in promisor packs. After a filtered\n     +    --unshallow or --deepen, this walk can encounter a promisor commit\n     +    whose tree is missing. The object-info lookup then hits a BUG and the\n     +    fetch fails.\n      \n     -    Pass OBJECT_INFO_SKIP_FETCH_OBJECT explicitly so the lookup does not\n     -    trigger a lazy fetch.\n     +    Do not lazy-fetch while checking these links: this is a best-effort\n     +    repack, not a request to retrieve missing objects. If the object is\n     +    missing, pack-objects cannot include it, so treat it like an object\n     +    already in a promisor pack and continue. This callback is used only by\n     +    the best-effort repack started for an incoming promisor pack, whose\n     +    output is itself marked promisor. If the missing object was not\n     +    actually promised, this still cannot discard available data; the\n     +    object was already absent and any later access would fail unless the\n     +    promisor remote can provide it.\n      \n          Test filtered --unshallow and --deepen fetches, as well as a subsequent\n          fetch that repacks links to promisor commits with missing trees.\n\n\n builtin/pack-objects.c   |  7 +++--\n t/t5616-partial-clone.sh | 55 ++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 60 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/pack-objects.c b/builtin/pack-objects.c\nindex 87c3102e62..371f16c59b 100644\n--- a/builtin/pack-objects.c\n+++ b/builtin/pack-objects.c\n@@ -5135,8 +5135,11 @@ static int is_not_in_promisor_pack_obj(struct object *obj, void *data UNUSED)\n \t\t.source_infop = &source_info,\n \t};\n \n-\tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info, 0))\n-\t\tBUG(\"should_include_obj should only be called on existing objects\");\n+\tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info,\n+\t\t\t\t\t  OBJECT_INFO_SKIP_FETCH_OBJECT)) {\n+\t\t/* Missing; assume it is a promisor object. */\n+\t\treturn 0;\n+\t}\n \treturn source_info.source->type != ODB_SOURCE_PACKED || !source_info.u.packed.pack->pack_promisor;\n }\n \ndiff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh\nindex 9636652362..44ce9a1ee8 100755\n--- a/t/t5616-partial-clone.sh\n+++ b/t/t5616-partial-clone.sh\n@@ -790,6 +790,61 @@ test_expect_success 'merge does not lazy-fetch locally written objects' '\n \tdone &&\n \ttest_cmp server/only-in-C client/only-in-C\n '\n+for opt in --unshallow --deepen=1\n+do\n+\ttest_expect_success \"filtered fetch $opt of a moved ref repacks local links\" '\n+\t\ttest_when_finished \"rm -rf source target\" &&\n+\n+\t\tgit init source &&\n+\t\ttest_commit_bulk -C source 4 &&\n+\t\tgit -C source config uploadpack.allowFilter true &&\n+\t\tgit -C source config uploadpack.allowAnySHA1InWant true &&\n+\t\tCOMMIT=$(git -C source rev-parse main~1) &&\n+\n+\t\tgit init target &&\n+\t\tgit -C target remote add origin \"file://$(pwd)/source\" &&\n+\t\tgit -C target fetch --no-tags --depth=1 origin \"+$COMMIT:refs/remotes/origin/main\" &&\n+\n+\t\t# The fetched pack has the new tip whose parent is the local shallow\n+\t\t# tip, so index-pack repacks it into a promisor pack. That process\n+\t\t# inherits the shallow file and walks into promisor commits whose\n+\t\t# trees do not exist.\n+\t\tgit -C target fetch --no-tags --filter=tree:0 \"$opt\" origin \\\n+\t\t\t+refs/heads/main:refs/remotes/origin/main &&\n+\t\tgit -C target rev-parse --verify refs/remotes/origin/main >actual &&\n+\t\tgit -C source rev-parse --verify refs/heads/main >expect &&\n+\t\ttest_cmp expect actual &&\n+\t\tgit -C target fsck\n+\t'\n+done\n+\n+test_expect_success 'repacking local links tolerates missing trees of promisor commits' '\n+\ttest_when_finished \"rm -rf source target\" &&\n+\n+\tgit init source &&\n+\ttest_commit_bulk -C source 4 &&\n+\tgit -C source config uploadpack.allowFilter true &&\n+\tgit -C source config uploadpack.allowAnySHA1InWant true &&\n+\tCOMMIT=$(git -C source rev-parse main~1) &&\n+\n+\t# Fetch a single commit as a non-promisor object, then unshallow it\n+\t# with a filter that omits trees. The commits below the former\n+\t# shallow boundary are now promisor objects whose trees are missing.\n+\tgit init target &&\n+\tgit -C target remote add origin \"file://$(pwd)/source\" &&\n+\tgit -C target fetch --no-tags --depth=1 origin \"+$COMMIT:refs/remotes/origin/main\" &&\n+\tgit -C target fetch --no-tags --filter=tree:0 --unshallow origin \\\n+\t\t\"+$COMMIT:refs/remotes/origin/main\" &&\n+\ttest_path_is_missing target/.git/shallow &&\n+\n+\t# Fetching a descendant of the local non-promisor commit causes\n+\t# index-pack to repack that commit into a promisor pack. The revision\n+\t# walk must not die when it reaches the missing trees of promisor commits.\n+\tgit -C target fetch --no-tags --filter=tree:0 origin \\\n+\t\t+refs/heads/main:refs/remotes/origin/main &&\n+\tgit -C target rev-parse --verify refs/remotes/origin/main &&\n+\tgit -C target fsck\n+'\n \n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\n\nbase-commit: acba8bf9753134d9bde89f94369f775838a8c5fe\n-- \ngitgitgadget\n\n"},{"id":"559422","messageId":"pull.2333.v5.git.1795650160536.gitgitgadget@gmail.com","threadId":"66933","inReplyTo":"pull.2333.git.1795635624820.gitgitgadget@gmail.com","subject":"[PATCH v5] pack-objects: handle missing promisor objects","fromName":"Alessio Attilio via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-11-25T23:42:40Z","receivedAt":"2026-11-25T23:42:40Z","isPatch":true,"sender":{"key":"name:Alessio Attilio","avatar":null},"body":"From: Alessio Attilio <attilio.alessio@protonmail.com>\n\nDuring a filtered fetch in a partial clone, index-pack --promisor\nrepacks local links from the incoming pack into promisor packs. It\ninvokes pack-objects with --exclude-promisor-objects-best-effort to\nskip links already stored in promisor packs. After a filtered\n--unshallow or --deepen, this walk can encounter a promisor commit\nwhose tree is missing. The object-info lookup then hits a BUG and the\nfetch fails.\n\nDo not lazy-fetch while checking these links: this is a best-effort\nrepack, not a request to retrieve missing objects. If the object is\nmissing, pack-objects cannot include it, so treat it like an object\nalready in a promisor pack and continue. This callback is used only by\nthe best-effort repack started for an incoming promisor pack, whose\noutput is itself marked promisor. If the missing object was not\nactually promised, this still cannot discard available data; the\nobject was already absent and any later access would fail unless the\npromisor remote can provide it.\n\nTest filtered --unshallow and --deepen fetches, as well as a subsequent\nfetch that repacks links to promisor commits with missing trees.\n\nSigned-off-by: Alessio Attilio <attilio.alessio@protonmail.com>\n---\n    pack-objects: handle missing promisor objects\n    \n    Changes since v1:\n    \n     * Pass OBJECT_INFO_SKIP_FETCH_OBJECT explicitly to avoid lazy fetching\n       during the lookup.\n     * Cover filtered --unshallow and --deepen fetches, and a later fetch\n       after unshallowing a filtered clone.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2333%2Fkairosci%2Fattilio%2Fpack-objects-missing-promisor-v5\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2333/kairosci/attilio/pack-objects-missing-promisor-v5\nPull-Request: https://github.com/gitgitgadget/git/pull/2333\n\nRange-diff vs v4:\n\n 1:  b2112b07dd ! 1:  1129e6a3a6 pack-objects: handle missing promisor objects\n     @@ Commit message\n          pack-objects: handle missing promisor objects\n      \n          During a filtered fetch in a partial clone, index-pack --promisor\n     -    re-packs local links from the incoming pack into promisor packs. It\n     +    repacks local links from the incoming pack into promisor packs. It\n          invokes pack-objects with --exclude-promisor-objects-best-effort to\n          skip links already stored in promisor packs. After a filtered\n          --unshallow or --deepen, this walk can encounter a promisor commit\n     @@ builtin/pack-objects.c: static int is_not_in_promisor_pack_obj(struct object *ob\n      -\t\tBUG(\"should_include_obj should only be called on existing objects\");\n      +\tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info,\n      +\t\t\t\t\t  OBJECT_INFO_SKIP_FETCH_OBJECT)) {\n     -+\t\t/* Missing; assume it is a promisor object. */\n     ++\t\t/*\n     ++\t\t * This is the best-effort pass that repacks local links from an\n     ++\t\t * incoming promisor pack. A missing object cannot be packed, so\n     ++\t\t * skip it. If it was not promised, its data was already absent;\n     ++\t\t * later access still needs a remote to provide it.\n     ++\t\t */\n      +\t\treturn 0;\n      +\t}\n       \treturn source_info.source->type != ODB_SOURCE_PACKED || !source_info.u.packed.pack->pack_promisor;\n\n\n builtin/pack-objects.c   | 12 +++++++--\n t/t5616-partial-clone.sh | 55 ++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 65 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/pack-objects.c b/builtin/pack-objects.c\nindex 87c3102e62..713d6d970b 100644\n--- a/builtin/pack-objects.c\n+++ b/builtin/pack-objects.c\n@@ -5135,8 +5135,16 @@ static int is_not_in_promisor_pack_obj(struct object *obj, void *data UNUSED)\n \t\t.source_infop = &source_info,\n \t};\n \n-\tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info, 0))\n-\t\tBUG(\"should_include_obj should only be called on existing objects\");\n+\tif (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info,\n+\t\t\t\t\t  OBJECT_INFO_SKIP_FETCH_OBJECT)) {\n+\t\t/*\n+\t\t * This is the best-effort pass that repacks local links from an\n+\t\t * incoming promisor pack. A missing object cannot be packed, so\n+\t\t * skip it. If it was not promised, its data was already absent;\n+\t\t * later access still needs a remote to provide it.\n+\t\t */\n+\t\treturn 0;\n+\t}\n \treturn source_info.source->type != ODB_SOURCE_PACKED || !source_info.u.packed.pack->pack_promisor;\n }\n \ndiff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh\nindex 9636652362..44ce9a1ee8 100755\n--- a/t/t5616-partial-clone.sh\n+++ b/t/t5616-partial-clone.sh\n@@ -790,6 +790,61 @@ test_expect_success 'merge does not lazy-fetch locally written objects' '\n \tdone &&\n \ttest_cmp server/only-in-C client/only-in-C\n '\n+for opt in --unshallow --deepen=1\n+do\n+\ttest_expect_success \"filtered fetch $opt of a moved ref repacks local links\" '\n+\t\ttest_when_finished \"rm -rf source target\" &&\n+\n+\t\tgit init source &&\n+\t\ttest_commit_bulk -C source 4 &&\n+\t\tgit -C source config uploadpack.allowFilter true &&\n+\t\tgit -C source config uploadpack.allowAnySHA1InWant true &&\n+\t\tCOMMIT=$(git -C source rev-parse main~1) &&\n+\n+\t\tgit init target &&\n+\t\tgit -C target remote add origin \"file://$(pwd)/source\" &&\n+\t\tgit -C target fetch --no-tags --depth=1 origin \"+$COMMIT:refs/remotes/origin/main\" &&\n+\n+\t\t# The fetched pack has the new tip whose parent is the local shallow\n+\t\t# tip, so index-pack repacks it into a promisor pack. That process\n+\t\t# inherits the shallow file and walks into promisor commits whose\n+\t\t# trees do not exist.\n+\t\tgit -C target fetch --no-tags --filter=tree:0 \"$opt\" origin \\\n+\t\t\t+refs/heads/main:refs/remotes/origin/main &&\n+\t\tgit -C target rev-parse --verify refs/remotes/origin/main >actual &&\n+\t\tgit -C source rev-parse --verify refs/heads/main >expect &&\n+\t\ttest_cmp expect actual &&\n+\t\tgit -C target fsck\n+\t'\n+done\n+\n+test_expect_success 'repacking local links tolerates missing trees of promisor commits' '\n+\ttest_when_finished \"rm -rf source target\" &&\n+\n+\tgit init source &&\n+\ttest_commit_bulk -C source 4 &&\n+\tgit -C source config uploadpack.allowFilter true &&\n+\tgit -C source config uploadpack.allowAnySHA1InWant true &&\n+\tCOMMIT=$(git -C source rev-parse main~1) &&\n+\n+\t# Fetch a single commit as a non-promisor object, then unshallow it\n+\t# with a filter that omits trees. The commits below the former\n+\t# shallow boundary are now promisor objects whose trees are missing.\n+\tgit init target &&\n+\tgit -C target remote add origin \"file://$(pwd)/source\" &&\n+\tgit -C target fetch --no-tags --depth=1 origin \"+$COMMIT:refs/remotes/origin/main\" &&\n+\tgit -C target fetch --no-tags --filter=tree:0 --unshallow origin \\\n+\t\t\"+$COMMIT:refs/remotes/origin/main\" &&\n+\ttest_path_is_missing target/.git/shallow &&\n+\n+\t# Fetching a descendant of the local non-promisor commit causes\n+\t# index-pack to repack that commit into a promisor pack. The revision\n+\t# walk must not die when it reaches the missing trees of promisor commits.\n+\tgit -C target fetch --no-tags --filter=tree:0 origin \\\n+\t\t+refs/heads/main:refs/remotes/origin/main &&\n+\tgit -C target rev-parse --verify refs/remotes/origin/main &&\n+\tgit -C target fsck\n+'\n \n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\n\nbase-commit: acba8bf9753134d9bde89f94369f775838a8c5fe\n-- \ngitgitgadget\n\n"},{"id":"559426","messageId":"xmqqpkvsv1mi.fsf@gitster.g","threadId":"66933","inReplyTo":"pull.2333.v3.git.1795648282594.gitgitgadget@gmail.com","subject":"Re: [PATCH v3] pack-objects: handle missing promisor objects","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-11-26T01:10:29Z","receivedAt":"2026-11-26T01:10:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Alessio Attilio via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Alessio Attilio <attilio.alessio@protonmail.com>\n>\n> Objects missing from a partial clone are expected to be absent.\n> When checking whether an object is in a promisor pack, do not BUG()\n> if its object info cannot be read. Such an object cannot be included\n> in the pack, so skip it.\n>\n> Pass OBJECT_INFO_SKIP_FETCH_OBJECT explicitly so the lookup does not\n> trigger a lazy fetch.\n>\n> Test filtered --unshallow and --deepen fetches, as well as a subsequent\n> fetch that repacks links to promisor commits with missing trees.\n>\n> Signed-off-by: Alessio Attilio <attilio.alessio@protonmail.com>\n> ---\n>     pack-objects: handle missing promisor objects\n>     \n>     Changes since v1:\n>     \n>      * Pass OBJECT_INFO_SKIP_FETCH_OBJECT explicitly to avoid lazy fetching\n>        during the lookup.\n>      * Cover filtered --unshallow and --deepen fetches, and a later fetch\n>        after unshallowing a filtered clone.\n\nHere is what Documentation/SubmittingPatches::[[patch-flow]] says:\n\n    It is often beneficial to allow some time for reviewers to provide\n    feedback before sending a new version, rather than sending an updated\n    series immediately after receiving a review. This helps collect broader\n    input, gives reviewers in different time zones a fair chance to comment,\n    and avoids unnecessary churn from many rapid iterations.  Waiting also\n    encourages you to polish each version before sending it, so reviewers\n    can focus on substantial issues rather than typos or other small\n    mistakes.\n\n\nIt is not considered good manners to send a new iteration before\nfirst finishing the discussion on the reviews you received on your\nprevious iteration.  You respond to reviews, saying \"I will fix this\npoint\", \"I think this one is fine as-is because...\", and so forth,\nwait for responses to your response, and eventually come to an\nagreement with those in the discussion, so both sides know what the\nnext iteration should look like before you start working on it.\n\nOnly after finishing all of that do you prepare and send a new\niteration.\n\nThanks.\n\n"},{"id":"559444","messageId":"pRWo4Tw9YFIfXYAp-9Mj2dktr8BL5TIZT3pKYwIljnb4WujAajPZVrpdTLivqm0YZ-ydfpq1WY5gqara_1l9T7h1Ml5BR7E0SJQs6Rn9-jo=@protonmail.com","threadId":"66933","inReplyTo":"xmqqpkvsv1mi.fsf@gitster.g","subject":"Re: [PATCH v3] pack-objects: handle missing promisor objects","fromName":"ATTILIO ALESSIO","fromEmail":"attilio.alessio@protonmail.com","sentAt":"2026-11-26T10:48:54Z","receivedAt":"2026-11-26T10:48:54Z","isPatch":true,"sender":{"key":"attilio.alessio@protonmail.com","avatar":null},"body":"\nJunio C Hamano gitster@pobox.com writes:\n\n> It is not considered good manners to send a new iteration before\n> first finishing the discussion on the reviews you received on your\n> previous iteration. You respond to reviews, saying “I will fix this\n> point”, “I think this one is fine as-is because...”, and so forth,\n> wait for responses to your response, and eventually come to an\n> agreement with those in the discussion, so both sides know what the\n> next iteration should look like before you start working on it.\n>\n> Only after finishing all of that do you prepare and send a new\n> iteration.\n\nUnderstood, and thank you for pointing me to that section of\nDocumentation/SubmittingPatches. I apologize for rushing out v5\nbefore replying to your v4 review and allowing time for others to\nweigh in.\n\nGoing forward, I will make sure to respond to review comments on the\nthread first and wait for consensus before sending a new iteration.\n\nSince v5 is already on the list with the updated commit message and\nin-code comment addressing your v4 feedback, I will leave it as-is\nfor now and wait for any further comments from you and other\nreviewers.\n\nThanks,\nAlessio"}]}