]> git.ipfire.org Git - thirdparty/git.git/commit
odb/source-packed: start converting to a proper `struct odb_source`
authorPatrick Steinhardt <ps@pks.im>
Wed, 17 Jun 2026 06:39:48 +0000 (08:39 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Jun 2026 12:00:00 +0000 (05:00 -0700)
commit0de2467e6c35930cf2530a213082829c8b86970d
treebf0817ec88b92917dfcb7edf2724cfb2232c08f5
parent3ac21e6d825a642dcab826772b495f492148299c
odb/source-packed: start converting to a proper `struct odb_source`

Start converting `struct odb_source_packed` into a proper pluggable
`struct odb_source` by embedding the base struct and assigning it the
new `ODB_SOURCE_PACKED` type. Furthermore, wire up lifecycle management
of this source by implementing the `free` callback and taking ownership
of the chdir notifications.

Note that the packed source is not yet functional as a standalone `struct
odb_source`, as it's missing all of the callback implementations. These
will be wired up in subsequent commits.

Further note that we're also registering a `chdir_notify` callback to
reparent our path. This wasn't previously necessary (and still isn't at
this point in time) because all paths are taken from the owning "files"
source, and that source already handles the reparenting for us. But a
subsequent commit will change that so that we're using the path of the
"packed" source, and once that happens we'll need it to be updated when
changing the working directory.

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