# Justin Tobler's series makes files-backend ODB transactions create their temp directory up front

_Objects would be staged in a temporary directory for every transactional write, not only when batched fsync is enabled._

Section: Patches. Edition of 2026-11-10. Written by an AI editor from the thread "[PATCH 0/4] object-file: eagerly create ODB transaction temporary directory" (29 messages): https://gitlist.dev/t/66818

By default, ODB transactions for the 'files' backend create their temporary object directory lazily, when the first loose object is about to be written. This happens only if batched fsync is enabled, except for git-receive-pack transactions, which need the directory up front to quarantine incoming objects. Justin Tobler says this is awkward. Loose-object writing has to know about transaction internals, and whether objects become visible at once on commit depends on configuration.

The series makes creation eager and ensures objects go to the temporary directory for all transactional writes. Three preparatory patches come first. One makes tmp_objdir_create() preserve errno across its cleanup on failure, so callers can report a specific error.

Another changes the full hardware flush issued at commit. It is currently issued whenever a temporary object directory exists, even when batched fsync is not in use, as with receive-pack transactions. The third renames the default 'bulk-fsync' directory prefix to 'transaction'. The old name dates to c0f4752ed2 (2022), when the directory only served batched fsync of loose objects.

The series is based on 3c60ef1e38 (The 17th batch, 2026-11-08). The excerpts include no review replies yet.
