commit: convert register_commit_graft to handle arbitrary repositories
[gitweb.git] / unpack-trees.c
index d5685891a560d2f1a06c937043ceda2c8b9fd9db..e3f95cc6f951102f7ce95b0767228c80e98e5619 100644 (file)
@@ -15,6 +15,7 @@
 #include "submodule.h"
 #include "submodule-config.h"
 #include "fsmonitor.h"
+#include "object-store.h"
 #include "fetch-object.h"
 
 /*
@@ -391,6 +392,7 @@ static int check_updates(struct unpack_trees_options *o)
                        fetch_objects(repository_format_partial_clone,
                                      &to_fetch);
                fetch_if_missing = fetch_if_missing_store;
+               oid_array_clear(&to_fetch);
        }
        for (i = 0; i < index->cache_nr; i++) {
                struct cache_entry *ce = index->cache[i];