diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2022-01-22 23:10:03 -0500 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-06-14 22:29:57 -0400 |
| commit | dbc4ac1c76827e954e0aa27afe8bb7e0b8993a93 (patch) | |
| tree | 56f18a11bca8d17490a176cddf9e3756c2cebe91 /tests/libgit2/refs | |
| parent | f98dd5438f8d7bfd557b612fdf1605b1c3fb8eaf (diff) | |
| download | libgit2-dbc4ac1c76827e954e0aa27afe8bb7e0b8993a93.tar.gz | |
oid: `GIT_OID_*SZ` is now `GIT_OID_SHA1_*SIZE`
In preparation for SHA256 support, `GIT_OID_RAWSZ` and `GIT_OID_HEXSZ`
need to indicate that they're the size of _SHA1_ OIDs.
Diffstat (limited to 'tests/libgit2/refs')
| -rw-r--r-- | tests/libgit2/refs/reflog/reflog_helpers.c | 6 | ||||
| -rw-r--r-- | tests/libgit2/refs/revparse.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/libgit2/refs/reflog/reflog_helpers.c b/tests/libgit2/refs/reflog/reflog_helpers.c index 2ea41ee06..f62d27edd 100644 --- a/tests/libgit2/refs/reflog/reflog_helpers.c +++ b/tests/libgit2/refs/reflog/reflog_helpers.c @@ -6,12 +6,12 @@ int reflog_entry_tostr(git_str *out, const git_reflog_entry *entry) { - char old_oid[GIT_OID_HEXSZ], new_oid[GIT_OID_HEXSZ]; + char old_oid[GIT_OID_SHA1_HEXSIZE], new_oid[GIT_OID_SHA1_HEXSIZE]; assert(out && entry); - git_oid_tostr((char *)&old_oid, GIT_OID_HEXSZ, git_reflog_entry_id_old(entry)); - git_oid_tostr((char *)&new_oid, GIT_OID_HEXSZ, git_reflog_entry_id_new(entry)); + git_oid_tostr((char *)&old_oid, GIT_OID_SHA1_HEXSIZE, git_reflog_entry_id_old(entry)); + git_oid_tostr((char *)&new_oid, GIT_OID_SHA1_HEXSIZE, git_reflog_entry_id_new(entry)); return git_str_printf(out, "%s %s %s %s", old_oid, new_oid, "somesig", git_reflog_entry_message(entry)); } diff --git a/tests/libgit2/refs/revparse.c b/tests/libgit2/refs/revparse.c index 56af3c939..02ffe005d 100644 --- a/tests/libgit2/refs/revparse.c +++ b/tests/libgit2/refs/revparse.c @@ -652,7 +652,7 @@ void test_refs_revparse__try_to_retrieve_branch_before_described_tag(void) git_repository *repo; git_reference *branch; git_object *target; - char sha[GIT_OID_HEXSZ + 1]; + char sha[GIT_OID_SHA1_HEXSIZE + 1]; repo = cl_git_sandbox_init("testrepo.git"); @@ -661,7 +661,7 @@ void test_refs_revparse__try_to_retrieve_branch_before_described_tag(void) cl_git_pass(git_revparse_single(&target, repo, "HEAD~3")); cl_git_pass(git_branch_create(&branch, repo, "blah-7-gc47800c", (git_commit *)target, 0)); - git_oid_tostr(sha, GIT_OID_HEXSZ + 1, git_object_id(target)); + git_oid_tostr(sha, GIT_OID_SHA1_HEXSIZE + 1, git_object_id(target)); test_object_inrepo("blah-7-gc47800c", sha, repo); @@ -690,7 +690,7 @@ void test_refs_revparse__try_to_retrieve_sha_before_branch(void) git_repository *repo; git_reference *branch; git_object *target; - char sha[GIT_OID_HEXSZ + 1]; + char sha[GIT_OID_SHA1_HEXSIZE + 1]; repo = cl_git_sandbox_init("testrepo.git"); @@ -699,7 +699,7 @@ void test_refs_revparse__try_to_retrieve_sha_before_branch(void) cl_git_pass(git_revparse_single(&target, repo, "HEAD~3")); cl_git_pass(git_branch_create(&branch, repo, "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", (git_commit *)target, 0)); - git_oid_tostr(sha, GIT_OID_HEXSZ + 1, git_object_id(target)); + git_oid_tostr(sha, GIT_OID_SHA1_HEXSIZE + 1, git_object_id(target)); test_object_inrepo("a65fedf39aefe402d3bb6e24df4d4f5fe4547750", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", repo); test_object_inrepo("heads/a65fedf39aefe402d3bb6e24df4d4f5fe4547750", sha, repo); @@ -726,7 +726,7 @@ void test_refs_revparse__try_to_retrieve_branch_before_abbrev_sha(void) git_repository *repo; git_reference *branch; git_object *target; - char sha[GIT_OID_HEXSZ + 1]; + char sha[GIT_OID_SHA1_HEXSIZE + 1]; repo = cl_git_sandbox_init("testrepo.git"); @@ -735,7 +735,7 @@ void test_refs_revparse__try_to_retrieve_branch_before_abbrev_sha(void) cl_git_pass(git_revparse_single(&target, repo, "HEAD~3")); cl_git_pass(git_branch_create(&branch, repo, "c47800", (git_commit *)target, 0)); - git_oid_tostr(sha, GIT_OID_HEXSZ + 1, git_object_id(target)); + git_oid_tostr(sha, GIT_OID_SHA1_HEXSIZE + 1, git_object_id(target)); test_object_inrepo("c47800", sha, repo); |
