From: Jonathan Tan Date: Tue, 26 Sep 2017 22:20:22 GMT Subject: Re: [PATCH 02/13] oidset2: create oidset subclass with object length and pathname Message-ID: <20170926152022.67d3d6bcc93d862aa1066207@google.com> In-Reply-To: <20170922202632.53714-3-git@jeffhostetler.com> On Fri, 22 Sep 2017 20:26:21 +0000 Jeff Hostetler wrote: > From: Jeff Hostetler > > Create subclass of oidset where each entry has a > field to store the length of the object's content > and an optional pathname. > > This will be used in a future commit to build a > manifest of omitted objects in a partial/narrow > clone/fetch. As Brandon mentioned, I think "oidmap" should be the new data structure of choice (with "oidset" modified to use it). > +struct oidset2_entry { > + struct hashmap_entry hash; > + struct object_id oid; > + > + enum object_type type; > + int64_t object_length; /* This is SIGNED. Use -1 when unknown. */ > + char *pathname; > +}; object_length is defined to be "unsigned long" in Git code, I think. When is object_length not known, and in those cases, would it be better to use a separate data structure to store what we need?