git/odb
Patrick Steinhardt 109e40dfcb setup: detangle loading of loose object maps
When a repository is configured to use a compatibility hash function
then we load the loose object map when we initialize the repository.
This object map provides the mappings between the canonical object hash
and the compatibility object hash.

Loading the object map happens in `repo_set_compat_hash_algo()`, which
calls `repo_read_loose_object_map()` in case the compatibility object
hash is non-zero. This setup sequence has two major downsides:

  - We assume that the primary object database is the "files" object
    database so that we can extract its "loose" backend. This stops
    working with pluggable object databases.

  - We require the object database to already have been initialized when
    configuring the object database. This means that we must intermix
    configuration of the repository and initialization of its
    sub-structures in a weird way.

Refactor the logic so that we instead load the loose object map via the
"loose" backend, which fixes both of the above issues.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-07-24 10:21:44 -07:00
..
source-files.c Merge branch 'jt/receive-pack-use-odb-transactions' 2026-07-22 10:30:53 -07:00
source-files.h packfile: rename `struct packfile_store` to `odb_source_packed` 2026-06-17 04:59:59 -07:00
source-inmemory.c Merge branch 'jt/receive-pack-use-odb-transactions' 2026-07-22 10:30:53 -07:00
source-inmemory.h odb/source-inmemory: convert to use oidtree 2026-05-15 04:50:45 +09:00
source-loose.c setup: detangle loading of loose object maps 2026-07-24 10:21:44 -07:00
source-loose.h odb/source-loose: drop pointer to the "files" source 2026-06-01 18:47:19 +09:00
source-packed.c Merge branch 'ps/odb-for-each-object-filter' 2026-07-22 10:30:54 -07:00
source-packed.h Merge branch 'ps/odb-generalize-prepare' 2026-07-13 08:27:28 -07:00
source.c odb/source: make `free()` function pluggable 2026-03-05 11:45:15 -08:00
source.h Merge branch 'jt/receive-pack-use-odb-transactions' 2026-07-22 10:30:53 -07:00
streaming.c odb: use size_t for object_info.sizep and the size APIs 2026-06-15 07:45:41 -07:00
streaming.h Merge branch 'ps/odb-in-memory' into ps/odb-source-loose 2026-05-21 22:34:55 +09:00
transaction.c odb/transaction: introduce ODB transaction flags 2026-07-10 13:21:53 -07:00
transaction.h odb/transaction: introduce ODB transaction flags 2026-07-10 13:21:53 -07:00