Re: [PATCH] odb: drop deprecated wrapper functions
- From
Jeff King <peff@peff.net>
- Date
- Sep 10, 2025, 15:37 UTC
- Message-ID
- <20250910153759.GA562601@coredump.intra.peff.net>
- In-Reply-To
- <20250910-b4-pks-odb-drop-wrappers-v1-1-6ed660cb1eec@pks.im>
On Wed, Sep 10, 2025 at 03:12:17PM +0200, Patrick Steinhardt wrote:
Show 10 quoted lines
> diff --git a/odb.h b/odb.h > index 3dfc66d75a..e8b9dff948 100644 > --- a/odb.h > +++ b/odb.h > @@ -475,37 +475,4 @@ static inline int odb_write_object(struct object_database *odb, > return odb_write_object_ext(odb, buf, len, type, oid, NULL, 0); > } > > -/* Compatibility wrappers, to be removed once Git 2.51 has been released. */ > -#include "repository.h"
When merged to 'jch', this patch breaks the build. The issue is that code added by ps/packfile-store was subtly depending on this include to have access to the definition of "struct repository":
pack-objects.c: In function ‘prepare_in_pack_by_idx’:
pack-objects.c:89:51: error: invalid use of undefined type ‘struct repository’
89 | struct packfile_store *packs = pdata->repo->objects->packfiles;
| ^~The fix is probably just:
diff --git a/pack-objects.c b/pack-objects.c index 668c113667..5b70aa400e 100644 --- a/pack-objects.c +++ b/pack-objects.c @@ -4,6 +4,7 @@ #include "pack-objects.h" #include "packfile.h" #include "parse.h" +#include "repository.h" static uint32_t locate_object_entry_hash(struct packing_data *pdata, const struct object_id *oid, either in the merge, or possibly in that other topic as a preparatory step (I didn't look at how close it is to graduating to 'next'). -Peff