summaryrefslogtreecommitdiff
path: root/tests/rebase/merge.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2014-10-03 19:02:29 -0400
committerEdward Thomson <ethomson@microsoft.com>2014-10-26 22:59:48 -0400
commit18b00406c6427eb8c9d96864448474e1d85017de (patch)
treeee02fd12ee4b8f84e5ed53ca59ac771734bba16e /tests/rebase/merge.c
parent796b03bd4969f170d8e7a7c9edd567f636b58cb3 (diff)
downloadlibgit2-18b00406c6427eb8c9d96864448474e1d85017de.tar.gz
s/git_merge_head/git_annotated_commit
Rename git_merge_head to git_annotated_commit, as it becomes used in more operations than just merge.
Diffstat (limited to 'tests/rebase/merge.c')
-rw-r--r--tests/rebase/merge.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/tests/rebase/merge.c b/tests/rebase/merge.c
index 80ca88b09..e7eb16713 100644
--- a/tests/rebase/merge.c
+++ b/tests/rebase/merge.c
@@ -26,7 +26,7 @@ void test_rebase_merge__next(void)
{
git_rebase *rebase;
git_reference *branch_ref, *upstream_ref;
- git_merge_head *branch_head, *upstream_head;
+ git_annotated_commit *branch_head, *upstream_head;
git_rebase_operation *rebase_operation;
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_status_list *status_list;
@@ -38,8 +38,8 @@ void test_rebase_merge__next(void)
cl_git_pass(git_reference_lookup(&branch_ref, repo, "refs/heads/beef"));
cl_git_pass(git_reference_lookup(&upstream_ref, repo, "refs/heads/master"));
- cl_git_pass(git_merge_head_from_ref(&branch_head, repo, branch_ref));
- cl_git_pass(git_merge_head_from_ref(&upstream_head, repo, upstream_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&branch_head, repo, branch_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&upstream_head, repo, upstream_ref));
cl_git_pass(git_rebase_init(&rebase, repo, branch_head, upstream_head, NULL, signature, NULL));
@@ -62,8 +62,8 @@ void test_rebase_merge__next(void)
cl_assert_equal_oid(&file1_id, &status_entry->head_to_index->new_file.id);
git_status_list_free(status_list);
- git_merge_head_free(branch_head);
- git_merge_head_free(upstream_head);
+ git_annotated_commit_free(branch_head);
+ git_annotated_commit_free(upstream_head);
git_reference_free(branch_ref);
git_reference_free(upstream_ref);
git_rebase_free(rebase);
@@ -73,7 +73,7 @@ void test_rebase_merge__next_with_conflicts(void)
{
git_rebase *rebase;
git_reference *branch_ref, *upstream_ref;
- git_merge_head *branch_head, *upstream_head;
+ git_annotated_commit *branch_head, *upstream_head;
git_rebase_operation *rebase_operation;
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_status_list *status_list;
@@ -105,8 +105,8 @@ void test_rebase_merge__next_with_conflicts(void)
cl_git_pass(git_reference_lookup(&branch_ref, repo, "refs/heads/asparagus"));
cl_git_pass(git_reference_lookup(&upstream_ref, repo, "refs/heads/master"));
- cl_git_pass(git_merge_head_from_ref(&branch_head, repo, branch_ref));
- cl_git_pass(git_merge_head_from_ref(&upstream_head, repo, upstream_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&branch_head, repo, branch_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&upstream_head, repo, upstream_ref));
cl_git_pass(git_rebase_init(&rebase, repo, branch_head, upstream_head, NULL, signature, NULL));
@@ -128,8 +128,8 @@ void test_rebase_merge__next_with_conflicts(void)
cl_assert_equal_file(expected_merge, strlen(expected_merge), "rebase/asparagus.txt");
git_status_list_free(status_list);
- git_merge_head_free(branch_head);
- git_merge_head_free(upstream_head);
+ git_annotated_commit_free(branch_head);
+ git_annotated_commit_free(upstream_head);
git_reference_free(branch_ref);
git_reference_free(upstream_ref);
git_rebase_free(rebase);
@@ -139,7 +139,7 @@ void test_rebase_merge__next_stops_with_iterover(void)
{
git_rebase *rebase;
git_reference *branch_ref, *upstream_ref;
- git_merge_head *branch_head, *upstream_head;
+ git_annotated_commit *branch_head, *upstream_head;
git_rebase_operation *rebase_operation;
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid commit_id;
@@ -150,8 +150,8 @@ void test_rebase_merge__next_stops_with_iterover(void)
cl_git_pass(git_reference_lookup(&branch_ref, repo, "refs/heads/beef"));
cl_git_pass(git_reference_lookup(&upstream_ref, repo, "refs/heads/master"));
- cl_git_pass(git_merge_head_from_ref(&branch_head, repo, branch_ref));
- cl_git_pass(git_merge_head_from_ref(&upstream_head, repo, upstream_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&branch_head, repo, branch_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&upstream_head, repo, upstream_ref));
cl_git_pass(git_rebase_init(&rebase, repo, branch_head, upstream_head, NULL, signature, NULL));
@@ -181,8 +181,8 @@ void test_rebase_merge__next_stops_with_iterover(void)
cl_assert_equal_file("5\n", 2, "rebase/.git/rebase-merge/end");
cl_assert_equal_file("5\n", 2, "rebase/.git/rebase-merge/msgnum");
- git_merge_head_free(branch_head);
- git_merge_head_free(upstream_head);
+ git_annotated_commit_free(branch_head);
+ git_annotated_commit_free(upstream_head);
git_reference_free(branch_ref);
git_reference_free(upstream_ref);
git_rebase_free(rebase);
@@ -192,7 +192,7 @@ void test_rebase_merge__commit(void)
{
git_rebase *rebase;
git_reference *branch_ref, *upstream_ref;
- git_merge_head *branch_head, *upstream_head;
+ git_annotated_commit *branch_head, *upstream_head;
git_rebase_operation *rebase_operation;
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid commit_id, tree_id, parent_id;
@@ -206,8 +206,8 @@ void test_rebase_merge__commit(void)
cl_git_pass(git_reference_lookup(&branch_ref, repo, "refs/heads/beef"));
cl_git_pass(git_reference_lookup(&upstream_ref, repo, "refs/heads/master"));
- cl_git_pass(git_merge_head_from_ref(&branch_head, repo, branch_ref));
- cl_git_pass(git_merge_head_from_ref(&upstream_head, repo, upstream_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&branch_head, repo, branch_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&upstream_head, repo, upstream_ref));
cl_git_pass(git_rebase_init(&rebase, repo, branch_head, upstream_head, NULL, signature, NULL));
@@ -243,8 +243,8 @@ void test_rebase_merge__commit(void)
git_reflog_free(reflog);
git_signature_free(author);
git_commit_free(commit);
- git_merge_head_free(branch_head);
- git_merge_head_free(upstream_head);
+ git_annotated_commit_free(branch_head);
+ git_annotated_commit_free(upstream_head);
git_reference_free(branch_ref);
git_reference_free(upstream_ref);
git_rebase_free(rebase);
@@ -254,7 +254,7 @@ void test_rebase_merge__commit_updates_rewritten(void)
{
git_rebase *rebase;
git_reference *branch_ref, *upstream_ref;
- git_merge_head *branch_head, *upstream_head;
+ git_annotated_commit *branch_head, *upstream_head;
git_rebase_operation *rebase_operation;
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid commit_id;
@@ -264,8 +264,8 @@ void test_rebase_merge__commit_updates_rewritten(void)
cl_git_pass(git_reference_lookup(&branch_ref, repo, "refs/heads/beef"));
cl_git_pass(git_reference_lookup(&upstream_ref, repo, "refs/heads/master"));
- cl_git_pass(git_merge_head_from_ref(&branch_head, repo, branch_ref));
- cl_git_pass(git_merge_head_from_ref(&upstream_head, repo, upstream_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&branch_head, repo, branch_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&upstream_head, repo, upstream_ref));
cl_git_pass(git_rebase_init(&rebase, repo, branch_head, upstream_head, NULL, signature, NULL));
@@ -282,8 +282,8 @@ void test_rebase_merge__commit_updates_rewritten(void)
"8d1f13f93c4995760ac07d129246ac1ff64c0be9 ba1f9b4fd5cf8151f7818be2111cc0869f1eb95a\n",
164, "rebase/.git/rebase-merge/rewritten");
- git_merge_head_free(branch_head);
- git_merge_head_free(upstream_head);
+ git_annotated_commit_free(branch_head);
+ git_annotated_commit_free(upstream_head);
git_reference_free(branch_ref);
git_reference_free(upstream_ref);
git_rebase_free(rebase);
@@ -293,7 +293,7 @@ void test_rebase_merge__commit_drops_already_applied(void)
{
git_rebase *rebase;
git_reference *branch_ref, *upstream_ref;
- git_merge_head *branch_head, *upstream_head;
+ git_annotated_commit *branch_head, *upstream_head;
git_rebase_operation *rebase_operation;
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid commit_id;
@@ -304,8 +304,8 @@ void test_rebase_merge__commit_drops_already_applied(void)
cl_git_pass(git_reference_lookup(&branch_ref, repo, "refs/heads/beef"));
cl_git_pass(git_reference_lookup(&upstream_ref, repo, "refs/heads/green_pea"));
- cl_git_pass(git_merge_head_from_ref(&branch_head, repo, branch_ref));
- cl_git_pass(git_merge_head_from_ref(&upstream_head, repo, upstream_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&branch_head, repo, branch_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&upstream_head, repo, upstream_ref));
cl_git_pass(git_rebase_init(&rebase, repo, branch_head, upstream_head, NULL, signature, NULL));
@@ -323,8 +323,8 @@ void test_rebase_merge__commit_drops_already_applied(void)
"8d1f13f93c4995760ac07d129246ac1ff64c0be9 2ac4fb7b74c1287f6c792acad759e1ec01e18dae\n",
82, "rebase/.git/rebase-merge/rewritten");
- git_merge_head_free(branch_head);
- git_merge_head_free(upstream_head);
+ git_annotated_commit_free(branch_head);
+ git_annotated_commit_free(upstream_head);
git_reference_free(branch_ref);
git_reference_free(upstream_ref);
git_rebase_free(rebase);
@@ -334,7 +334,7 @@ void test_rebase_merge__finish(void)
{
git_rebase *rebase;
git_reference *branch_ref, *upstream_ref, *head_ref;
- git_merge_head *branch_head, *upstream_head;
+ git_annotated_commit *branch_head, *upstream_head;
git_rebase_operation *rebase_operation;
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid commit_id;
@@ -347,8 +347,8 @@ void test_rebase_merge__finish(void)
cl_git_pass(git_reference_lookup(&branch_ref, repo, "refs/heads/gravy"));
cl_git_pass(git_reference_lookup(&upstream_ref, repo, "refs/heads/veal"));
- cl_git_pass(git_merge_head_from_ref(&branch_head, repo, branch_ref));
- cl_git_pass(git_merge_head_from_ref(&upstream_head, repo, upstream_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&branch_head, repo, branch_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&upstream_head, repo, upstream_ref));
cl_git_pass(git_rebase_init(&rebase, repo, branch_head, upstream_head, NULL, signature, NULL));
@@ -377,13 +377,13 @@ void test_rebase_merge__finish(void)
cl_git_pass(git_reflog_read(&reflog, repo, "refs/heads/gravy"));
cl_assert(reflog_entry = git_reflog_entry_byindex(reflog, 0));
- cl_assert_equal_oid(git_merge_head_id(branch_head), git_reflog_entry_id_old(reflog_entry));
+ cl_assert_equal_oid(git_annotated_commit_id(branch_head), git_reflog_entry_id_old(reflog_entry));
cl_assert_equal_oid(&commit_id, git_reflog_entry_id_new(reflog_entry));
cl_assert_equal_s("rebase finished: refs/heads/gravy onto f87d14a4a236582a0278a916340a793714256864", git_reflog_entry_message(reflog_entry));
git_reflog_free(reflog);
- git_merge_head_free(branch_head);
- git_merge_head_free(upstream_head);
+ git_annotated_commit_free(branch_head);
+ git_annotated_commit_free(upstream_head);
git_reference_free(head_ref);
git_reference_free(branch_ref);
git_reference_free(upstream_ref);
@@ -396,7 +396,7 @@ static void test_copy_note(
{
git_rebase *rebase;
git_reference *branch_ref, *upstream_ref;
- git_merge_head *branch_head, *upstream_head;
+ git_annotated_commit *branch_head, *upstream_head;
git_commit *branch_commit;
git_rebase_operation *rebase_operation;
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
@@ -409,8 +409,8 @@ static void test_copy_note(
cl_git_pass(git_reference_lookup(&branch_ref, repo, "refs/heads/gravy"));
cl_git_pass(git_reference_lookup(&upstream_ref, repo, "refs/heads/veal"));
- cl_git_pass(git_merge_head_from_ref(&branch_head, repo, branch_ref));
- cl_git_pass(git_merge_head_from_ref(&upstream_head, repo, upstream_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&branch_head, repo, branch_ref));
+ cl_git_pass(git_annotated_commit_from_ref(&upstream_head, repo, upstream_ref));
cl_git_pass(git_reference_peel((git_object **)&branch_commit,
branch_ref, GIT_OBJ_COMMIT));
@@ -442,8 +442,8 @@ static void test_copy_note(
git_note_free(note);
git_commit_free(branch_commit);
- git_merge_head_free(branch_head);
- git_merge_head_free(upstream_head);
+ git_annotated_commit_free(branch_head);
+ git_annotated_commit_free(upstream_head);
git_reference_free(branch_ref);
git_reference_free(upstream_ref);
git_rebase_free(rebase);