"Shawn O. Pearce" <spearce@xxxxxxxxxxx> writes: > Some transports allocate objects in the internal object hashtable > during the fetch process (e.g. the HTTP commit walker and also the > native protocol). These shouldn't be visible to another transport > call running in the same fetch process when we fetch the tags during > automated tag following. By deallocating the object table (if it > has anything in it) we ensure the second transport execution will > be from a clean slate. > > Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx> > --- > builtin-fetch.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/builtin-fetch.c b/builtin-fetch.c > index 847db73..18f123e 100644 > --- a/builtin-fetch.c > +++ b/builtin-fetch.c > @@ -337,7 +337,10 @@ static void store_updated_refs(const char *url, struct ref *ref_map) > > static int fetch_refs(struct transport *transport, struct ref *ref_map) > { > - int ret = transport_fetch_refs(transport, ref_map); > + int ret; > + > + free_all_objects(); > + ret = transport_fetch_refs(transport, ref_map); > if (!ret) > store_updated_refs(transport->url, ref_map); > transport_unlock_pack(transport); This sounds a very heavy-handed approach. Is it the callers responsibility to know what function does call free_all_objects() and makes sure there is no pointer to objects obtained before the call that is used after the call returns? - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html