diff options
author | Russell Belfer <rb@github.com> | 2013-04-18 02:56:31 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-04-19 01:59:24 +0400 |
commit | ff0ddfa4bbec2e27491c822cf6b882c54d8675c8 (patch) | |
tree | 7e54055435b9624e0579dd6218f17aabf19bceed /src/iterator.h | |
parent | 2b63dbfbc12746465f6b37aa2b050cdc77679657 (diff) |
Add filesystem iterator variant
This adds a new variant iterator that is a raw filesystem iterator
for scanning directories from a root. There is still more work to
do to blend this with the working directory iterator.
Diffstat (limited to 'src/iterator.h')
-rw-r--r-- | src/iterator.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/iterator.h b/src/iterator.h index 4a4e6a9d8..7998f7c6b 100644 --- a/src/iterator.h +++ b/src/iterator.h @@ -19,6 +19,7 @@ typedef enum { GIT_ITERATOR_TYPE_TREE = 1, GIT_ITERATOR_TYPE_INDEX = 2, GIT_ITERATOR_TYPE_WORKDIR = 3, + GIT_ITERATOR_TYPE_FS = 4, } git_iterator_type_t; typedef enum { @@ -88,6 +89,16 @@ extern int git_iterator_for_workdir( const char *start, const char *end); +/* for filesystem iterators, you have to explicitly pass in the ignore_case + * behavior that you desire + */ +extern int git_iterator_for_filesystem( + git_iterator **out, + const char *root, + git_iterator_flag_t flags, + const char *start, + const char *end); + extern void git_iterator_free(git_iterator *iter); /* Return a git_index_entry structure for the current value the iterator |