On 3/1/2022 7:58 PM, Taylor Blau wrote: > To store the individual mtimes of objects in a cruft pack, introduce a > new `.mtimes` format that can optionally accompany a single pack in the > repository. > > The format is defined in Documentation/technical/pack-format.txt, and > stores a 4-byte network order timestamp for each object in name (index) > order. > > This patch prepares for cruft packs by defining the `.mtimes` format, > and introducing a basic API that callers can use to read out individual > mtimes. ... > +int load_pack_mtimes(struct packed_git *p) > +{ > + char *mtimes_name = NULL; > + int ret = 0; > + > + if (!p->is_cruft) > + return ret; /* not a cruft pack */ > + if (p->mtimes_map) > + return ret; /* already loaded */ > + > + ret = open_pack_index(p); > + if (ret < 0) > + goto cleanup; > + > + mtimes_name = pack_mtimes_filename(p); > + ret = load_pack_mtimes_file(mtimes_name, > + p->num_objects, > + &p->mtimes_map, > + &p->mtimes_size); > + if (ret) > + goto cleanup; This looked odd to me, so I supposed that you had some code that would be inserted between this 'goto cleanup' and the 'cleanup:' label, but I did not find such an insertion in the remaining patchs. This 'if' can be deleted. > +cleanup: > + free(mtimes_name); > + return ret; > +} Thanks, -Stolee