[ Web Proxy ]
URL:
Viewing: https://libgit2.org/docs/reference/v0.11.0/commit/git_commit_create.html [Back]  [Original]

git_commit_create (libgit2 v0.11.0)
libgit2 [libgit2]

git_commit_create

Version: main v1.8.4 v1.8.3 v1.8.2 v1.8.2-rc1 v1.8.1 v1.8.0 v1.7.2 v1.7.1 v1.7.0 v1.6.5 v1.6.4 v1.6.3 v1.6.2 v1.6.1 v1.5.2 v1.5.1 v1.5.0 v1.4.6 v1.4.5 v1.4.4 v1.4.3 v1.4.2 v1.4.1 v1.4.0 v1.3.2 v1.3.1 v1.3.0 v1.2.0 v1.1.1 v1.1.0 v1.0.1 v1.0.0 v0.99.0 v0.28.5 v0.28.4 v0.28.3 v0.28.2 v0.28.1 v0.28.0 v0.28.0-rc1 v0.27.10 v0.27.9 v0.27.8 v0.27.7 v0.27.6 v0.27.5 v0.27.4 v0.27.3 v0.27.2 v0.27.1 v0.27.0 v0.27.0-rc3 v0.27.0-rc2 v0.27.0-rc1 v0.26.8 v0.26.7 v0.26.6 v0.26.5 v0.26.4 v0.26.3 v0.26.2 v0.26.1 v0.26.0 v0.26.0-rc2 v0.26.0-rc1 v0.25.1 v0.25.0 v0.25.0-rc2 v0.25.0-rc1 v0.24.6 v0.24.5 v0.24.4 v0.24.3 v0.24.2 v0.24.1 v0.24.0 v0.24.0-rc1 v0.23.4 v0.23.3 v0.23.2 v0.23.1 v0.23.0 v0.23.0-rc2 v0.23.0-rc1 v0.22.3 v0.22.2 v0.22.1 v0.22.0 v0.22.0-rc2 v0.22.0-rc1 v0.21.5 v0.21.4 v0.21.3 v0.21.2 v0.21.1 v0.21.0 v0.21.0-rc2 v0.21.0-rc1 v0.20.0 v0.19.0 v0.18.0 v0.17.0 v0.16.0 v0.15.0 v0.14.0 v0.13.0 v0.12.0 v0.11.0

Create a new commit in the repository

Signature

int git_commit_create(git_oid *oid, git_repository *repo, const char *update_ref, const git_signature *author, const git_signature *committer, const char *message, const git_oid *tree_oid, int parent_count, const git_oid **parent_oids);

Parameters

In
oid

Pointer where to store the OID of the newly created commit

In
repo

Repository where to store the commit

const char *
In
update_ref

If not NULL, name of the reference that will be updated to point to this commit. If the reference is not direct, it will be resolved to a direct reference. Use "HEAD" to update the HEAD of the current branch and make it point to this commit

In
author

Signature representing the author and the authory time of this commit

In
committer

Signature representing the committer and the commit time of this commit

const char *
In
message

Full message for this commit

In
tree_oid

Object ID of the tree for this commit. Note that no validation is performed on this OID. Use the _o variants of this method to assure a proper tree is passed to the commit.

int
In
parent_count

Number of parents for this commit

In
parent_oids

Returns

int

0 on success; error code otherwise The created commit will be written to the Object Database and the given reference will be updated to point to it

Versions

This open sourced site is hosted on GitHub. Patches, suggestions, and comments are welcome.

Web Proxy Viewer  |  New URL  |  Original Page