On Tue, Nov 14, 2023 at 10:40:58AM +0900, Junio C Hamano wrote: > Jeff King <peff@xxxxxxxx> writes: > > > I posted an alternative in response to Elijah; the general idea being to > > allow the usual object-lookup code to access the in-progress pack. That > > would keep us limited to a single pack. > > If such a mechanism is done in a generic way, would we be able to > simplify fast-import a lot, I wonder? IIRC, it had quite a lot of > code to remember what it has written to its output to work around > the exact issue your alternative tries to solve. In fact, maybe we > could make fast-import a thin wrapper around the bulk checkin > infrastructure? I suspect that the implementation could be shared with fast-import. I'm not sure it would save all that much code, though. There's a lot going on in fast-import besides keeping track of which objects we wrote into a pack. ;) The bigger issue, though, is that fast-import does generate some deltas and the bulk checkin code does not. And I'm not sure how the bulk checkin interface would expose that API (you need the caller to say "...and I suspect this object might be a good delta base"). -Peff