summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorjoshaber <joshaber@gmail.com>2015-07-22 11:33:18 -0400
committerjoshaber <joshaber@gmail.com>2015-07-22 11:33:18 -0400
commit9830fbba05ef66325f929a09407abc45ab85847d (patch)
treedac363428f4705a632719e03b8b77f2d32ce2bb3 /include/git2/diff.h
parentcf198fdf2a044d2e2f0675c2c6b1cd9cdbcf4fcf (diff)
parent42156d561723e92ffe597885719aa63abfe0795c (diff)
downloadlibgit2-fix-init-ordering.tar.gz
Merge branch 'master' into fix-init-orderingfix-init-ordering
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h19
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