summaryrefslogtreecommitdiff
path: root/include/git2/index.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/index.h')
-rw-r--r--include/git2/index.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/git2/index.h b/include/git2/index.h
index 1efca72b5..8e1a7e521 100644
--- a/include/git2/index.h
+++ b/include/git2/index.h
@@ -215,9 +215,12 @@ GIT_EXTERN(int) git_index_read_tree(git_index *index, git_tree *tree);
* The index instance cannot be bare, and needs to be associated
* to an existing repository.
*
+ * The index must not contain any file in conflict.
+ *
* @param oid Pointer where to store the OID of the written tree
* @param index Index to write
- * @return 0 or an error code
+ * @return 0 on success, GIT_EUNMERGED when the index is not clean
+ * or an error code
*/
GIT_EXTERN(int) git_index_write_tree(git_oid *oid, git_index *index);
@@ -228,10 +231,13 @@ GIT_EXTERN(int) git_index_write_tree(git_oid *oid, git_index *index);
* letting the user choose the repository where the tree will
* be written.
*
+ * The index must not contain any file in conflict.
+ *
* @param oid Pointer where to store OID of the the written tree
* @param index Index to write
* @param repo Repository where to write the tree
- * @return 0 or an error code
+ * @return 0 on success, GIT_EUNMERGED when the index is not clean
+ * or an error code
*/
GIT_EXTERN(int) git_index_write_tree_to(git_oid *oid, git_index *index, git_repository *repo);