diff options
Diffstat (limited to 'tests/libgit2/diff/binary.c')
-rw-r--r-- | tests/libgit2/diff/binary.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/libgit2/diff/binary.c b/tests/libgit2/diff/binary.c index 4e71f39c6..3bf39f34a 100644 --- a/tests/libgit2/diff/binary.c +++ b/tests/libgit2/diff/binary.c @@ -31,12 +31,12 @@ static void test_patch( git_patch *patch; git_buf actual = GIT_BUF_INIT; - cl_git_pass(git_oid_fromstr(&id_one, one)); + cl_git_pass(git_oid__fromstr(&id_one, one, GIT_OID_SHA1)); cl_git_pass(git_commit_lookup(&commit_one, repo, &id_one)); cl_git_pass(git_commit_tree(&tree_one, commit_one)); if (two) { - cl_git_pass(git_oid_fromstr(&id_two, two)); + cl_git_pass(git_oid__fromstr(&id_two, two, GIT_OID_SHA1)); cl_git_pass(git_commit_lookup(&commit_two, repo, &id_two)); cl_git_pass(git_commit_tree(&tree_two, commit_two)); } else { @@ -100,7 +100,7 @@ void test_diff_binary__add(void) "\n"; opts.flags = GIT_DIFF_SHOW_BINARY; - opts.id_abbrev = GIT_OID_HEXSZ; + opts.id_abbrev = GIT_OID_SHA1_HEXSIZE; repo = cl_git_sandbox_init("diff_format_email"); test_patch( @@ -183,7 +183,7 @@ void test_diff_binary__delete(void) "\n"; opts.flags = GIT_DIFF_SHOW_BINARY; - opts.id_abbrev = GIT_OID_HEXSZ; + opts.id_abbrev = GIT_OID_SHA1_HEXSIZE; repo = cl_git_sandbox_init("diff_format_email"); test_patch( @@ -215,7 +215,7 @@ void test_diff_binary__delta(void) "\n"; opts.flags = GIT_DIFF_SHOW_BINARY | GIT_DIFF_FORCE_BINARY; - opts.id_abbrev = GIT_OID_HEXSZ; + opts.id_abbrev = GIT_OID_SHA1_HEXSIZE; repo = cl_git_sandbox_init("renames"); cl_git_pass(git_repository_index(&index, repo)); @@ -257,7 +257,7 @@ void test_diff_binary__delta_append(void) "\n"; opts.flags = GIT_DIFF_SHOW_BINARY | GIT_DIFF_FORCE_BINARY; - opts.id_abbrev = GIT_OID_HEXSZ; + opts.id_abbrev = GIT_OID_SHA1_HEXSIZE; repo = cl_git_sandbox_init("renames"); cl_git_pass(git_repository_index(&index, repo)); @@ -285,11 +285,11 @@ void test_diff_binary__empty_for_no_diff(void) git_str actual = GIT_STR_INIT; opts.flags = GIT_DIFF_SHOW_BINARY | GIT_DIFF_FORCE_BINARY; - opts.id_abbrev = GIT_OID_HEXSZ; + opts.id_abbrev = GIT_OID_SHA1_HEXSIZE; repo = cl_git_sandbox_init("renames"); - cl_git_pass(git_oid_fromstr(&id, "19dd32dfb1520a64e5bbaae8dce6ef423dfa2f13")); + cl_git_pass(git_oid__fromstr(&id, "19dd32dfb1520a64e5bbaae8dce6ef423dfa2f13", GIT_OID_SHA1)); cl_git_pass(git_commit_lookup(&commit, repo, &id)); cl_git_pass(git_commit_tree(&tree, commit)); @@ -323,7 +323,7 @@ void test_diff_binary__index_to_workdir(void) "\n"; opts.flags = GIT_DIFF_SHOW_BINARY | GIT_DIFF_FORCE_BINARY; - opts.id_abbrev = GIT_OID_HEXSZ; + opts.id_abbrev = GIT_OID_SHA1_HEXSIZE; repo = cl_git_sandbox_init("renames"); cl_git_pass(git_repository_index(&index, repo)); @@ -389,7 +389,7 @@ void test_diff_binary__print_patch_from_diff(void) "\n"; opts.flags = GIT_DIFF_SHOW_BINARY | GIT_DIFF_FORCE_BINARY; - opts.id_abbrev = GIT_OID_HEXSZ; + opts.id_abbrev = GIT_OID_SHA1_HEXSIZE; repo = cl_git_sandbox_init("renames"); cl_git_pass(git_repository_index(&index, repo)); @@ -501,7 +501,7 @@ void test_diff_binary__blob_to_blob(void) struct diff_data diff_data = {0}; opts.flags = GIT_DIFF_SHOW_BINARY | GIT_DIFF_FORCE_BINARY; - opts.id_abbrev = GIT_OID_HEXSZ; + opts.id_abbrev = GIT_OID_SHA1_HEXSIZE; repo = cl_git_sandbox_init("renames"); cl_git_pass(git_repository_index__weakptr(&index, repo)); @@ -510,8 +510,8 @@ void test_diff_binary__blob_to_blob(void) cl_git_pass(git_index_add_bypath(index, "untimely.txt")); cl_git_pass(git_index_write(index)); - git_oid_fromstr(&old_id, "9a69d960ae94b060f56c2a8702545e2bb1abb935"); - git_oid_fromstr(&new_id, "1111d4f11f4b35bf6759e0fb714fe09731ef0840"); + git_oid__fromstr(&old_id, "9a69d960ae94b060f56c2a8702545e2bb1abb935", GIT_OID_SHA1); + git_oid__fromstr(&new_id, "1111d4f11f4b35bf6759e0fb714fe09731ef0840", GIT_OID_SHA1); cl_git_pass(git_blob_lookup(&old_blob, repo, &old_id)); cl_git_pass(git_blob_lookup(&new_blob, repo, &new_id)); |