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

[PATCH] p5551: fix repeated runs with update-ref --no-deref

From
Jon Simons <jon@jonsimons.org>
Date
Sep 26, 2026, 18:06 UTC
Message-ID
<20260926180648.60770-1-jon@jonsimons.org>

Update p5551-fetch-rescan.sh to pass `--no-deref` when deleting child test refs before each measured `git fetch`. Otherwise, for repeated runs, the second iteration will fail with:

    fatal: multiple updates for 'refs/remotes/origin/master' (including
    one via symref 'refs/remotes/origin/HEAD') are not allowed

Starting with 3f763ddf28 (fetch: set remote/HEAD if it does not exist, 2024-11-22), `git fetch` instantiates the HEAD symref.

The test, introduced in 7893bf1720 (p5551: add a script to test fetch pack-dir rescans, 2017-11-20), predates that.

Signed-off-by: Jon Simons <jon@jonsimons.org>
---
 t/perf/p5551-fetch-rescan.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/perf/p5551-fetch-rescan.sh b/t/perf/p5551-fetch-rescan.sh
index b99dc23e32..0b3ff632fc 100755
--- a/t/perf/p5551-fetch-rescan.sh
+++ b/t/perf/p5551-fetch-rescan.sh
@@ -45,7 +45,7 @@ test_perf 'fetch' '
 	(
 		cd child &&
 		$MODERN_GIT for-each-ref --format="delete %(refname)" refs/remotes |
-		$MODERN_GIT update-ref --stdin &&
+		$MODERN_GIT update-ref --stdin --no-deref &&
 		rm -vf .git/objects/$(echo $obj | sed "s|^..|&/|") &&
 
 		git fetch

base-commit: 0f8e75abebff0877cae681a3d5ff31ac47f54220
-- 
2.55.0
Next: Jeff King
Message 1 of 3 in “p5551: fix repeated runs with update-ref --no-deref”
  1. p5551: fix repeated runs with update-ref --no-derefJon Simons, Sep 26, 2026
  2. Jeff KingSep 28, 2026
  3. Junio C HamanoSep 28, 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.