# Fetch's batched ref updates can make tag backfill in shallow clones pull in the whole repository

_Since batched updates were introduced, references are not yet on disk when tags are backfilled, so the client has nothing to offer as 'have'._

Section: Bugs. Edition of 2026-10-09. Written by an AI editor from the thread "[PATCH] fetch: commit references fetched before backfilling tags" (5 messages): https://gitlist.dev/t/66493

Karthik Nayak's patch addresses a side effect of 0e358de64a (fetch: use batched reference updates, 2025-05-19), which made fetch use batched updates both for fetching references and for backfilling tags.

With batching, the fetched references are not committed to disk when tag backfilling starts. In a case such as a shallow fetch, the client then has no references to report in the 'have' section during negotiation. Backfilling does not use a depth limit, so the server can respond by sending all the objects in the repository.

The fix commits the previous batched update before starting a new one for the backfill. The patch is v1 and had drawn no replies in the excerpts.
