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

Re: [PATCH 0/9] object-file: move writing of loose objects into "loose" source

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Jul 18, 2026, 19:39 UTC
Message-ID
<alvWfOJb6vAsusai@szeder.dev>
In-Reply-To
<20260717-pks-odb-move-loose-object-writing-v1-0-46446a3cb5b7@pks.im>
Hi Junio,
On Fri, Jul 17, 2026 at 11:32:08AM +0200, Patrick Steinhardt wrote:
Show 39 quoted lines
> Hi,
> 
> this patch series refactors "object-file.c" so that we can move the
> logic that writes loose objects into "odb/source-loose.c". This ensures
> that the logic to read and write loose objects is mostly self-contained
> within that source's implementation now.
> 
> To achieve that, this series first refactors `force_object_loose()` so
> that it can work on top of the generic `odb_source_write_object()`
> instead of having to call into `write_loose_object()`. This is the bulk
> of the patch series.
> 
> This patch series is built on top of 44de1520f0 (Merge branch 'master'
> of https://github.com/j6t/git-gui, 2026-07-16) with the following two
> topics merged into it:
> 
>   - jt/receive-pack-use-odb-transaction at bdee7b3013
>     (builtin/receive-pack: stage incoming objects via ODB transactions,
>     2026-07-10).
> 
>   - jk/git-hash-cleanups at 9e396aa553 (hash: check ctx->active flag in
>     all wrapper functions, 2026-07-07).
> 
> Note that jt/receive-pack-use-odb-transaction requires an evil merge:
> 
> diff --git a/odb/source-packed.c b/odb/source-packed.c
> index 06b31dd743..cbb06da038 100644
> --- a/odb/source-packed.c
> +++ b/odb/source-packed.c
> @@ -545,7 +545,8 @@ static int odb_source_packed_write_object_stream(struct odb_source *source UNUSE
>  }
> 
>  static int odb_source_packed_begin_transaction(struct odb_source *source UNUSED,
> -                                              struct odb_transaction **out UNUSED)
> +                                              struct odb_transaction **out UNUSED,
> +                                              enum odb_transaction_flags flags UNUSED)
>  {
>         return error("packed backend cannot begin transactions");
>  }

It seems that you performed this evil merge when merging the topic jt/receive-pack-use-odb-transaction into jch as 9727bd8447 (Merge branch 'jt/receive-pack-use-odb-transactions' into jch, 2026-07-17), but forgot to do so when creating the base for this patch series as 1d64e64326 (Merge branch 'jt/receive-pack-use-odb-transactions' into ps/odb-move-loose-object-writing, 2026-07-17). Consequently, neither 1d64e64326 nor any of the the commits of this patch series can be built because of the mismatching function signature:

  GIT_VERSION=2.55.0.256.g1d64e64326
  odb/source-packed.c: In function ‘odb_source_packed_new’:
  odb/source-packed.c:778:40: error: assignment to ‘int (*)(struct odb_source *, struct odb_transaction **, enum odb_transaction_flags)’ from incompatible pointer type ‘int (*)(struct odb_source *, struct odb_transaction **)’ [-Werror=incompatible-pointer-types]
    778 |         packed->base.begin_transaction = odb_source_packed_begin_transaction;
        |                                        ^
  cc1: all warnings being treated as errors
  make: *** [Makefile:2924: odb/source-packed.o] Error 1
Previous: Toon ClaesNext: Junio C Hamano
Message 15 of 17 in “object-file: move writing of loose objects into "loose" source”
  1. 0/9 object-file: move writing of loose objects into "loose" sourcePatrick Steinhardt, Jul 17, 2026
  2. 1/9 odb: compute compat object ID in `odb_write_object_ext()`Patrick Steinhardt, Jul 17, 2026
  3. Justin ToblerJul 28, 2026
  4. 2/9 t/u-odb-inmemory: implement wrapper for writing objectsPatrick Steinhardt, Jul 17, 2026
  5. Justin ToblerJul 28, 2026
  6. 3/9 odb: compute object hash in `odb_write_object_ext()`Patrick Steinhardt, Jul 17, 2026
  7. 4/9 odb: lift object existence check out of the "loose" backendPatrick Steinhardt, Jul 17, 2026
  8. Toon ClaesJul 22, 2026
  9. 5/9 odb: support setting mtime when writing objectsPatrick Steinhardt, Jul 17, 2026
  10. 6/9 object-file: fix memory leak in `force_object_loose()`Patrick Steinhardt, Jul 17, 2026
  11. 7/9 object-file: force objects loose via generic interfacePatrick Steinhardt, Jul 17, 2026
  12. 8/9 object-file: move `force_object_loose()`Patrick Steinhardt, Jul 17, 2026
  13. 9/9 object-file: move logic to write loose objectsPatrick Steinhardt, Jul 17, 2026
  14. Toon ClaesJul 22, 2026
  15. SZEDER GáborJul 18, 2026
  16. Junio C HamanoJul 19, 2026
  17. Junio C HamanoJul 19, 2026

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.