git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Justin Tobler
Message 3 of 3 in “odb: drop deprecated wrapper functions”
  1. odb: drop deprecated wrapper functionsPatrick Steinhardt, Sep 10, 2025
  2. Justin ToblerSep 10, 2025
  3. Jeff KingSep 10, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.