Git development
 help / color / mirror / Atom feed
* [PATCH] p5551: fix repeated runs with update-ref --no-deref
@ 2026-09-26 18:06 Jon Simons
  2026-09-28  4:05 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Simons @ 2026-09-26 18:06 UTC (permalink / raw)
  To: git; +Cc: Jon Simons

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] p5551: fix repeated runs with update-ref --no-deref
  2026-09-26 18:06 [PATCH] p5551: fix repeated runs with update-ref --no-deref Jon Simons
@ 2026-09-28  4:05 ` Jeff King
  2026-09-28 18:30   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2026-09-28  4:05 UTC (permalink / raw)
  To: Jon Simons; +Cc: git

On Sat, Sep 26, 2026 at 02:06:48PM -0400, Jon Simons wrote:

> 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.

Thanks, the explanation and patch both make sense.

This test could probably benefit from using --setup (which also didn't
exist back when this test was written). But that's nothing new, and well
outside the scope of your patch.

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] p5551: fix repeated runs with update-ref --no-deref
  2026-09-28  4:05 ` Jeff King
@ 2026-09-28 18:30   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2026-09-28 18:30 UTC (permalink / raw)
  To: Jeff King; +Cc: Jon Simons, git

Jeff King <peff@peff.net> writes:

> On Sat, Sep 26, 2026 at 02:06:48PM -0400, Jon Simons wrote:
>
>> 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.
>
> Thanks, the explanation and patch both make sense.
>
> This test could probably benefit from using --setup (which also didn't
> exist back when this test was written). But that's nothing new, and well
> outside the scope of your patch.
>
> -Peff

Thanks for writing and reviewing.  Will queue and mark for 'next'.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-28 18:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-26 18:06 [PATCH] p5551: fix repeated runs with update-ref --no-deref Jon Simons
2026-09-28  4:05 ` Jeff King
2026-09-28 18:30   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox