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";
/* 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}";