On Wed, Nov 30, 2022 at 12:30:48PM -0800, Jonathan Tan wrote: > diff --git a/object-store.h b/object-store.h > index 88c879c61e..9684562eb2 100644 > --- a/object-store.h > +++ b/object-store.h > @@ -406,6 +406,7 @@ struct object_info { > struct object_id *delta_base_oid; > struct strbuf *type_name; > void **contentp; > + const struct object_id **real_oidp; OK. The double-pointer here is a bit funky as an interface. It may point back to the "oid" we fed the function, or it may point to long-term storage owned by the replace mechanism. A more straightforward one would be to store a single-pointer to caller-owned storage, and copy to that (like we do for delta_base_oid, for example). But doing it this way avoids extra oid copies in the normal, non-replaced case, and matches how the current callers view things. So while it's a little convoluted, I think it makes sense to do it as you did. -Peff