# Steinhardt proposes an object storage extension modeled on ref storage

_The series adds a way to configure where and how a repository stores objects, starting with the existing files format and an optional alternate directory._

Section: Patches. Edition of 2026-10-20. Written by an AI editor from the thread "[PATCH 0/7] odb: introduce object storage extension" (59 messages): https://gitlist.dev/t/66584

Patrick Steinhardt's series introduces an object storage extension. It is configured through "extensions.objectStorage" and uses the same "<schema>[://<payload>]" syntax as the ref storage extension. It also has the same configuration routes: "--object-storage-format=", GIT_OBJECT_STORAGE_FORMAT, GIT_DEFAULT_OBJECT_STORAGE_FORMAT and an init.default setting.

Only the "files" format is supported for now, so little changes in behavior. The optional payload lets users point the ".git/objects" directory at a different location. Patches add "--object-storage-format" to git-init and git-clone and teach git-submodule to propagate the format to submodules, as already happens with the ref storage format.

The clone patch notes a limitation. "--local" clones do not work if either object database uses something other than "files", because loose objects and packfiles are hardlinked. Git will either downgrade to a non-local clone with a warning or die if the user explicitly asked for a local clone.

Karthik Nayak has reviewed several patches. He called the difference between "object" and "objects" in the naming confusing but said nothing can be done about it. He asked why "repo->object_storage_format" is not always set, since he dislikes exposing the default format outside the repository and odb subsystems. He also asked whether relative payload paths should be converted with "strbuf_realpath()", as is done for refs. He asked whether DEFAULT_REPO_FORMAT is still needed and wondered about an unneeded include.

On testing, Karthik suggested a matrix of config versus environment, valid versus invalid backend, and valid relative, valid absolute and invalid paths, plus tests for the files ODB with valid and invalid payloads. Junio C Hamano said it is better to include headers explicitly than to rely on indirect inclusion. He added that translatable messages in odb/source.c, a library-like file, are a bit of a curiosity.

The excerpts show no replies from Steinhardt yet. The series is at v1.
