]> git.ipfire.org Git - thirdparty/git.git/commit
odb: make creation of on-disk structures pluggable
authorPatrick Steinhardt <ps@pks.im>
Fri, 24 Jul 2026 03:48:44 +0000 (05:48 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Jul 2026 17:21:44 +0000 (10:21 -0700)
commit2691faaee4b06a0caeb144cb05550273b021cece
treea048861ce17c8dc7d53c2cf4ce12cef189432668
parentbdf92ad403fad3aa63806274467b97221487faf3
odb: make creation of on-disk structures pluggable

When creating a new "files" object database source we have to create a
couple of directories. These directories are of course specific to this
particular backend, and a different backend may require a setup that is
completely different.

Make the creation of on-disk structures pluggable to accommodate for
this.

Note that there is one exception though: the "objects" directory must
exist in a repository regardless of which backend is in use. If it
doesn't exist then the repository is not treated as a Git repository at
all. Consequently, we create this directory regardless of the backend.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
odb/source-files.c
odb/source.h
setup.c