From 599f2849bad898c5dfd212e0629f79783f75b700 Mon Sep 17 00:00:00 2001 From: Clemens Buchacher Date: Mon, 26 Dec 2011 18:37:31 +0100 Subject: add git_index_read_tree --- include/git2/index.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/git2/index.h') diff --git a/include/git2/index.h b/include/git2/index.h index 5e9c34d4b..627d6c4fd 100644 --- a/include/git2/index.h +++ b/include/git2/index.h @@ -301,6 +301,17 @@ GIT_EXTERN(const git_index_entry_unmerged *) git_index_get_unmerged_byindex(git_ */ GIT_EXTERN(int) git_index_entry_stage(const git_index_entry *entry); +/** + * Read a tree into the index file + * + * The current index contents will be replaced by the specified tree. + * + * @param index an existing index object + * @param tree tree to read + * @return GIT_SUCCESS or an error code + */ +GIT_EXTERN(int) git_index_read_tree(git_index *index, git_tree *tree); + /** @} */ GIT_END_DECL #endif -- cgit v1.2.1