diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2015-09-08 11:50:08 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-09-08 11:50:08 -0400 |
| commit | 2964cbeae14f52a42f82b5bf6fbb22cfcb5bd4c9 (patch) | |
| tree | 0544ede140e628e85691d3a8a6886cb97c38cddc /include/git2/index.h | |
| parent | e1d27bcaafaadf4ef5eeae19c96835c6663c4289 (diff) | |
| parent | c097f7173daced0f86fd816a72ad5fc0f636484a (diff) | |
| download | libgit2-2964cbeae14f52a42f82b5bf6fbb22cfcb5bd4c9.tar.gz | |
Merge pull request #3381 from leoyanggit/index_directory_iterator
New feature: add the ablility to iterate through a directory in index
Diffstat (limited to 'include/git2/index.h')
| -rw-r--r-- | include/git2/index.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/index.h b/include/git2/index.h index 7caf3ed78..176ba301e 100644 --- a/include/git2/index.h +++ b/include/git2/index.h @@ -643,6 +643,17 @@ GIT_EXTERN(int) git_index_update_all( */ GIT_EXTERN(int) git_index_find(size_t *at_pos, git_index *index, const char *path); +/** + * Find the first position of any entries matching a prefix. To find the first position + * of a path inside a given folder, suffix the prefix with a '/'. + * + * @param at_pos the address to which the position of the index entry is written (optional) + * @param index an existing index object + * @param prefix the prefix to search for + * @return 0 with valid value in at_pos; an error code otherwise + */ +GIT_EXTERN(int) git_index_find_prefix(size_t *at_pos, git_index *index, const char *prefix); + /**@}*/ /** @name Conflict Index Entry Functions |
