summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-04-21 10:58:22 -0400
committerEdward Thomson <ethomson@github.com>2016-04-21 10:58:22 -0400
commitdb22a91b86dbb230dd559f4864f4b846a895632d (patch)
tree5ed211387b972d0e468ddaf10c1c1f8f255c2d70
parent1dc449105b329ea4f8ea9982bc2da869d231c04a (diff)
downloadlibgit2-db22a91b86dbb230dd559f4864f4b846a895632d.tar.gz
iterator: ignore submodule in has_ended
-rw-r--r--src/iterator.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/iterator.c b/src/iterator.c
index ec44aac4c..87e0d53d4 100644
--- a/src/iterator.c
+++ b/src/iterator.c
@@ -206,8 +206,7 @@ GIT_INLINE(bool) iterator_has_started(
return false;
}
-GIT_INLINE(bool) iterator_has_ended(
- git_iterator *iter, const char *path, bool is_submodule)
+GIT_INLINE(bool) iterator_has_ended(git_iterator *iter, const char *path)
{
if (iter->end == NULL)
return false;
@@ -797,7 +796,7 @@ static int tree_iterator_advance(const git_index_entry **out, git_iterator *i)
continue;
/* if this path is after our end, stop */
- if (iterator_has_ended(&iter->base, iter->entry_path.ptr, false)) {
+ if (iterator_has_ended(&iter->base, iter->entry_path.ptr)) {
error = GIT_ITEROVER;
break;
}
@@ -2034,7 +2033,7 @@ static int index_iterator_advance(
continue;
}
- if (iterator_has_ended(&iter->base, entry->path, is_submodule)) {
+ if (iterator_has_ended(&iter->base, entry->path)) {
error = GIT_ITEROVER;
break;
}