summaryrefslogtreecommitdiff
path: root/include/git2/index.h
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2011-12-26 18:37:31 +0100
committerClemens Buchacher <drizzd@aon.at>2011-12-30 20:14:05 +0100
commit599f2849bad898c5dfd212e0629f79783f75b700 (patch)
treeef7274cbb630ff363975248da5b0247fd12da47c /include/git2/index.h
parenta26a156349c6d59a80825b9c3f4c9c423fed5d3a (diff)
downloadlibgit2-599f2849bad898c5dfd212e0629f79783f75b700.tar.gz
add git_index_read_tree
Diffstat (limited to 'include/git2/index.h')
-rw-r--r--include/git2/index.h11
1 files changed, 11 insertions, 0 deletions
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