Re: [PATCH] p5551: fix repeated runs with update-ref --no-deref
- From
Jeff King <peff@peff.net>
- Date
- Sep 28, 2026, 04:05 UTC
- Message-ID
- <20260928040511.GA498426@coredump.intra.peff.net>
- In-Reply-To
- <20260926180648.60770-1-jon@jonsimons.org>
On Sat, Sep 26, 2026 at 02:06:48PM -0400, Jon Simons wrote:
Show 12 quoted lines
> 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