[WIP/RFC 11/23] ls-files: convert show_ru_info to take an index
- Date: Thu, 18 May 2017 16:21:22 -0700
- From: Brandon Williams <bmwill@xxxxxxxxxx>
- Subject: [WIP/RFC 11/23] ls-files: convert show_ru_info to take an index
Signed-off-by: Brandon Williams <bmwill@xxxxxxxxxx>
---
builtin/ls-files.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index 3d4e497cc..755dfc8d6 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -292,14 +292,14 @@ static void show_ce_entry(const char *tag, const struct cache_entry *ce)
strbuf_release(&name);
}
-static void show_ru_info(void)
+static void show_ru_info(const struct index_state *istate)
{
struct string_list_item *item;
- if (!the_index.resolve_undo)
+ if (!istate->resolve_undo)
return;
- for_each_string_list_item(item, the_index.resolve_undo) {
+ for_each_string_list_item(item, istate->resolve_undo) {
const char *path = item->string;
struct resolve_undo_info *ui = item->util;
int i, len;
@@ -685,7 +685,7 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)
}
show_files(&dir);
if (show_resolve_undo)
- show_ru_info();
+ show_ru_info(&the_index);
if (ps_matched) {
int bad;
--
2.13.0.303.g4ebf302169-goog