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/network | |
| 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/network')
| -rw-r--r-- | tests/libgit2/network/remote/push.c | 5 | ||||
| -rw-r--r-- | tests/libgit2/network/remote/rename.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/libgit2/network/remote/push.c b/tests/libgit2/network/remote/push.c index 3905debdf..16588a292 100644 --- a/tests/libgit2/network/remote/push.c +++ b/tests/libgit2/network/remote/push.c @@ -1,5 +1,6 @@ #include "clar_libgit2.h" #include "git2/sys/commit.h" +#include "oid.h" static git_remote *_remote; static git_repository *_repo, *_dummy; @@ -57,7 +58,7 @@ void test_network_remote_push__delete_notification(void) expected.src_refname = ""; expected.dst_refname = "refs/heads/master"; - memset(&expected.dst, 0, sizeof(git_oid)); + git_oid_clear(&expected.dst, GIT_OID_SHA1); git_oid_cpy(&expected.src, git_reference_target(ref)); opts.callbacks.push_negotiation = negotiation_cb; @@ -102,7 +103,7 @@ void test_network_remote_push__create_notification(void) expected.src_refname = "refs/heads/empty-tree"; expected.dst_refname = "refs/heads/empty-tree"; git_oid_cpy(&expected.dst, git_reference_target(ref)); - memset(&expected.src, 0, sizeof(git_oid)); + git_oid_clear(&expected.src, GIT_OID_SHA1); opts.callbacks.push_negotiation = negotiation_cb; opts.callbacks.payload = &expected; diff --git a/tests/libgit2/network/remote/rename.c b/tests/libgit2/network/remote/rename.c index d4446b8aa..61bfc8c56 100644 --- a/tests/libgit2/network/remote/rename.c +++ b/tests/libgit2/network/remote/rename.c @@ -170,7 +170,7 @@ void test_network_remote_rename__overwrite_ref_in_target(void) git_branch_iterator *iter; git_strarray problems = {0}; - cl_git_pass(git_oid_fromstr(&id, "a65fedf39aefe402d3bb6e24df4d4f5fe4547750")); + cl_git_pass(git_oid_fromstr(&id, "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", GIT_OID_SHA1)); cl_git_pass(git_reference_create(&ref, _repo, "refs/remotes/renamed/master", &id, 1, NULL)); git_reference_free(ref); |
