diff options
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/index.h | 10 | ||||
| -rw-r--r-- | include/git2/tree.h | 8 |
2 files changed, 14 insertions, 4 deletions
diff --git a/include/git2/index.h b/include/git2/index.h index ad6d19733..9f9d144cf 100644 --- a/include/git2/index.h +++ b/include/git2/index.h @@ -403,11 +403,12 @@ GIT_EXTERN(int) git_index_remove_bypath(git_index *index, const char *path); * Find the first index of any entries which point to given * path in the Git index. * + * @param at_pos the address to which the position of the index entry is written (optional) * @param index an existing index object * @param path path to search - * @return an index >= 0 if found, -1 otherwise + * @return 0 if found, < 0 otherwise (GIT_ENOTFOUND) */ -GIT_EXTERN(int) git_index_find(git_index *index, const char *path); +GIT_EXTERN(int) git_index_find(size_t *at_pos, git_index *index, const char *path); /**@}*/ @@ -495,11 +496,12 @@ GIT_EXTERN(unsigned int) git_index_reuc_entrycount(git_index *index); * Finds the resolve undo entry that points to the given path in the Git * index. * + * @param at_pos the address to which the position of the reuc entry is written (optional) * @param index an existing index object * @param path path to search - * @return an index >= 0 if found, -1 otherwise + * @return 0 if found, < 0 otherwise (GIT_ENOTFOUND) */ -GIT_EXTERN(int) git_index_reuc_find(git_index *index, const char *path); +GIT_EXTERN(int) git_index_reuc_find(size_t *at_pos, git_index *index, const char *path); /** * Get a resolve undo entry from the index. diff --git a/include/git2/tree.h b/include/git2/tree.h index 3861102d9..73bfc86f4 100644 --- a/include/git2/tree.h +++ b/include/git2/tree.h @@ -259,6 +259,14 @@ GIT_EXTERN(int) git_treebuilder_create( GIT_EXTERN(void) git_treebuilder_clear(git_treebuilder *bld); /** + * Get the number of entries listed in a treebuilder + * + * @param tree a previously loaded treebuilder. + * @return the number of entries in the treebuilder + */ +GIT_EXTERN(unsigned int) git_treebuilder_entrycount(git_treebuilder *bld); + +/** * Free a tree builder * * This will clear all the entries and free to builder. |
