[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: [PATCH 24/31] ls-files: convert show_other_files to take an index
From: Brandon Williams <bmwill () google ! com>
Date: 2017-05-31 21:44:10
Message-ID: 20170531214417.38857-25-bmwill () google ! com
[Download RAW message or body]
Signed-off-by: Brandon Williams <bmwill@google.com>
---
builtin/ls-files.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index f9578cf9f..d00ca7810 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -109,13 +109,14 @@ static void show_dir_entry(const char *tag, struct dir_entry *ent)
write_name(ent->name);
}
-static void show_other_files(struct dir_struct *dir)
+static void show_other_files(const struct index_state *istate,
+ const struct dir_struct *dir)
{
int i;
for (i = 0; i < dir->nr; i++) {
struct dir_entry *ent = dir->entries[i];
- if (!cache_name_is_other(ent->name, ent->len))
+ if (!index_name_is_other(istate, ent->name, ent->len))
continue;
show_dir_entry(tag_other, ent);
}
@@ -337,7 +338,7 @@ static void show_files(struct dir_struct *dir)
dir->flags |= DIR_COLLECT_KILLED_ONLY;
fill_directory(dir, &the_index, &pathspec);
if (show_others)
- show_other_files(dir);
+ show_other_files(&the_index, dir);
if (show_killed)
show_killed_files(&the_index, dir);
}
--
2.13.0.506.g27d5fe0cd-goog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic