{"thread":{"id":"66396","subject":"[PATCH] p5551: fix repeated runs with update-ref --no-deref","startedAt":"2026-09-26T18:16:51Z","lastAt":"2026-09-28T18:30:14Z","messageCount":3,"participants":["Jon Simons","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"553364","messageId":"20260926180648.60770-1-jon@jonsimons.org","threadId":"66396","inReplyTo":null,"subject":"[PATCH] p5551: fix repeated runs with update-ref --no-deref","fromName":"Jon Simons","fromEmail":"jon@jonsimons.org","sentAt":"2026-09-26T18:06:48Z","receivedAt":"2026-09-26T18:16:51Z","isPatch":true,"body":"Update p5551-fetch-rescan.sh to pass `--no-deref` when deleting child\ntest refs before each measured `git fetch`.  Otherwise, for repeated\nruns, the second iteration will fail with:\n\n    fatal: multiple updates for 'refs/remotes/origin/master' (including\n    one via symref 'refs/remotes/origin/HEAD') are not allowed\n\nStarting with 3f763ddf28 (fetch: set remote/HEAD if it does not exist,\n2024-11-22), `git fetch` instantiates the HEAD symref.\n\nThe test, introduced in 7893bf1720 (p5551: add a script to test fetch\npack-dir rescans, 2017-11-20), predates that.\n\nSigned-off-by: Jon Simons <jon@jonsimons.org>\n---\n t/perf/p5551-fetch-rescan.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/perf/p5551-fetch-rescan.sh b/t/perf/p5551-fetch-rescan.sh\nindex b99dc23e32..0b3ff632fc 100755\n--- a/t/perf/p5551-fetch-rescan.sh\n+++ b/t/perf/p5551-fetch-rescan.sh\n@@ -45,7 +45,7 @@ test_perf 'fetch' '\n \t(\n \t\tcd child &&\n \t\t$MODERN_GIT for-each-ref --format=\"delete %(refname)\" refs/remotes |\n-\t\t$MODERN_GIT update-ref --stdin &&\n+\t\t$MODERN_GIT update-ref --stdin --no-deref &&\n \t\trm -vf .git/objects/$(echo $obj | sed \"s|^..|&/|\") &&\n \n \t\tgit fetch\n\nbase-commit: 0f8e75abebff0877cae681a3d5ff31ac47f54220\n-- \n2.55.0\n\n"},{"id":"553400","messageId":"20260928040511.GA498426@coredump.intra.peff.net","threadId":"66396","inReplyTo":"20260926180648.60770-1-jon@jonsimons.org","subject":"Re: [PATCH] p5551: fix repeated runs with update-ref --no-deref","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2026-09-28T04:05:11Z","receivedAt":"2026-09-28T04:05:13Z","isPatch":true,"body":"On Sat, Sep 26, 2026 at 02:06:48PM -0400, Jon Simons wrote:\n\n> Update p5551-fetch-rescan.sh to pass `--no-deref` when deleting child\n> test refs before each measured `git fetch`.  Otherwise, for repeated\n> runs, the second iteration will fail with:\n> \n>     fatal: multiple updates for 'refs/remotes/origin/master' (including\n>     one via symref 'refs/remotes/origin/HEAD') are not allowed\n> \n> Starting with 3f763ddf28 (fetch: set remote/HEAD if it does not exist,\n> 2024-11-22), `git fetch` instantiates the HEAD symref.\n> \n> The test, introduced in 7893bf1720 (p5551: add a script to test fetch\n> pack-dir rescans, 2017-11-20), predates that.\n\nThanks, the explanation and patch both make sense.\n\nThis test could probably benefit from using --setup (which also didn't\nexist back when this test was written). But that's nothing new, and well\noutside the scope of your patch.\n\n-Peff\n"},{"id":"553510","messageId":"xmqqcxtxmdor.fsf@gitster.g","threadId":"66396","inReplyTo":"20260928040511.GA498426@coredump.intra.peff.net","subject":"Re: [PATCH] p5551: fix repeated runs with update-ref --no-deref","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-09-28T18:30:12Z","receivedAt":"2026-09-28T18:30:14Z","isPatch":true,"body":"Jeff King <peff@peff.net> writes:\n\n> On Sat, Sep 26, 2026 at 02:06:48PM -0400, Jon Simons wrote:\n>\n>> Update p5551-fetch-rescan.sh to pass `--no-deref` when deleting child\n>> test refs before each measured `git fetch`.  Otherwise, for repeated\n>> runs, the second iteration will fail with:\n>> \n>>     fatal: multiple updates for 'refs/remotes/origin/master' (including\n>>     one via symref 'refs/remotes/origin/HEAD') are not allowed\n>> \n>> Starting with 3f763ddf28 (fetch: set remote/HEAD if it does not exist,\n>> 2024-11-22), `git fetch` instantiates the HEAD symref.\n>> \n>> The test, introduced in 7893bf1720 (p5551: add a script to test fetch\n>> pack-dir rescans, 2017-11-20), predates that.\n>\n> Thanks, the explanation and patch both make sense.\n>\n> This test could probably benefit from using --setup (which also didn't\n> exist back when this test was written). But that's nothing new, and well\n> outside the scope of your patch.\n>\n> -Peff\n\nThanks for writing and reviewing.  Will queue and mark for 'next'.\n"}]}