libgit2

git_diff_index_to_index

Version:

Create a diff with the difference between two index objects.

The first index will be used for the "old_file" side of the delta and the second index will be used for the "new_file" side of the delta.

Signature

int git_diff_index_to_index(git_diff **diff, git_repository *repo, git_index *old_index, git_index *new_index, const git_diff_options *opts);

Parameters

In
diff

Output pointer to a git_diff pointer to be allocated.

In
repo

The repository containing the indexes.

In
old_index

A git_index object to diff from.

In
new_index

A git_index object to diff to.

In
opts

Structure with options to influence diff or NULL for defaults.

Returns

int

Versions