ls-files: convert show_ru_info to take an index
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams committed
Jun 12, 2017 at 15:14 UTC
2d407e2da1b12fd1f3cb5fc0b072732ab2ac1c6a
1 file changed
+4
-4
builtin/ls-files.c
+4
-4
@@ -292,14 +292,14 @@ static void show_ce_entry(const char *tag, const struct cache_entry *ce)
292
strbuf_release(&name);
293
}
294
295
-static void show_ru_info(void)
295
+static void show_ru_info(const struct index_state *istate)
296
{
297
struct string_list_item *item;
298
299
- if (!the_index.resolve_undo)
299
+ if (!istate->resolve_undo)
300
return;
301
302
- for_each_string_list_item(item, the_index.resolve_undo) {
302
+ for_each_string_list_item(item, istate->resolve_undo) {
303
const char *path = item->string;
304
struct resolve_undo_info *ui = item->util;
305
int i, len;
@@ -685,7 +685,7 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)
685
}
686
show_files(&dir);
687
if (show_resolve_undo)
688
- show_ru_info();
688
+ show_ru_info(&the_index);
689
690
if (ps_matched) {
691
int bad;