Jeff King <peff@xxxxxxxx> writes: > And that's exactly what this patch does: when we're > considering whether to reuse an on-disk delta, if bitmaps > tell us the other side has the object (and we're making a > thin-pack), then we reuse it. That's really the natural extension and logical consequence of the "reuse existing deltas" mechanism from Feb 2006 ;-) > So taking all of those options into account, what I ended up > with is a separate list of "external bases" that are not > part of the main packing list. Each delta entry that points > to an external base has a single-bit flag to do so; we have a > little breathing room in the bitfield section of > object_entry. > > This lets us limit the change primarily to the oe_delta() > and oe_set_delta_ext() functions. And as a bonus, most of > the rest of the code does not consider these dummy entries > at all, saving both runtime CPU and code complexity. Tricky ;-) I wonder if we can move the preferred base objects that we are not going to send also off of the "main packing list" to this new mechanism? > +static struct bitmap_index *bitmap_git; > ... > +static int thin = 0; Please trust what BSS will do to your static vars.