Merge pull request #608 from schu/remove-unused-parameter diff_output: remove unused parameter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
diff --git a/include/git2/diff.h b/include/git2/diff.h
index ba2e21c..0176d1c 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -340,7 +340,6 @@ GIT_EXTERN(int) git_diff_print_patch(
* Directly run a text diff on two blobs.
*/
GIT_EXTERN(int) git_diff_blobs(
- git_repository *repo,
git_blob *old_blob,
git_blob *new_blob,
git_diff_options *options,
diff --git a/src/diff_output.c b/src/diff_output.c
index d5286ed..23f74d2 100644
--- a/src/diff_output.c
+++ b/src/diff_output.c
@@ -671,7 +671,6 @@ int git_diff_print_patch(
int git_diff_blobs(
- git_repository *repo,
git_blob *old_blob,
git_blob *new_blob,
git_diff_options *options,
@@ -686,8 +685,6 @@ int git_diff_blobs(
xdemitconf_t xdiff_config;
xdemitcb_t xdiff_callback;
- assert(repo);
-
if (options && (options->flags & GIT_DIFF_REVERSE)) {
git_blob *swap = old_blob;
old_blob = new_blob;
diff --git a/tests-clar/diff/blob.c b/tests-clar/diff/blob.c
index bdfe8ba..ed1f14a 100644
--- a/tests-clar/diff/blob.c
+++ b/tests-clar/diff/blob.c
@@ -43,7 +43,7 @@ void test_diff_blob__0(void)
memset(&exp, 0, sizeof(exp));
cl_git_pass(git_diff_blobs(
- g_repo, a, b, &opts, &exp, diff_hunk_fn, diff_line_fn));
+ a, b, &opts, &exp, diff_hunk_fn, diff_line_fn));
cl_assert(exp.hunks == 1);
cl_assert(exp.lines == 6);
@@ -53,7 +53,7 @@ void test_diff_blob__0(void)
memset(&exp, 0, sizeof(exp));
cl_git_pass(git_diff_blobs(
- g_repo, b, c, &opts, &exp, diff_hunk_fn, diff_line_fn));
+ b, c, &opts, &exp, diff_hunk_fn, diff_line_fn));
cl_assert(exp.hunks == 1);
cl_assert(exp.lines == 15);
@@ -63,7 +63,7 @@ void test_diff_blob__0(void)
memset(&exp, 0, sizeof(exp));
cl_git_pass(git_diff_blobs(
- g_repo, a, c, &opts, &exp, diff_hunk_fn, diff_line_fn));
+ a, c, &opts, &exp, diff_hunk_fn, diff_line_fn));
cl_assert(exp.hunks == 1);
cl_assert(exp.lines == 13);
@@ -75,7 +75,7 @@ void test_diff_blob__0(void)
memset(&exp, 0, sizeof(exp));
cl_git_pass(git_diff_blobs(
- g_repo, c, d, &opts, &exp, diff_hunk_fn, diff_line_fn));
+ c, d, &opts, &exp, diff_hunk_fn, diff_line_fn));
cl_assert(exp.hunks == 2);
cl_assert(exp.lines == 14);