mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-12 01:15:09 +00:00
iterator: ignore submodule in has_ended
This commit is contained in:
parent
1dc449105b
commit
db22a91b86
@ -206,8 +206,7 @@ GIT_INLINE(bool) iterator_has_started(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
GIT_INLINE(bool) iterator_has_ended(
|
GIT_INLINE(bool) iterator_has_ended(git_iterator *iter, const char *path)
|
||||||
git_iterator *iter, const char *path, bool is_submodule)
|
|
||||||
{
|
{
|
||||||
if (iter->end == NULL)
|
if (iter->end == NULL)
|
||||||
return false;
|
return false;
|
||||||
@ -797,7 +796,7 @@ static int tree_iterator_advance(const git_index_entry **out, git_iterator *i)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* if this path is after our end, stop */
|
/* 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;
|
error = GIT_ITEROVER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2034,7 +2033,7 @@ static int index_iterator_advance(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iterator_has_ended(&iter->base, entry->path, is_submodule)) {
|
if (iterator_has_ended(&iter->base, entry->path)) {
|
||||||
error = GIT_ITEROVER;
|
error = GIT_ITEROVER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user