From 62a617dc683c1e73eebd0e1b6209f76748e67ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Thu, 6 Nov 2014 16:16:46 +0100 Subject: iterator: submodules are determined by an index or tree We cannot know from looking at .gitmodules whether a directory is a submodule or not. We need the index or tree we are comparing against to tell us. Otherwise we have to assume the entry in .gitmodules is stale or otherwise invalid. Thus we pass the index of the repository into the workdir iterator, even if we do not want to compare against it. This follows what git does, which even for `git diff `, it will consider staged submodules as such. --- tests/threads/iterator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/threads/iterator.c') diff --git a/tests/threads/iterator.c b/tests/threads/iterator.c index 8aeae1a6c..8a2d79c2e 100644 --- a/tests/threads/iterator.c +++ b/tests/threads/iterator.c @@ -16,7 +16,7 @@ static void *run_workdir_iterator(void *arg) const git_index_entry *entry = NULL; cl_git_pass(git_iterator_for_workdir( - &iter, _repo, GIT_ITERATOR_DONT_AUTOEXPAND, NULL, NULL)); + &iter, _repo, NULL, NULL, GIT_ITERATOR_DONT_AUTOEXPAND, NULL, NULL)); while (!error) { if (entry && entry->mode == GIT_FILEMODE_TREE) { -- cgit v1.2.1