summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorPierre-Olivier Latour <pol@mac.com>2015-06-30 09:30:20 -0700
committerPierre-Olivier Latour <pol@mac.com>2015-06-30 10:03:32 -0700
commitccef5adb63bdba7f5182aec9f0bdc83a2887d9d1 (patch)
treead391dc12dbdb5777b3bd0114c0c1013f17f2688 /include/git2/diff.h
parent3451c871cb81310cefa41cae8e0e76a4944428a5 (diff)
downloadlibgit2-ccef5adb63bdba7f5182aec9f0bdc83a2887d9d1.tar.gz
Added git_diff_index_to_index()
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