diff options
Diffstat (limited to 'tests/merge/analysis.c')
-rw-r--r-- | tests/merge/analysis.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/merge/analysis.c b/tests/merge/analysis.c index 1432a7d11..8c61303e3 100644 --- a/tests/merge/analysis.c +++ b/tests/merge/analysis.c @@ -53,28 +53,28 @@ static void analysis_from_branch( const char *our_branchname, const char *their_branchname) { - git_buf our_refname = GIT_BUF_INIT; - git_buf their_refname = GIT_BUF_INIT; + git_str our_refname = GIT_STR_INIT; + git_str their_refname = GIT_STR_INIT; git_reference *our_ref; git_reference *their_ref; git_annotated_commit *their_head; if (our_branchname != NULL) { - cl_git_pass(git_buf_printf(&our_refname, "%s%s", GIT_REFS_HEADS_DIR, our_branchname)); - cl_git_pass(git_reference_lookup(&our_ref, repo, git_buf_cstr(&our_refname))); + cl_git_pass(git_str_printf(&our_refname, "%s%s", GIT_REFS_HEADS_DIR, our_branchname)); + cl_git_pass(git_reference_lookup(&our_ref, repo, git_str_cstr(&our_refname))); } else { cl_git_pass(git_reference_lookup(&our_ref, repo, GIT_HEAD_FILE)); } - cl_git_pass(git_buf_printf(&their_refname, "%s%s", GIT_REFS_HEADS_DIR, their_branchname)); + cl_git_pass(git_str_printf(&their_refname, "%s%s", GIT_REFS_HEADS_DIR, their_branchname)); - cl_git_pass(git_reference_lookup(&their_ref, repo, git_buf_cstr(&their_refname))); + cl_git_pass(git_reference_lookup(&their_ref, repo, git_str_cstr(&their_refname))); cl_git_pass(git_annotated_commit_from_ref(&their_head, repo, their_ref)); cl_git_pass(git_merge_analysis_for_ref(merge_analysis, merge_pref, repo, our_ref, (const git_annotated_commit **)&their_head, 1)); - git_buf_dispose(&our_refname); - git_buf_dispose(&their_refname); + git_str_dispose(&our_refname); + git_str_dispose(&their_refname); git_annotated_commit_free(their_head); git_reference_free(our_ref); git_reference_free(their_ref); @@ -120,15 +120,15 @@ void test_merge_analysis__unborn(void) { git_merge_analysis_t merge_analysis; git_merge_preference_t merge_pref; - git_buf master = GIT_BUF_INIT; + git_str master = GIT_STR_INIT; - cl_git_pass(git_buf_joinpath(&master, git_repository_path(repo), "refs/heads/master")); - cl_must_pass(p_unlink(git_buf_cstr(&master))); + cl_git_pass(git_str_joinpath(&master, git_repository_path(repo), "refs/heads/master")); + cl_must_pass(p_unlink(git_str_cstr(&master))); analysis_from_branch(&merge_analysis, &merge_pref, NULL, NOFASTFORWARD_BRANCH); cl_assert_equal_i(GIT_MERGE_ANALYSIS_FASTFORWARD|GIT_MERGE_ANALYSIS_UNBORN, merge_analysis); - git_buf_dispose(&master); + git_str_dispose(&master); } void test_merge_analysis__fastforward_with_config_noff(void) |