From: Justin Tobler Date: Tue, 16 Jun 2026 22:51:43 GMT Subject: Re: [PATCH v2 17/17] odb/source-packed: drop pointer to "files" parent source Message-ID: In-Reply-To: <20260609-pks-odb-source-packed-v2-17-839089132c8b@pks.im> On 26/06/09 10:51AM, Patrick Steinhardt wrote: > Over the last commits we have turned the packfile store into a proper > object database source that can be used as a standalone backend. As > such, it is no longer necessary to have it coupled to the "files" parent > source. > > Remove the pointer to the owning "files" source so that the "packed" > source can be used as a standalone entity. Makes sense. > Signed-off-by: Patrick Steinhardt > --- [snip] > @@ -626,7 +625,7 @@ static void prepare_pack(const char *full_name, size_t full_name_len, > report_garbage(PACKDIR_FILE_GARBAGE, full_name); > } > > -static void prepare_packed_git_one(struct odb_source *source) > +static void prepare_packed_git_one(struct odb_source_packed *source) At first I was a bit confused to see this change here, but IIUC previously this function was passed the "base" source of the "files" ODB. Now that we have a proper "packed" source we can use that directly instead. [snip] > -struct odb_source_packed *odb_source_packed_new(struct odb_source_files *parent) > +struct odb_source_packed *odb_source_packed_new(struct object_database *odb, > + const char *path, > + bool local) Since we no longer depend on the parent source the function signature is updated accordingly. This also matches the "loose" ODB source. [snip] > diff --git a/odb/source-packed.h b/odb/source-packed.h > index 9d4796261a..88994098c1 100644 > --- a/odb/source-packed.h > +++ b/odb/source-packed.h > @@ -10,7 +10,6 @@ > */ > struct odb_source_packed { > struct odb_source base; > - struct odb_source_files *files; Nice. :) -Justin