Method

GgitRepositorymerge

Declaration [src]

void
ggit_repository_merge (
  GgitRepository* repository,
  GgitAnnotatedCommit** their_heads,
  gsize their_heads_length,
  GgitMergeOptions* merge_opts,
  GgitCheckoutOptions* checkout_opts,
  GError** error
)

Description [src]

Merges the given commit(s) into HEAD, writing the results into the working directory. Any changes are staged for commit and any conflicts are written to the index.

Callers should inspect the repository’s index after this completes, resolve any conflicts and prepare a commit.

Parameters

their_heads

Type: An array of GgitAnnotatedCommit*

The heads to merge into.

The length of the array is specified in the their_heads_length argument.
The data is owned by the caller of the method.
their_heads_length

Type: gsize

The length of their_heads.

merge_opts

Type: GgitMergeOptions

Merge options.

The data is owned by the caller of the method.
checkout_opts

Type: GgitCheckoutOptions

Checkout options.

The data is owned by the caller of the method.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.