Method

GgitRepositorycreate_commit_buffer

Declaration [src]

gchar*
ggit_repository_create_commit_buffer (
  GgitRepository* repository,
  GgitSignature* author,
  GgitSignature* committer,
  const gchar* message_encoding,
  const gchar* message,
  GgitTree* tree,
  GgitCommit** parents,
  gint parent_count,
  GError** error
)

Description [src]

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

author GgitSignature
 

Author signature.

 The data is owned by the caller of the function.
committer GgitSignature
 

Committer signature (and time of commit).

 The data is owned by the caller of the function.
message_encoding const gchar*
 

Message encoding.

 The argument can be NULL.
 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
message const gchar*
 

Commit message.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
tree GgitTree
 

The tree of objects to commit.

 The data is owned by the caller of the function.
parents An array of GgitCommit
 

Parent commits.

 The length of the array is specified in the parent_count argument.
 The data is owned by the caller of the function.
parent_count gint
 

Number of parent commits in parents.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gchar*
 

The commit object content or NULL in case of an error.

 The caller of the method takes ownership of the data, and is responsible for freeing it.
 The return value can be NULL.
 The string is a NUL terminated UTF-8 string.