# Compat-hash loose object index not merged when tmpdir is migrated

_With a compatibility hash and batch fsync, an existing loose-object-idx in the primary object directory blocks migration of the temporary one._

Section: Bugs. Edition of 2026-10-23. Written by an AI editor from the thread "[PATCH] tmp-objdir: merge loose object index when migrating tmpdir" (34 messages): https://gitlist.dev/t/66637

When a repository is configured with a compatibility hash, each loose object write also records a mapping between the object and its compatibility hash in a "loose-object-idx" file in the same object database. If batch fsync of loose objects is also enabled, the objects and the index file are written to a temporary object directory. They are expected to be migrated to the primary object directory when the batch transaction commits.

Justin Tobler explains that the loose objects migrate fine, but the "loose-object-idx" file cannot be migrated if an index already exists in the primary object directory. The excerpt cuts off while describing the cause, which involves finalize_object_file_flags(). The patch makes tmp-objdir merge the loose object index when migrating the temporary directory.

The excerpts show no review comments yet.
