diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2015-07-07 12:38:47 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-07-07 12:38:47 +0200 |
| commit | 3704ac35d32a274339a66cd51abce6dbea315022 (patch) | |
| tree | 8a006f891a9624f355f0c22c2bfa06a001edfa61 /include/git2 | |
| parent | ea445e06028a1192e7e948cc81c87c4b39bc446e (diff) | |
| parent | ccef5adb63bdba7f5182aec9f0bdc83a2887d9d1 (diff) | |
| download | libgit2-3704ac35d32a274339a66cd51abce6dbea315022.tar.gz | |
Merge pull request #3277 from git-up/git_diff_index_to_index
Added git_diff_index_to_index()
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/diff.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h index b3ab5397e..0abbc7f06 100644 --- a/include/git2/diff.h +++ b/include/git2/diff.h @@ -836,6 +836,25 @@ GIT_EXTERN(int) git_diff_tree_to_workdir_with_index( const git_diff_options *opts); /**< can be NULL for defaults */ /** + * 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. + * + * @param diff Output pointer to a git_diff pointer to be allocated. + * @param repo The repository containing the indexes. + * @param old_index A git_index object to diff from. + * @param new_index A git_index object to diff to. + * @param opts Structure with options to influence diff or NULL for defaults. + */ +GIT_EXTERN(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); /**< can be NULL for defaults */ + +/** * Merge one diff into another. * * This merges items from the "from" list into the "onto" list. The |
