ls-files: convert overlay_tree_on_cache to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brandon Williams
2017-06-12 15:13:58 -07:00
committed by Junio C Hamano
parent 85ab50f938
commit 312c984a02
3 changed files with 12 additions and 9 deletions

View File

@ -253,7 +253,8 @@ static int list_paths(struct string_list *list, const char *with_tree,
if (with_tree) {
char *max_prefix = common_prefix(pattern);
overlay_tree_on_cache(with_tree, max_prefix ? max_prefix : prefix);
overlay_tree_on_index(&the_index, with_tree,
max_prefix ? max_prefix : prefix);
free(max_prefix);
}