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.