diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2022-07-13 21:08:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-13 21:08:04 -0400 |
| commit | 433a133402fae298f8ee7613bcfd997c2712d269 (patch) | |
| tree | 17c4d0c86faaeae71f65d28cc0ba0d60b481a2ea /tests/libgit2/pack | |
| parent | 21b70f09b4e3db188bf5e5813a9912ae89de355d (diff) | |
| parent | 6013b6a0dc5897386bfc8db6e07447c055f2fd94 (diff) | |
| download | libgit2-433a133402fae298f8ee7613bcfd997c2712d269.tar.gz | |
Merge pull request #6191 from libgit2/ethomson/sha256_poc
RFC: SHA256 proof of concept
Diffstat (limited to 'tests/libgit2/pack')
| -rw-r--r-- | tests/libgit2/pack/indexer.c | 4 | ||||
| -rw-r--r-- | tests/libgit2/pack/midx.c | 8 | ||||
| -rw-r--r-- | tests/libgit2/pack/sharing.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/libgit2/pack/indexer.c b/tests/libgit2/pack/indexer.c index 94b2cc92e..8633b201a 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 9dd949363..4bee16e90 100644 --- a/tests/libgit2/pack/midx.c +++ b/tests/libgit2/pack/midx.c @@ -19,8 +19,8 @@ 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_midx_entry_find(&e, idx, &id, GIT_OID_HEXSZ)); + 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( (const char *)git_vector_get(&idx->packfile_names, e.pack_index), @@ -39,8 +39,8 @@ 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_commit_lookup_prefix(&commit, repo, &id, GIT_OID_HEXSZ)); + 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"); git_commit_free(commit); 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)); |
