summaryrefslogtreecommitdiff
path: root/tests/libgit2/merge/workdir
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libgit2/merge/workdir')
-rw-r--r--tests/libgit2/merge/workdir/dirty.c2
-rw-r--r--tests/libgit2/merge/workdir/setup.c110
-rw-r--r--tests/libgit2/merge/workdir/simple.c18
-rw-r--r--tests/libgit2/merge/workdir/trivial.c4
4 files changed, 67 insertions, 67 deletions
diff --git a/tests/libgit2/merge/workdir/dirty.c b/tests/libgit2/merge/workdir/dirty.c
index b9c2ad033..36b42a103 100644
--- a/tests/libgit2/merge/workdir/dirty.c
+++ b/tests/libgit2/merge/workdir/dirty.c
@@ -94,7 +94,7 @@ static int merge_branch(void)
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
int error;
- cl_git_pass(git_oid_fromstr(&their_oids[0], MERGE_BRANCH_OID));
+ cl_git_pass(git_oid__fromstr(&their_oids[0], MERGE_BRANCH_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_head, repo, &their_oids[0]));
checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE;
diff --git a/tests/libgit2/merge/workdir/setup.c b/tests/libgit2/merge/workdir/setup.c
index 3db2d074f..98ccdf700 100644
--- a/tests/libgit2/merge/workdir/setup.c
+++ b/tests/libgit2/merge/workdir/setup.c
@@ -78,7 +78,7 @@ void test_merge_workdir_setup__one_branch(void)
git_reference *octo1_ref;
git_annotated_commit *our_head, *their_heads[1];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
@@ -104,10 +104,10 @@ void test_merge_workdir_setup__one_oid(void)
git_oid octo1_oid;
git_annotated_commit *our_head, *their_heads[1];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
- cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
+ cl_git_pass(git_oid__fromstr(&octo1_oid, OCTO1_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[0], repo, &octo1_oid));
cl_git_pass(git_merge__setup(repo, our_head, (const git_annotated_commit **)their_heads, 1));
@@ -129,7 +129,7 @@ void test_merge_workdir_setup__two_branches(void)
git_reference *octo2_ref;
git_annotated_commit *our_head, *their_heads[2];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
@@ -162,7 +162,7 @@ void test_merge_workdir_setup__three_branches(void)
git_reference *octo3_ref;
git_annotated_commit *our_head, *their_heads[3];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
@@ -200,16 +200,16 @@ void test_merge_workdir_setup__three_oids(void)
git_oid octo3_oid;
git_annotated_commit *our_head, *their_heads[3];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
- cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
+ cl_git_pass(git_oid__fromstr(&octo1_oid, OCTO1_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[0], repo, &octo1_oid));
- cl_git_pass(git_oid_fromstr(&octo2_oid, OCTO2_OID));
+ cl_git_pass(git_oid__fromstr(&octo2_oid, OCTO2_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[1], repo, &octo2_oid));
- cl_git_pass(git_oid_fromstr(&octo3_oid, OCTO3_OID));
+ cl_git_pass(git_oid__fromstr(&octo3_oid, OCTO3_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[2], repo, &octo3_oid));
cl_git_pass(git_merge__setup(repo, our_head, (const git_annotated_commit **)their_heads, 3));
@@ -233,13 +233,13 @@ void test_merge_workdir_setup__branches_and_oids_1(void)
git_oid octo2_oid;
git_annotated_commit *our_head, *their_heads[2];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
cl_git_pass(git_annotated_commit_from_ref(&their_heads[0], repo, octo1_ref));
- cl_git_pass(git_oid_fromstr(&octo2_oid, OCTO2_OID));
+ cl_git_pass(git_oid__fromstr(&octo2_oid, OCTO2_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[1], repo, &octo2_oid));
cl_git_pass(git_merge__setup(repo, our_head, (const git_annotated_commit **)their_heads, 2));
@@ -266,19 +266,19 @@ void test_merge_workdir_setup__branches_and_oids_2(void)
git_oid octo4_oid;
git_annotated_commit *our_head, *their_heads[4];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
cl_git_pass(git_annotated_commit_from_ref(&their_heads[0], repo, octo1_ref));
- cl_git_pass(git_oid_fromstr(&octo2_oid, OCTO2_OID));
+ cl_git_pass(git_oid__fromstr(&octo2_oid, OCTO2_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[1], repo, &octo2_oid));
cl_git_pass(git_reference_lookup(&octo3_ref, repo, GIT_REFS_HEADS_DIR OCTO3_BRANCH));
cl_git_pass(git_annotated_commit_from_ref(&their_heads[2], repo, octo3_ref));
- cl_git_pass(git_oid_fromstr(&octo4_oid, OCTO4_OID));
+ cl_git_pass(git_oid__fromstr(&octo4_oid, OCTO4_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[3], repo, &octo4_oid));
cl_git_pass(git_merge__setup(repo, our_head, (const git_annotated_commit **)their_heads, 4));
@@ -308,16 +308,16 @@ void test_merge_workdir_setup__branches_and_oids_3(void)
git_reference *octo4_ref;
git_annotated_commit *our_head, *their_heads[4];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
- cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
+ cl_git_pass(git_oid__fromstr(&octo1_oid, OCTO1_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[0], repo, &octo1_oid));
cl_git_pass(git_reference_lookup(&octo2_ref, repo, GIT_REFS_HEADS_DIR OCTO2_BRANCH));
cl_git_pass(git_annotated_commit_from_ref(&their_heads[1], repo, octo2_ref));
- cl_git_pass(git_oid_fromstr(&octo3_oid, OCTO3_OID));
+ cl_git_pass(git_oid__fromstr(&octo3_oid, OCTO3_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[2], repo, &octo3_oid));
cl_git_pass(git_reference_lookup(&octo4_ref, repo, GIT_REFS_HEADS_DIR OCTO4_BRANCH));
@@ -351,16 +351,16 @@ void test_merge_workdir_setup__branches_and_oids_4(void)
git_reference *octo5_ref;
git_annotated_commit *our_head, *their_heads[5];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
- cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
+ cl_git_pass(git_oid__fromstr(&octo1_oid, OCTO1_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[0], repo, &octo1_oid));
cl_git_pass(git_reference_lookup(&octo2_ref, repo, GIT_REFS_HEADS_DIR OCTO2_BRANCH));
cl_git_pass(git_annotated_commit_from_ref(&their_heads[1], repo, octo2_ref));
- cl_git_pass(git_oid_fromstr(&octo3_oid, OCTO3_OID));
+ cl_git_pass(git_oid__fromstr(&octo3_oid, OCTO3_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[2], repo, &octo3_oid));
cl_git_pass(git_reference_lookup(&octo4_ref, repo, GIT_REFS_HEADS_DIR OCTO4_BRANCH));
@@ -397,7 +397,7 @@ void test_merge_workdir_setup__three_same_branches(void)
git_reference *octo1_3_ref;
git_annotated_commit *our_head, *their_heads[3];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
@@ -435,16 +435,16 @@ void test_merge_workdir_setup__three_same_oids(void)
git_oid octo1_3_oid;
git_annotated_commit *our_head, *their_heads[3];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
- cl_git_pass(git_oid_fromstr(&octo1_1_oid, OCTO1_OID));
+ cl_git_pass(git_oid__fromstr(&octo1_1_oid, OCTO1_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[0], repo, &octo1_1_oid));
- cl_git_pass(git_oid_fromstr(&octo1_2_oid, OCTO1_OID));
+ cl_git_pass(git_oid__fromstr(&octo1_2_oid, OCTO1_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[1], repo, &octo1_2_oid));
- cl_git_pass(git_oid_fromstr(&octo1_3_oid, OCTO1_OID));
+ cl_git_pass(git_oid__fromstr(&octo1_3_oid, OCTO1_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[2], repo, &octo1_3_oid));
cl_git_pass(git_merge__setup(repo, our_head, (const git_annotated_commit **)their_heads, 3));
@@ -512,7 +512,7 @@ void test_merge_workdir_setup__remote_tracking_one_branch(void)
cl_git_pass(create_remote_tracking_branch(OCTO1_BRANCH, OCTO1_OID));
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_REMOTES_DIR "origin/" OCTO1_BRANCH));
@@ -542,7 +542,7 @@ void test_merge_workdir_setup__remote_tracking_two_branches(void)
cl_git_pass(create_remote_tracking_branch(OCTO1_BRANCH, OCTO1_OID));
cl_git_pass(create_remote_tracking_branch(OCTO2_BRANCH, OCTO2_OID));
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_REMOTES_DIR "origin/" OCTO1_BRANCH));
@@ -579,7 +579,7 @@ void test_merge_workdir_setup__remote_tracking_three_branches(void)
cl_git_pass(create_remote_tracking_branch(OCTO2_BRANCH, OCTO2_OID));
cl_git_pass(create_remote_tracking_branch(OCTO3_BRANCH, OCTO3_OID));
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_REMOTES_DIR "origin/" OCTO1_BRANCH));
@@ -618,7 +618,7 @@ void test_merge_workdir_setup__normal_branch_and_remote_tracking_branch(void)
cl_git_pass(create_remote_tracking_branch(OCTO2_BRANCH, OCTO2_OID));
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
@@ -652,7 +652,7 @@ void test_merge_workdir_setup__remote_tracking_branch_and_normal_branch(void)
cl_git_pass(create_remote_tracking_branch(OCTO1_BRANCH, OCTO1_OID));
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_REMOTES_DIR "origin/" OCTO1_BRANCH));
@@ -689,7 +689,7 @@ void test_merge_workdir_setup__two_remote_tracking_branch_and_two_normal_branche
cl_git_pass(create_remote_tracking_branch(OCTO2_BRANCH, OCTO2_OID));
cl_git_pass(create_remote_tracking_branch(OCTO4_BRANCH, OCTO4_OID));
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
@@ -730,10 +730,10 @@ void test_merge_workdir_setup__pull_one(void)
git_oid octo1_1_oid;
git_annotated_commit *our_head, *their_heads[1];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
- cl_git_pass(git_oid_fromstr(&octo1_1_oid, OCTO1_OID));
+ cl_git_pass(git_oid__fromstr(&octo1_1_oid, OCTO1_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&their_heads[0], repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH, "http://remote.url/repo.git", &octo1_1_oid));
cl_git_pass(git_merge__setup(repo, our_head, (const git_annotated_commit **)their_heads, 1));
@@ -755,13 +755,13 @@ void test_merge_workdir_setup__pull_two(void)
git_oid octo2_oid;
git_annotated_commit *our_head, *their_heads[2];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
- cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
+ cl_git_pass(git_oid__fromstr(&octo1_oid, OCTO1_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&their_heads[0], repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH, "http://remote.url/repo.git", &octo1_oid));
- cl_git_pass(git_oid_fromstr(&octo2_oid, OCTO2_OID));
+ cl_git_pass(git_oid__fromstr(&octo2_oid, OCTO2_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&their_heads[1], repo, GIT_REFS_HEADS_DIR OCTO2_BRANCH, "http://remote.url/repo.git", &octo2_oid));
cl_git_pass(git_merge__setup(repo, our_head, (const git_annotated_commit **)their_heads, 2));
@@ -785,16 +785,16 @@ void test_merge_workdir_setup__pull_three(void)
git_oid octo3_oid;
git_annotated_commit *our_head, *their_heads[3];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
- cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
+ cl_git_pass(git_oid__fromstr(&octo1_oid, OCTO1_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&their_heads[0], repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH, "http://remote.url/repo.git", &octo1_oid));
- cl_git_pass(git_oid_fromstr(&octo2_oid, OCTO2_OID));
+ cl_git_pass(git_oid__fromstr(&octo2_oid, OCTO2_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&their_heads[1], repo, GIT_REFS_HEADS_DIR OCTO2_BRANCH, "http://remote.url/repo.git", &octo2_oid));
- cl_git_pass(git_oid_fromstr(&octo3_oid, OCTO3_OID));
+ cl_git_pass(git_oid__fromstr(&octo3_oid, OCTO3_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&their_heads[2], repo, GIT_REFS_HEADS_DIR OCTO3_BRANCH, "http://remote.url/repo.git", &octo3_oid));
cl_git_pass(git_merge__setup(repo, our_head, (const git_annotated_commit **)their_heads, 3));
@@ -818,16 +818,16 @@ void test_merge_workdir_setup__three_remotes(void)
git_oid octo3_oid;
git_annotated_commit *our_head, *their_heads[3];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
- cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
+ cl_git_pass(git_oid__fromstr(&octo1_oid, OCTO1_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&their_heads[0], repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH, "http://remote.first/repo.git", &octo1_oid));
- cl_git_pass(git_oid_fromstr(&octo2_oid, OCTO2_OID));
+ cl_git_pass(git_oid__fromstr(&octo2_oid, OCTO2_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&their_heads[1], repo, GIT_REFS_HEADS_DIR OCTO2_BRANCH, "http://remote.second/repo.git", &octo2_oid));
- cl_git_pass(git_oid_fromstr(&octo3_oid, OCTO3_OID));
+ cl_git_pass(git_oid__fromstr(&octo3_oid, OCTO3_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&their_heads[2], repo, GIT_REFS_HEADS_DIR OCTO3_BRANCH, "http://remote.third/repo.git", &octo3_oid));
cl_git_pass(git_merge__setup(repo, our_head, (const git_annotated_commit **)their_heads, 3));
@@ -852,19 +852,19 @@ void test_merge_workdir_setup__two_remotes(void)
git_oid octo4_oid;
git_annotated_commit *our_head, *their_heads[4];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
- cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
+ cl_git_pass(git_oid__fromstr(&octo1_oid, OCTO1_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&their_heads[0], repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH, "http://remote.first/repo.git", &octo1_oid));
- cl_git_pass(git_oid_fromstr(&octo2_oid, OCTO2_OID));
+ cl_git_pass(git_oid__fromstr(&octo2_oid, OCTO2_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&their_heads[1], repo, GIT_REFS_HEADS_DIR OCTO2_BRANCH, "http://remote.second/repo.git", &octo2_oid));
- cl_git_pass(git_oid_fromstr(&octo3_oid, OCTO3_OID));
+ cl_git_pass(git_oid__fromstr(&octo3_oid, OCTO3_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&their_heads[2], repo, GIT_REFS_HEADS_DIR OCTO3_BRANCH, "http://remote.first/repo.git", &octo3_oid));
- cl_git_pass(git_oid_fromstr(&octo4_oid, OCTO4_OID));
+ cl_git_pass(git_oid__fromstr(&octo4_oid, OCTO4_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&their_heads[3], repo, GIT_REFS_HEADS_DIR OCTO4_BRANCH, "http://remote.second/repo.git", &octo4_oid));
cl_git_pass(git_merge__setup(repo, our_head, (const git_annotated_commit **)their_heads, 4));
@@ -888,7 +888,7 @@ void test_merge_workdir_setup__id_from_head(void)
git_reference *ref;
git_annotated_commit *heads[3];
- cl_git_pass(git_oid_fromstr(&expected_id, OCTO1_OID));
+ cl_git_pass(git_oid__fromstr(&expected_id, OCTO1_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_from_fetchhead(&heads[0], repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH, "http://remote.url/repo.git", &expected_id));
id = git_annotated_commit_id(heads[0]);
cl_assert_equal_i(1, git_oid_equal(id, &expected_id));
@@ -920,7 +920,7 @@ static int annotated_commit_foreach_cb(const git_oid *oid, void *payload)
git_oid expected_oid;
struct annotated_commit_cb_data *cb_data = payload;
- git_oid_fromstr(&expected_oid, cb_data->oid_str[cb_data->i]);
+ git_oid__fromstr(&expected_oid, cb_data->oid_str[cb_data->i], GIT_OID_SHA1);
cl_assert(git_oid_cmp(&expected_oid, oid) == 0);
cb_data->i++;
return 0;
@@ -998,7 +998,7 @@ void test_merge_workdir_setup__retained_after_success(void)
git_reference *octo1_ref;
git_annotated_commit *our_head, *their_heads[1];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
@@ -1025,7 +1025,7 @@ void test_merge_workdir_setup__removed_after_failure(void)
git_reference *octo1_ref;
git_annotated_commit *our_head, *their_heads[1];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
@@ -1052,7 +1052,7 @@ void test_merge_workdir_setup__unlocked_after_success(void)
git_reference *octo1_ref;
git_annotated_commit *our_head, *their_heads[1];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
@@ -1075,7 +1075,7 @@ void test_merge_workdir_setup__unlocked_after_conflict(void)
git_reference *octo1_ref;
git_annotated_commit *our_head, *their_heads[1];
- cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
+ cl_git_pass(git_oid__fromstr(&our_oid, ORIG_HEAD, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&our_head, repo, &our_oid));
cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
diff --git a/tests/libgit2/merge/workdir/simple.c b/tests/libgit2/merge/workdir/simple.c
index b9d3fc24c..e9cffeea8 100644
--- a/tests/libgit2/merge/workdir/simple.c
+++ b/tests/libgit2/merge/workdir/simple.c
@@ -99,7 +99,7 @@ static void merge_simple_branch(int merge_file_favor, int addl_checkout_strategy
git_merge_options merge_opts = GIT_MERGE_OPTIONS_INIT;
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
- cl_git_pass(git_oid_fromstr(&their_oids[0], THEIRS_SIMPLE_OID));
+ cl_git_pass(git_oid__fromstr(&their_oids[0], THEIRS_SIMPLE_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[0], repo, &their_oids[0]));
merge_opts.file_favor = merge_file_favor;
@@ -180,14 +180,14 @@ void test_merge_workdir_simple__index_reload(void)
cl_git_pass(git_index_read(repo_index, 0));
entry.mode = GIT_FILEMODE_BLOB;
- cl_git_pass(git_oid_fromstr(&entry.id, "11deab00b2d3a6f5a3073988ac050c2d7b6655e2"));
+ cl_git_pass(git_oid__fromstr(&entry.id, "11deab00b2d3a6f5a3073988ac050c2d7b6655e2", GIT_OID_SHA1));
entry.path = "automergeable.txt";
cl_git_pass(git_index_add(repo_index, &entry));
cl_git_pass(git_index_add_bypath(tmp_index, "automergeable.txt"));
cl_git_pass(git_index_write(tmp_index));
- cl_git_pass(git_oid_fromstr(&their_oid, THEIRS_SIMPLE_OID));
+ cl_git_pass(git_oid__fromstr(&their_oid, THEIRS_SIMPLE_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[0], repo, &their_oid));
cl_git_pass(git_merge(repo, (const git_annotated_commit **)their_heads, 1, NULL, NULL));
@@ -669,7 +669,7 @@ void test_merge_workdir_simple__directory_file(void)
cl_git_pass(git_commit_lookup(&head_commit, repo, &head_commit_id));
cl_git_pass(git_reset(repo, (git_object *)head_commit, GIT_RESET_HARD, NULL));
- cl_git_pass(git_oid_fromstr(&their_oids[0], THEIRS_DIRECTORY_FILE));
+ cl_git_pass(git_oid__fromstr(&their_oids[0], THEIRS_DIRECTORY_FILE, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[0], repo, &their_oids[0]));
merge_opts.file_favor = 0;
@@ -700,7 +700,7 @@ void test_merge_workdir_simple__unrelated(void)
{ 0100644, "c8f06f2e3bb2964174677e91f0abead0e43c9e5d", 0, "unchanged.txt" },
};
- cl_git_pass(git_oid_fromstr(&their_oids[0], THEIRS_UNRELATED_PARENT));
+ cl_git_pass(git_oid__fromstr(&their_oids[0], THEIRS_UNRELATED_PARENT, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[0], repo, &their_oids[0]));
merge_opts.file_favor = 0;
@@ -731,7 +731,7 @@ void test_merge_workdir_simple__unrelated_with_conflicts(void)
{ 0100644, "c8f06f2e3bb2964174677e91f0abead0e43c9e5d", 0, "unchanged.txt" },
};
- cl_git_pass(git_oid_fromstr(&their_oids[0], THEIRS_UNRELATED_OID));
+ cl_git_pass(git_oid__fromstr(&their_oids[0], THEIRS_UNRELATED_OID, GIT_OID_SHA1));
cl_git_pass(git_annotated_commit_lookup(&their_heads[0], repo, &their_oids[0]));
merge_opts.file_favor = 0;
@@ -755,8 +755,8 @@ void test_merge_workdir_simple__binary(void)
{ 0100644, "836b8b82b26cab22eaaed8820877c76d6c8bca19", 3, "binary" },
};
- cl_git_pass(git_oid_fromstr(&our_oid, "cc338e4710c9b257106b8d16d82f86458d5beaf1"));
- cl_git_pass(git_oid_fromstr(&their_oid, "ad01aebfdf2ac13145efafe3f9fcf798882f1730"));
+ cl_git_pass(git_oid__fromstr(&our_oid, "cc338e4710c9b257106b8d16d82f86458d5beaf1", GIT_OID_SHA1));
+ cl_git_pass(git_oid__fromstr(&their_oid, "ad01aebfdf2ac13145efafe3f9fcf798882f1730", GIT_OID_SHA1));
cl_git_pass(git_commit_lookup(&our_commit, repo, &our_oid));
cl_git_pass(git_reset(repo, (git_object *)our_commit, GIT_RESET_HARD, NULL));
@@ -770,7 +770,7 @@ void test_merge_workdir_simple__binary(void)
cl_git_pass(git_index_add_bypath(repo_index, "binary"));
cl_assert((binary_entry = git_index_get_bypath(repo_index, "binary", 0)) != NULL);
- cl_git_pass(git_oid_fromstr(&our_file_oid, "23ed141a6ae1e798b2f721afedbe947c119111ba"));
+ cl_git_pass(git_oid__fromstr(&our_file_oid, "23ed141a6ae1e798b2f721afedbe947c119111ba", GIT_OID_SHA1));
cl_assert(git_oid_cmp(&binary_entry->id, &our_file_oid) == 0);
git_annotated_commit_free(their_head);
diff --git a/tests/libgit2/merge/workdir/trivial.c b/tests/libgit2/merge/workdir/trivial.c
index fe8374851..364182c89 100644
--- a/tests/libgit2/merge/workdir/trivial.c
+++ b/tests/libgit2/merge/workdir/trivial.c
@@ -222,7 +222,7 @@ void test_merge_workdir_trivial__13(void)
cl_git_pass(merge_trivial("trivial-13", "trivial-13-branch"));
cl_assert(entry = git_index_get_bypath(repo_index, "modified-in-13.txt", 0));
- cl_git_pass(git_oid_fromstr(&expected_oid, "1cff9ec6a47a537380dedfdd17c9e76d74259a2b"));
+ cl_git_pass(git_oid__fromstr(&expected_oid, "1cff9ec6a47a537380dedfdd17c9e76d74259a2b", GIT_OID_SHA1));
cl_assert(git_oid_cmp(&entry->id, &expected_oid) == 0);
cl_assert(git_index_reuc_entrycount(repo_index) == 0);
@@ -238,7 +238,7 @@ void test_merge_workdir_trivial__14(void)
cl_git_pass(merge_trivial("trivial-14", "trivial-14-branch"));
cl_assert(entry = git_index_get_bypath(repo_index, "modified-in-14-branch.txt", 0));
- cl_git_pass(git_oid_fromstr(&expected_oid, "26153a3ff3649b6c2bb652d3f06878c6e0a172f9"));
+ cl_git_pass(git_oid__fromstr(&expected_oid, "26153a3ff3649b6c2bb652d3f06878c6e0a172f9", GIT_OID_SHA1));
cl_assert(git_oid_cmp(&entry->id, &expected_oid) == 0);
cl_assert(git_index_reuc_entrycount(repo_index) == 0);