summaryrefslogtreecommitdiff
path: root/include/git2/commit.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/commit.h')
-rw-r--r--include/git2/commit.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/git2/commit.h b/include/git2/commit.h
index 692b3bdd9..e184e1cc6 100644
--- a/include/git2/commit.h
+++ b/include/git2/commit.h
@@ -443,6 +443,27 @@ GIT_EXTERN(int) git_commit_create_buffer(
size_t parent_count,
const git_commit *parents[]);
+/*
+ * Create a new commit from the current state and update the current branch
+ *
+ * Creates a new commit, similarly to the other functions. This
+ * 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.
+ *
+ * @see git_commit_create
+ */
+GIT_EXTERN(int) git_commit_create_fromstate(
+ git_oid *id,
+ git_repository *repo,
+ const git_signature *author,
+ const git_signature *committer,
+ const char *message_encoding,
+ const char *message);
+
/**
* Create a commit object from the given buffer and signature
*