libgit2

commit

Version:
Git commit parsing, formatting routines

Objects

Parsed representation of a commit object

Structs

An array of commits returned from the library

Macros

Callbacks

Commit creation callback: used when a function is going to create commits (for example, in git_rebase_commit) to allow callers to override the commit creation behavior wish to sign commits by providing this information to git_commit_create_buffer, signing that buffer, then calling git_commit_create_with_signature. The resultant commit id should be set in the out object id parameter.

Functions

Lookup a commit object from a repository

Lookup a commit object from a repository, given a prefix of its identifier (short id)

Close an open commit

Get the id of a commit

Get the repository that contains the commit

Get the encoding for the message of a commit, as a string representing a standard encoding name

Get the full message of a commit

Get the full raw message of a commit

Get the short "summary" of the git commit message

Get the long "body" of the git commit message

Get the commit time (i

Get the commit timezone offset (i

Get the committer of a commit

Get the author of a commit

Get the committer of a commit, using the mailmap to map names and email addresses to canonical real names and email addresses

Get the author of a commit, using the mailmap to map names and email addresses to canonical real names and email addresses

Get the full raw text of the commit header

Get the tree pointed to by a commit

Get the id of the tree pointed to by a commit git_commit_tree in that no attempts are made to fetch an object from the ODB.

Get the number of parents of this commit

Get the specified parent of the commit

Get the oid of a specified parent for a commit git_commit_parent, which will attempt to load the parent commit from the ODB.

Get the commit object that is the <n>th generation ancestor of the named commit object, following only the first parents The returned commit has to be freed by the caller.

Get an arbitrary header field

Extract the signature from a commit

Create new commit in the repository from a list of git_object pointers

Create new commit in the repository using a variable argument list

Commits the staged changes in the repository; this is a near analog to git commit -m message

Amend an existing commit by replacing only non-NULL values

Create a commit and write it into a buffer

Create a commit object from the given buffer and signature

Create an in-memory copy of a commit free'd or it will leak.

Free the commits contained in a commit array be called on git_commitarray objects that were provided by the library. Not doing so will result in a memory leak.