libgit2

git_index_reuc_add

Version:

Adds a resolve undo entry for a file based on the given parameters.

The resolve undo entry contains the OIDs of files that were involved in a merge conflict after the conflict has been resolved. This allows conflicts to be re-resolved later.

If there exists a resolve undo entry for the given path in the index, it will be removed.

This method will fail in bare index instances.

Signature

int git_index_reuc_add(git_index *index, const char *path, int ancestor_mode, const git_oid *ancestor_id, int our_mode, const git_oid *our_id, int their_mode, const git_oid *their_id);

Parameters

In
index

an existing index object

const char *
In
path

filename to add

int
In
ancestor_mode

mode of the ancestor file

In
ancestor_id

oid of the ancestor file

int
In
our_mode

mode of our file

In
our_id

oid of our file

int
In
their_mode

mode of their file

In
their_id

oid of their file

Returns

int

0 or an error code

Versions