summaryrefslogtreecommitdiff
path: root/include/git2/commit.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2017-05-28 00:13:56 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2018-03-22 16:23:20 +0100
commite8eba1cfd86d04fc21c52624aa0b21ab0f9b0cb6 (patch)
tree1272fed90117fef93d17a96e96cdef41fecd8874 /include/git2/commit.h
parentb31cd43e7edc43c880e209d8ea6e942cf40e7002 (diff)
downloadlibgit2-e8eba1cfd86d04fc21c52624aa0b21ab0f9b0cb6.tar.gz
commit: rearrange _fromstate and _on_head variants
We now have `_fromstate` and `_fromstate_on_head`, the latter of which updates the current branch to point to the new commit.
Diffstat (limited to 'include/git2/commit.h')
-rw-r--r--include/git2/commit.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/include/git2/commit.h b/include/git2/commit.h
index 356b24688..fbe52fecd 100644
--- a/include/git2/commit.h
+++ b/include/git2/commit.h
@@ -353,20 +353,20 @@ GIT_EXTERN(int) git_commit_create_on(
const git_commit *parents[]);
/**
- * Create a commit and update the current branch
+ * Create a commit from the current state and update the current branch
*
- * @see git_commit_create
+ * Like `git_commit_create_fromstate`; additionally the current branch will be
+ * updated.
+ *
+ * @see git_commit_create_fromstate
*/
-GIT_EXTERN(int) git_commit_create_on_head(
+GIT_EXTERN(int) git_commit_create_fromstate_on_head(
git_oid *id,
git_repository *repo,
const git_signature *author,
const git_signature *committer,
const char *message_encoding,
- const char *message,
- const git_tree *tree,
- size_t parent_count,
- const git_commit *parents[]);
+ const char *message);
/**
* Create new commit in the repository using a variable argument list.
@@ -478,9 +478,8 @@ GIT_EXTERN(int) git_commit_create_buffer(
* variant takes the current state of the repository instead of
* arguments.
*
- * The current branch will be updated. The tree will be created from
- * the repository's index. The parents will be taken from HEAD and
- * MERGE_HEAD, if applicable.
+ * The tree will be created from the repository's index. The parents will be
+ * taken from HEAD and MERGE_HEAD, if applicable.
*
* @see git_commit_create
*/