cache-tree: mark istate->cache_changed on cache tree update

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2014-06-13 19:19:32 +07:00
committed by Junio C Hamano
parent a5400efe29
commit d0cfc3e866
5 changed files with 18 additions and 24 deletions

View 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, "");
}