Fixing unit tests post rebase Some changes that merged cleanly actually broke the unit tests, so this fixes them.
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
diff --git a/tests-clar/diff/diff_helpers.c b/tests-clar/diff/diff_helpers.c
index 80c6480..cd5a0f9 100644
--- a/tests-clar/diff/diff_helpers.c
+++ b/tests-clar/diff/diff_helpers.c
@@ -84,23 +84,3 @@ int diff_line_fn(
}
return 0;
}
-
-git_tree *resolve_commit_oid_to_tree(
- git_repository *repo,
- const char *partial_oid)
-{
- size_t len = strlen(partial_oid);
- git_oid oid;
- git_object *obj;
- git_tree *tree;
-
- if (git_oid_fromstrn(&oid, partial_oid, len) == 0)
- git_object_lookup_prefix(&obj, repo, &oid, len, GIT_OBJ_ANY);
- cl_assert(obj);
- if (git_object_type(obj) == GIT_OBJ_TREE)
- return (git_tree *)obj;
- cl_assert(git_object_type(obj) == GIT_OBJ_COMMIT);
- cl_git_pass(git_commit_tree(&tree, (git_commit *)obj));
- git_object_free(obj);
- return tree;
-}
diff --git a/tests-clar/diff/iterator.c b/tests-clar/diff/iterator.c
index d6b548e..185a37a 100644
--- a/tests-clar/diff/iterator.c
+++ b/tests-clar/diff/iterator.c
@@ -238,9 +238,9 @@ static const char *expected_index_oids_0[] = {
"5819a185d77b03325aaf87cafc771db36f6ddca7",
"ff69f8639ce2e6010b3f33a74160aad98b48da2b",
"45141a79a77842c59a63229403220a4e4be74e3d",
- "45141a79a77842c59a63229403220a4e4be74e3d",
- "45141a79a77842c59a63229403220a4e4be74e3d",
- "fb5067b1aef3ac1ada4b379dbcb7d17255df7d78",
+ "4d713dc48e6b1bd75b0d61ad078ba9ca3a56745d",
+ "108bb4e7fd7b16490dc33ff7d972151e73d7166e",
+ "fe773770c5a6cc7185580c9204b1ff18a33ff3fc",
"99eae476896f4907224978b88e5ecaa6c5bb67a9",
"3e42ffc54a663f9401cc25843d6c0e71a33e4249",
"e563cf4758f0d646f1b14b76016aa17fa9e549a4",