]> git.proxmox.com Git - libgit2.git/blobdiff - tests/reset/mixed.c
New upstream version 1.4.3+dfsg.1
[libgit2.git] / tests / reset / mixed.c
index 9928c687121ed0b37494d0edf793124284f49f3f..4a78d4c37676d9cc02f4b4e2f610a9fdd79736f1 100644 (file)
@@ -50,7 +50,7 @@ void test_reset_mixed__resetting_refreshes_the_index_to_the_commit_tree(void)
 
 void test_reset_mixed__reflog_is_correct(void)
 {
-       git_buf buf = GIT_BUF_INIT;
+       git_str buf = GIT_STR_INIT;
        git_annotated_commit *annotated;
        const char *exp_msg = "commit: Updating test data so we can test inter-hunk-context";
 
@@ -68,12 +68,12 @@ void test_reset_mixed__reflog_is_correct(void)
 
        /* Moved branch, expect id in message */
        cl_git_pass(git_revparse_single(&target, repo, "HEAD~^{commit}"));
-       git_buf_clear(&buf);
-       cl_git_pass(git_buf_printf(&buf, "reset: moving to %s", git_oid_tostr_s(git_object_id(target))));
+       git_str_clear(&buf);
+       cl_git_pass(git_str_printf(&buf, "reset: moving to %s", git_oid_tostr_s(git_object_id(target))));
        cl_git_pass(git_reset(repo, target, GIT_RESET_MIXED, NULL));
-       reflog_check(repo, "HEAD", 10, NULL, git_buf_cstr(&buf));
-       reflog_check(repo, "refs/heads/master", 10, NULL, git_buf_cstr(&buf));
-       git_buf_dispose(&buf);
+       reflog_check(repo, "HEAD", 10, NULL, git_str_cstr(&buf));
+       reflog_check(repo, "refs/heads/master", 10, NULL, git_str_cstr(&buf));
+       git_str_dispose(&buf);
 
        /* Moved branch, expect revspec in message */
        exp_msg = "reset: moving to HEAD~^{commit}";