diff options
author | Russell Belfer <rb@github.com> | 2013-04-19 13:17:29 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-04-21 11:50:56 -0700 |
commit | 9233b3de4ea264a8ae846c784acc70c505022d8b (patch) | |
tree | e56ee572c4f4c13f8f2a1324d2a03cb4394246f7 /include/git2/sys/commit.h | |
parent | 9255039898bf4c625f678f390c8075c11d10cad0 (diff) | |
download | libgit2-9233b3de4ea264a8ae846c784acc70c505022d8b.tar.gz |
Move git_commit_create_from_oids into sys/commit.h
Actually this renames git_commit_create_oid to
git_commit_create_from_oids and moves the API declaration to
include/git2/sys/commit.h since it is a dangerous API for general
use (because it doesn't check that the OID list items actually
refer to real objects).
Diffstat (limited to 'include/git2/sys/commit.h')
-rw-r--r-- | include/git2/sys/commit.h | 45 |
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 |