Merge branch 'dt/cache-tree-repair'
[gitweb.git] / test-dump-cache-tree.c
index cbbbd8e41222da715ae272008c480426dead367f..54c0872fcb18edb4ca28a63fdfd4be3a17df388e 100644 (file)
@@ -56,11 +56,12 @@ static int dump_cache_tree(struct cache_tree *it,
 
 int main(int ac, char **av)
 {
+       struct index_state istate;
        struct cache_tree *another = cache_tree();
        if (read_cache() < 0)
                die("unable to read index file");
-       cache_tree_update(another,
-                         (const struct cache_entry * const *)active_cache,
-                         active_nr, WRITE_TREE_DRY_RUN);
+       istate = the_index;
+       istate.cache_tree = another;
+       cache_tree_update(&istate, WRITE_TREE_DRY_RUN);
        return dump_cache_tree(active_cache_tree, another, "");
 }