tree: convert read_tree to take an index parameter
[gitweb.git] / builtin / ls-files.c
index b376afc3124c3240f4f249ccc206efa0b064675e..93e46ab5fbf5c6c449cec474afefcda053870f9a 100644 (file)
@@ -63,7 +63,8 @@ static void write_eolinfo(const struct cache_entry *ce, const char *path)
                const char *w_txt = "";
                const char *a_txt = get_convert_attr_ascii(path);
                if (ce && S_ISREG(ce->ce_mode))
-                       i_txt = get_cached_convert_stats_ascii(ce->name);
+                       i_txt = get_cached_convert_stats_ascii(&the_index,
+                                                              ce->name);
                if (!lstat(path, &st) && S_ISREG(st.st_mode))
                        w_txt = get_wt_convert_stats_ascii(path);
                printf("i/%-5s w/%-5s attr/%-17s\t", i_txt, w_txt, a_txt);
@@ -459,7 +460,7 @@ void overlay_tree_on_cache(const char *tree_name, const char *prefix)
                               PATHSPEC_PREFER_CWD, prefix, matchbuf);
        } else
                memset(&pathspec, 0, sizeof(pathspec));
-       if (read_tree(tree, 1, &pathspec))
+       if (read_tree(tree, 1, &pathspec, &the_index))
                die("unable to read tree entries %s", tree_name);
 
        for (i = 0; i < active_nr; i++) {