From: Patrick Steinhardt Date: Tue, 09 Jun 2026 07:27:43 GMT Subject: Re: [PATCH 02/16] packfile: move packed source into "odb/" subsystem Message-ID: In-Reply-To: On Mon, Jun 08, 2026 at 08:09:06AM -0700, Karthik Nayak wrote: > Patrick Steinhardt writes: > > diff --git a/odb/source-packed.h b/odb/source-packed.h > > new file mode 100644 > > index 0000000000..c17068a4f1 > > --- /dev/null > > +++ b/odb/source-packed.h > > @@ -0,0 +1,80 @@ > > +#ifndef ODB_SOURCE_PACKED_H > > +#define ODB_SOURCE_PACKED_H > > + > > +#include "odb/source.h" > > +#include "strmap.h" > > + > > +struct packfile_list { > > + struct packfile_list_entry *head, *tail; > > +}; > > + > > +struct packfile_list_entry { > > + struct packfile_list_entry *next; > > + struct packed_git *pack; > > +}; > > + > > So this is exposed, because outside of the odb, we also use packfiles in > the transport layer. That makes me wonder if these two structures are > better kept alonsigde `struct packed_git` in 'packfile.h'. Yeah, this is quite awkward indeed as the struct and function declarations are now split up across "packfile.h" and "odb/source-packed.h". The reason though is that there's a cyclic dependency between the two headers, so we have to move the code around. Arguably though, the better fix would be to move it into a standalone file "packfile-list.{c,h}". Will adapt the code accordingly. Patrick