cache-tree: use is_empty_tree_oid
[gitweb.git] / unpack-trees.c
index d5685891a560d2f1a06c937043ceda2c8b9fd9db..038ef7b92683257f3a47806d91a0dd560549d363 100644 (file)
@@ -391,6 +391,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];
@@ -1286,7 +1287,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
        o->result.split_index = o->src_index->split_index;
        if (o->result.split_index)
                o->result.split_index->refcount++;
-       hashcpy(o->result.sha1, o->src_index->sha1);
+       oidcpy(&o->result.oid, &o->src_index->oid);
        o->merge_size = len;
        mark_all_ce_unused(o->src_index);