summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-05-05 19:53:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-06 10:15:39 (GMT)
commit0d32c183b636ffba6462b21ed0c844b6cb887b3f (patch)
treee715096f34c71ed0a6195215ea514e25992ff788 /dir.c
parent2c1eb104543265c2d26cf36303b35e426dcacf68 (diff)
downloadgit-0d32c183b636ffba6462b21ed0c844b6cb887b3f.zip
git-0d32c183b636ffba6462b21ed0c844b6cb887b3f.tar.gz
git-0d32c183b636ffba6462b21ed0c844b6cb887b3f.tar.bz2
dir: convert fill_directory to take an index
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index 4eb8cb6..3f3167e 100644
--- a/dir.c
+++ b/dir.c
@@ -177,7 +177,9 @@ char *common_prefix(const struct pathspec *pathspec)
return len ? xmemdupz(pathspec->items[0].match, len) : NULL;
}
-int fill_directory(struct dir_struct *dir, const struct pathspec *pathspec)
+int fill_directory(struct dir_struct *dir,
+ struct index_state *istate,
+ const struct pathspec *pathspec)
{
const char *prefix;
size_t prefix_len;
@@ -190,7 +192,7 @@ int fill_directory(struct dir_struct *dir, const struct pathspec *pathspec)
prefix = prefix_len ? pathspec->items[0].match : "";
/* Read the directory and prune it */
- read_directory(dir, &the_index, prefix, prefix_len, pathspec);
+ read_directory(dir, istate, prefix, prefix_len, pathspec);
return prefix_len;
}