summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-06-12 15:14:02 -0700
committerJunio C Hamano <gitster@pobox.com>2017-06-13 11:40:51 -0700
commit2d407e2da1b12fd1f3cb5fc0b072732ab2ac1c6a (patch)
tree948c71a8c1434a91cdcfb6d673a3445b9d43791f
parent23d6846b2324ef647a339b84ba3abc52e0a4dc94 (diff)
downloadgit-2d407e2da1b12fd1f3cb5fc0b072732ab2ac1c6a.tar.gz
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>
-rw-r--r--builtin/ls-files.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index 5dbff94961..375fe09d1e 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;