diff options
Diffstat (limited to 'tests/object/lookup.c')
-rw-r--r-- | tests/object/lookup.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/object/lookup.c b/tests/object/lookup.c index 2458537fc..a7b1ceeb4 100644 --- a/tests/object/lookup.c +++ b/tests/object/lookup.c @@ -66,13 +66,13 @@ void test_object_lookup__lookup_corrupt_object_returns_error(void) { const char *commit = "8e73b769e97678d684b809b163bebdae2911720f", *file = "objects/8e/73b769e97678d684b809b163bebdae2911720f"; - git_buf path = GIT_BUF_INIT, contents = GIT_BUF_INIT; + git_str path = GIT_STR_INIT, contents = GIT_STR_INIT; git_oid oid; git_object *object; size_t i; cl_git_pass(git_oid_fromstr(&oid, commit)); - cl_git_pass(git_buf_joinpath(&path, git_repository_path(g_repo), file)); + cl_git_pass(git_str_joinpath(&path, git_repository_path(g_repo), file)); cl_git_pass(git_futils_readbuffer(&contents, path.ptr)); /* Corrupt and try to read the object */ @@ -88,8 +88,8 @@ void test_object_lookup__lookup_corrupt_object_returns_error(void) cl_git_pass(git_object_lookup(&object, g_repo, &oid, GIT_OBJECT_COMMIT)); git_object_free(object); - git_buf_dispose(&path); - git_buf_dispose(&contents); + git_str_dispose(&path); + git_str_dispose(&contents); } void test_object_lookup__lookup_object_with_wrong_hash_returns_error(void) @@ -97,15 +97,15 @@ void test_object_lookup__lookup_object_with_wrong_hash_returns_error(void) const char *oldloose = "objects/8e/73b769e97678d684b809b163bebdae2911720f", *newloose = "objects/8e/73b769e97678d684b809b163bebdae2911720e", *commit = "8e73b769e97678d684b809b163bebdae2911720e"; - git_buf oldpath = GIT_BUF_INIT, newpath = GIT_BUF_INIT; + git_str oldpath = GIT_STR_INIT, newpath = GIT_STR_INIT; git_object *object; git_oid oid; cl_git_pass(git_oid_fromstr(&oid, commit)); /* Copy object to another location with wrong hash */ - cl_git_pass(git_buf_joinpath(&oldpath, git_repository_path(g_repo), oldloose)); - cl_git_pass(git_buf_joinpath(&newpath, git_repository_path(g_repo), newloose)); + cl_git_pass(git_str_joinpath(&oldpath, git_repository_path(g_repo), oldloose)); + cl_git_pass(git_str_joinpath(&newpath, git_repository_path(g_repo), newloose)); cl_git_pass(git_futils_cp(oldpath.ptr, newpath.ptr, 0644)); /* Verify that lookup fails due to a hashsum mismatch */ @@ -117,6 +117,6 @@ void test_object_lookup__lookup_object_with_wrong_hash_returns_error(void) cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, 1)); git_object_free(object); - git_buf_dispose(&oldpath); - git_buf_dispose(&newpath); + git_str_dispose(&oldpath); + git_str_dispose(&newpath); } |