summaryrefslogtreecommitdiff
path: root/include/git2/sys/commit.h
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-04-22 04:06:11 -0700
committerVicent Martí <vicent@github.com>2013-04-22 04:06:11 -0700
commitf063a75882769cb6fc652de425ac16ba4b88b616 (patch)
tree8c9f02ac9b2e46846367098d3b6328c01cac7781 /include/git2/sys/commit.h
parentbfb4facb3a5e0b650811560fc49d27247fd9d85d (diff)
parent21ca045100337bcb2905a20a72d42721d18871f9 (diff)
downloadlibgit2-f063a75882769cb6fc652de425ac16ba4b88b616.tar.gz
Merge pull request #1485 from libgit2/include-git2-sys
Create include/git2/sys and move backend APIs there
Diffstat (limited to 'include/git2/sys/commit.h')
-rw-r--r--include/git2/sys/commit.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/include/git2/sys/commit.h b/include/git2/sys/commit.h
new file mode 100644
index 000000000..096e028c5
--- /dev/null
+++ b/include/git2/sys/commit.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) the libgit2 contributors. All rights reserved.
+ *
+ * This file is part of libgit2, distributed under the GNU GPL v2 with
+ * a Linking Exception. For full terms see the included COPYING file.
+ */
+#ifndef INCLUDE_sys_git_commit_h__
+#define INCLUDE_sys_git_commit_h__
+
+#include "git2/common.h"
+#include "git2/types.h"
+#include "git2/oid.h"
+
+/**
+ * @file git2/sys/commit.h
+ * @brief Low-level Git commit creation
+ * @defgroup git_backend Git custom backend APIs
+ * @ingroup Git
+ * @{
+ */
+GIT_BEGIN_DECL
+
+/**
+ * Create new commit in the repository from a list of `git_oid` values
+ *
+ * See documentation for `git_commit_create()` for information about the
+ * parameters, as the meaning is identical excepting that `tree` and
+ * `parents` now take `git_oid`. This is a dangerous API in that the
+ * `parents` list of `git_oid`s in not checked for validity.
+ */
+GIT_EXTERN(int) git_commit_create_from_oids(
+ git_oid *oid,
+ git_repository *repo,
+ const char *update_ref,
+ const git_signature *author,
+ const git_signature *committer,
+ const char *message_encoding,
+ const char *message,
+ const git_oid *tree,
+ int parent_count,
+ const git_oid *parents[]);
+
+/** @} */
+GIT_END_DECL
+#endif