On Fri, 22 Sep 2017 20:26:21 +0000 Jeff Hostetler <git@xxxxxxxxxxxxxxxxx> wrote: > From: Jeff Hostetler <jeffhost@xxxxxxxxxxxxx> > > 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?