lockfile: allow reopening a closed but still locked file
[gitweb.git] / merge-recursive.c
index 442c1ec0f492a5a0bede39687b97021978a5550a..0b5d34d0b2c2adcf2c45a88be46c29955ad221e1 100644 (file)
@@ -265,9 +265,7 @@ struct tree *write_tree_from_memory(struct merge_options *o)
                active_cache_tree = cache_tree();
 
        if (!cache_tree_fully_valid(active_cache_tree) &&
-           cache_tree_update(active_cache_tree,
-                             (const struct cache_entry * const *)active_cache,
-                             active_nr, 0) < 0)
+           cache_tree_update(&the_index, 0) < 0)
                die(_("error building trees"));
 
        result = lookup_tree(active_cache_tree->sha1);