git_commit_create_buffer

Create a commit and write it into a buffer

Create a commit as with git_commit_create() but instead of writing it to the objectdb, write the contents of the object into a buffer.

Parameters

out_ libgit2_d.buffer.git_buf*

the buffer into which to write the commit object content

repo libgit2_d.types.git_repository*

Repository where the referenced tree and parents live

author const(libgit2_d.types.git_signature)*

Signature with author and author time of commit

committer const(libgit2_d.types.git_signature)*

Signature with committer and * commit time of commit

message_encoding const(char)*

The encoding for the message in the commit, represented with a standard encoding name. E.g. "UTF-8". If null, no encoding header is written and UTF-8 is assumed.

message const(char)*

Full message for this commit

tree const(libgit2_d.types.git_tree)*

An instance of a git_tree object that will be used as the tree for the commit. This tree object must also be owned by the given repo.

parent_count size_t

Number of parents for this commit

parents const(libgit2_d.types.git_commit)**

Array of parent_count pointers to git_commit objects that will be used as the parents for this commit. This array may be null if parent_count is 0 (root commit). All the given commits must be owned by the repo.

Return Value

Type: int

0 or an error code

Meta