diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2022-01-23 09:47:01 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-06-20 17:05:29 -0400 |
commit | 3fbf580c91935ccdea25a135204419991f503b63 (patch) | |
tree | 53ec861796641faf8895a1f19444c1939ac6be9a /tests/libgit2/pack | |
parent | 61838295a055c8c7a4a7eb730538c6e08a38dd6a (diff) | |
download | libgit2-3fbf580c91935ccdea25a135204419991f503b63.tar.gz |
oid: give oids a type
`git_oid`s now have a type, and we require the oid type when creating
the object id from creation functions.
Diffstat (limited to 'tests/libgit2/pack')
-rw-r--r-- | tests/libgit2/pack/indexer.c | 4 | ||||
-rw-r--r-- | tests/libgit2/pack/midx.c | 4 | ||||
-rw-r--r-- | tests/libgit2/pack/sharing.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/libgit2/pack/indexer.c b/tests/libgit2/pack/indexer.c index ec48ffd98..b531b2bff 100644 --- a/tests/libgit2/pack/indexer.c +++ b/tests/libgit2/pack/indexer.c @@ -157,7 +157,7 @@ void test_pack_indexer__fix_thin(void) /* Store the missing base into your ODB so the indexer can fix the pack */ cl_git_pass(git_odb_write(&id, odb, base_obj, base_obj_len, GIT_OBJECT_BLOB)); - git_oid_fromstr(&should_id, "e68fe8129b546b101aee9510c5328e7f21ca1d18"); + git_oid_fromstr(&should_id, "e68fe8129b546b101aee9510c5328e7f21ca1d18", GIT_OID_SHA1); cl_assert_equal_oid(&should_id, &id); cl_git_pass(git_indexer_new(&idx, ".", 0, odb, NULL)); @@ -222,7 +222,7 @@ void test_pack_indexer__corrupt_length(void) /* Store the missing base into your ODB so the indexer can fix the pack */ cl_git_pass(git_odb_write(&id, odb, base_obj, base_obj_len, GIT_OBJECT_BLOB)); - git_oid_fromstr(&should_id, "e68fe8129b546b101aee9510c5328e7f21ca1d18"); + git_oid_fromstr(&should_id, "e68fe8129b546b101aee9510c5328e7f21ca1d18", GIT_OID_SHA1); cl_assert_equal_oid(&should_id, &id); cl_git_pass(git_indexer_new(&idx, ".", 0, odb, NULL)); diff --git a/tests/libgit2/pack/midx.c b/tests/libgit2/pack/midx.c index 2a5c5a328..4bee16e90 100644 --- a/tests/libgit2/pack/midx.c +++ b/tests/libgit2/pack/midx.c @@ -19,7 +19,7 @@ void test_pack_midx__parse(void) cl_git_pass(git_midx_open(&idx, git_str_cstr(&midx_path))); cl_assert_equal_i(git_midx_needs_refresh(idx, git_str_cstr(&midx_path)), 0); - cl_git_pass(git_oid_fromstr(&id, "5001298e0c09ad9c34e4249bc5801c75e9754fa5")); + cl_git_pass(git_oid_fromstr(&id, "5001298e0c09ad9c34e4249bc5801c75e9754fa5", GIT_OID_SHA1)); cl_git_pass(git_midx_entry_find(&e, idx, &id, GIT_OID_SHA1_HEXSIZE)); cl_assert_equal_oid(&e.sha1, &id); cl_assert_equal_s( @@ -39,7 +39,7 @@ void test_pack_midx__lookup(void) cl_git_pass(git_repository_open(&repo, cl_fixture("testrepo.git"))); - cl_git_pass(git_oid_fromstr(&id, "5001298e0c09ad9c34e4249bc5801c75e9754fa5")); + cl_git_pass(git_oid_fromstr(&id, "5001298e0c09ad9c34e4249bc5801c75e9754fa5", GIT_OID_SHA1)); cl_git_pass(git_commit_lookup_prefix(&commit, repo, &id, GIT_OID_SHA1_HEXSIZE)); cl_assert_equal_s(git_commit_message(commit), "packed commit one\n"); diff --git a/tests/libgit2/pack/sharing.c b/tests/libgit2/pack/sharing.c index eaf7686b7..25495068a 100644 --- a/tests/libgit2/pack/sharing.c +++ b/tests/libgit2/pack/sharing.c @@ -18,7 +18,7 @@ void test_pack_sharing__open_two_repos(void) cl_git_pass(git_repository_open(&repo1, cl_fixture("testrepo.git"))); cl_git_pass(git_repository_open(&repo2, cl_fixture("testrepo.git"))); - git_oid_fromstr(&id, "a65fedf39aefe402d3bb6e24df4d4f5fe4547750"); + git_oid_fromstr(&id, "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", GIT_OID_SHA1); cl_git_pass(git_object_lookup(&obj1, repo1, &id, GIT_OBJECT_ANY)); cl_git_pass(git_object_lookup(&obj2, repo2, &id, GIT_OBJECT_ANY)); |