add: speed up cmd_add() by utilizing read_cache_preload()
[gitweb.git] / unpack-trees.c
index 65f157b9de5c75809980c1722ac67081dc2f92a1..7570df481bf69824e4b163a6c7a15985b72d1326 100644 (file)
@@ -380,7 +380,7 @@ static int check_updates(struct unpack_trees_options *o)
 {
        unsigned cnt = 0;
        int errs = 0;
-       struct progress *progress = NULL;
+       struct progress *progress;
        struct index_state *index = &o->result;
        struct checkout state = CHECKOUT_INIT;
        int i;
@@ -436,7 +436,7 @@ static int check_updates(struct unpack_trees_options *o)
                }
                if (to_fetch.nr)
                        fetch_objects(repository_format_partial_clone,
-                                     &to_fetch);
+                                     to_fetch.oid, to_fetch.nr);
                fetch_if_missing = fetch_if_missing_store;
                oid_array_clear(&to_fetch);
        }