libgit2

git_commit_new

Version:

Create a new in-memory git_commit.

The commit object must be manually filled using setter methods before it can be written to its repository.

Signature

int git_commit_new(git_commit **commit, git_repository *repo);

Parameters

In
commit

pointer to the new commit

In
repo

The repository where the object will reside

Returns

int

0 on success; error code otherwise

Versions