summaryrefslogtreecommitdiff
path: root/src/iterator.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-03-17 15:19:45 -0400
committerEdward Thomson <ethomson@github.com>2016-03-23 17:17:02 -0400
commit0a2e10328aedae4e989c61f46c29f1fd26ae92d6 (patch)
treefa220a11f8bdb8dd6d7ac19f4e35bb585b1b79fb /src/iterator.h
parent6cd9573f54f0054618f23da585e0d8661b882e34 (diff)
downloadlibgit2-0a2e10328aedae4e989c61f46c29f1fd26ae92d6.tar.gz
iterator: drop `advance_into_or_over`
Now that iterators do not return `GIT_ENOTFOUND` when advancing into an empty directory, we do not need a special `advance_into_or_over` function.
Diffstat (limited to 'src/iterator.h')
-rw-r--r--src/iterator.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/iterator.h b/src/iterator.h
index d64d63f8d..85444f11f 100644
--- a/src/iterator.h
+++ b/src/iterator.h
@@ -223,25 +223,6 @@ GIT_INLINE(int) git_iterator_advance_over(
}
/**
- * Advance into a tree or skip over it if it is empty.
- *
- * Because `git_iterator_advance_into` may return GIT_ENOTFOUND if the
- * directory is empty (only with filesystem and working directory
- * iterators) and a common response is to just call `git_iterator_advance`
- * when that happens, this bundles the two into a single simple call.
- */
-GIT_INLINE(int) git_iterator_advance_into_or_over(
- const git_index_entry **entry, git_iterator *iter)
-{
- int error = iter->cb->advance_into(entry, iter);
- if (error == GIT_ENOTFOUND) {
- giterr_clear();
- error = iter->cb->advance(entry, iter);
- }
- return error;
-}
-
-/**
* Go back to the start of the iteration.
*/
GIT_INLINE(int) git_iterator_reset(git_iterator *iter)