summaryrefslogtreecommitdiff
path: root/tests-clar/diff/index.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-11-14 23:29:48 -0800
committerRussell Belfer <rb@github.com>2012-11-14 23:29:48 -0800
commitbbe6dbec81d2050fb52b600bc27e2dacdc780e77 (patch)
tree61f442146ed5b98352016f4ecec3ac4736e10c8c /tests-clar/diff/index.c
parentbad68c0a998116685ad75cab84210004dd2c5be1 (diff)
downloadlibgit2-bbe6dbec81d2050fb52b600bc27e2dacdc780e77.tar.gz
Add explicit git_index ptr to diff and checkout
A number of diff APIs and the `git_checkout_index` API take a `git_repository` object an operate on the index. This updates them to take a `git_index` pointer explicitly and only fall back on the `git_repository` index if the index input is NULL. This makes it easier to operate on a temporary index.
Diffstat (limited to 'tests-clar/diff/index.c')
-rw-r--r--tests-clar/diff/index.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests-clar/diff/index.c b/tests-clar/diff/index.c
index dede9419b..4b96bfa09 100644
--- a/tests-clar/diff/index.c
+++ b/tests-clar/diff/index.c
@@ -32,7 +32,7 @@ void test_diff_index__0(void)
memset(&exp, 0, sizeof(exp));
- cl_git_pass(git_diff_index_to_tree(&diff, g_repo, a, &opts));
+ cl_git_pass(git_diff_index_to_tree(&diff, g_repo, a, NULL, &opts));
cl_git_pass(git_diff_foreach(
diff, &exp, diff_file_fn, diff_hunk_fn, diff_line_fn));
@@ -60,7 +60,7 @@ void test_diff_index__0(void)
diff = NULL;
memset(&exp, 0, sizeof(exp));
- cl_git_pass(git_diff_index_to_tree(&diff, g_repo, b, &opts));
+ cl_git_pass(git_diff_index_to_tree(&diff, g_repo, b, NULL, &opts));
cl_git_pass(git_diff_foreach(
diff, &exp, diff_file_fn, diff_hunk_fn, diff_line_fn));
@@ -125,7 +125,7 @@ void test_diff_index__1(void)
memset(&exp, 0, sizeof(exp));
- cl_git_pass(git_diff_index_to_tree(&diff, g_repo, a, &opts));
+ cl_git_pass(git_diff_index_to_tree(&diff, g_repo, a, NULL, &opts));
cl_assert_equal_i(
GIT_EUSER,