summaryrefslogtreecommitdiff
path: root/tests/libgit2/revwalk/basic.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libgit2/revwalk/basic.c')
-rw-r--r--tests/libgit2/revwalk/basic.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/libgit2/revwalk/basic.c b/tests/libgit2/revwalk/basic.c
index 2c8d885e2..62a57aaa3 100644
--- a/tests/libgit2/revwalk/basic.c
+++ b/tests/libgit2/revwalk/basic.c
@@ -50,12 +50,12 @@ static const int result_bytes = 24;
static int get_commit_index(git_oid *raw_oid)
{
int i;
- char oid[GIT_OID_HEXSZ];
+ char oid[GIT_OID_SHA1_HEXSIZE];
git_oid_fmt(oid, raw_oid);
for (i = 0; i < commit_count; ++i)
- if (memcmp(oid, commit_ids[i], GIT_OID_HEXSZ) == 0)
+ if (memcmp(oid, commit_ids[i], GIT_OID_SHA1_HEXSIZE) == 0)
return i;
return -1;
@@ -75,9 +75,9 @@ static int test_walk_only(git_revwalk *walk,
while (git_revwalk_next(&oid, walk) == 0) {
result_array[i++] = get_commit_index(&oid);
/*{
- char str[GIT_OID_HEXSZ+1];
+ char str[GIT_OID_SHA1_HEXSIZE+1];
git_oid_fmt(str, &oid);
- str[GIT_OID_HEXSZ] = 0;
+ str[GIT_OID_SHA1_HEXSIZE] = 0;
printf(" %d) %s\n", i, str);
}*/
}
@@ -139,7 +139,7 @@ void test_revwalk_basic__sorting_modes(void)
revwalk_basic_setup_walk(NULL);
- git_oid_fromstr(&id, commit_head);
+ git_oid__fromstr(&id, commit_head, GIT_OID_SHA1);
cl_git_pass(test_walk(_walk, &id, GIT_SORT_TIME, commit_sorting_time, 1));
cl_git_pass(test_walk(_walk, &id, GIT_SORT_TOPOLOGICAL, commit_sorting_topo, 2));
@@ -204,7 +204,7 @@ void test_revwalk_basic__sorted_after_reset(void)
revwalk_basic_setup_walk(NULL);
- git_oid_fromstr(&oid, commit_head);
+ git_oid__fromstr(&oid, commit_head, GIT_OID_SHA1);
/* push, sort, and test the walk */
cl_git_pass(git_revwalk_push(_walk, &oid));
@@ -282,7 +282,7 @@ void test_revwalk_basic__multiple_push_1(void)
cl_git_pass(git_revwalk_hide_ref(_walk, "refs/heads/packed-test"));
- cl_git_pass(git_oid_fromstr(&oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644"));
+ cl_git_pass(git_oid__fromstr(&oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644", GIT_OID_SHA1));
cl_git_pass(git_revwalk_push(_walk, &oid));
while (git_revwalk_next(&oid, _walk) == 0)
@@ -316,7 +316,7 @@ void test_revwalk_basic__multiple_push_2(void)
revwalk_basic_setup_walk(NULL);
- cl_git_pass(git_oid_fromstr(&oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644"));
+ cl_git_pass(git_oid__fromstr(&oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644", GIT_OID_SHA1));
cl_git_pass(git_revwalk_push(_walk, &oid));
cl_git_pass(git_revwalk_hide_ref(_walk, "refs/heads/packed-test"));
@@ -335,7 +335,7 @@ void test_revwalk_basic__disallow_non_commit(void)
revwalk_basic_setup_walk(NULL);
- cl_git_pass(git_oid_fromstr(&oid, "521d87c1ec3aef9824daf6d96cc0ae3710766d91"));
+ cl_git_pass(git_oid__fromstr(&oid, "521d87c1ec3aef9824daf6d96cc0ae3710766d91", GIT_OID_SHA1));
cl_git_fail(git_revwalk_push(_walk, &oid));
}
@@ -345,7 +345,7 @@ void test_revwalk_basic__hide_then_push(void)
int i = 0;
revwalk_basic_setup_walk(NULL);
- cl_git_pass(git_oid_fromstr(&oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644"));
+ cl_git_pass(git_oid__fromstr(&oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644", GIT_OID_SHA1));
cl_git_pass(git_revwalk_hide(_walk, &oid));
cl_git_pass(git_revwalk_push(_walk, &oid));
@@ -359,7 +359,7 @@ void test_revwalk_basic__hide_then_push(void)
void test_revwalk_basic__topo_crash(void)
{
git_oid oid;
- git_oid_fromstr(&oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644");
+ git_oid__fromstr(&oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644", GIT_OID_SHA1);
revwalk_basic_setup_walk(NULL);
git_revwalk_sorting(_walk, GIT_SORT_TOPOLOGICAL);
@@ -378,8 +378,8 @@ void test_revwalk_basic__from_new_to_old(void)
revwalk_basic_setup_walk(NULL);
git_revwalk_sorting(_walk, GIT_SORT_TIME);
- cl_git_pass(git_oid_fromstr(&to_oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644"));
- cl_git_pass(git_oid_fromstr(&from_oid, "a4a7dce85cf63874e984719f4fdd239f5145052f"));
+ cl_git_pass(git_oid__fromstr(&to_oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644", GIT_OID_SHA1));
+ cl_git_pass(git_oid__fromstr(&from_oid, "a4a7dce85cf63874e984719f4fdd239f5145052f", GIT_OID_SHA1));
cl_git_pass(git_revwalk_push(_walk, &to_oid));
cl_git_pass(git_revwalk_hide(_walk, &from_oid));
@@ -479,7 +479,7 @@ void test_revwalk_basic__mimic_git_rev_list(void)
cl_git_pass(git_revwalk_push_ref(_walk, "refs/heads/br2"));
cl_git_pass(git_revwalk_push_ref(_walk, "refs/heads/master"));
- cl_git_pass(git_oid_fromstr(&oid, "e90810b8df3e80c413d903f631643c716887138d"));
+ cl_git_pass(git_oid__fromstr(&oid, "e90810b8df3e80c413d903f631643c716887138d", GIT_OID_SHA1));
cl_git_pass(git_revwalk_push(_walk, &oid));
cl_git_pass(git_revwalk_next(&oid, _walk));
@@ -563,10 +563,10 @@ void test_revwalk_basic__old_hidden_commit_one(void)
revwalk_basic_setup_walk("testrepo.git");
- cl_git_pass(git_oid_fromstr(&new_id, "bd758010071961f28336333bc41e9c64c9a64866"));
+ cl_git_pass(git_oid__fromstr(&new_id, "bd758010071961f28336333bc41e9c64c9a64866", GIT_OID_SHA1));
cl_git_pass(git_revwalk_push(_walk, &new_id));
- cl_git_pass(git_oid_fromstr(&old_id, "8e73b769e97678d684b809b163bebdae2911720f"));
+ cl_git_pass(git_oid__fromstr(&old_id, "8e73b769e97678d684b809b163bebdae2911720f", GIT_OID_SHA1));
cl_git_pass(git_revwalk_hide(_walk, &old_id));
cl_git_pass(git_revwalk_next(&oid, _walk));
@@ -587,10 +587,10 @@ void test_revwalk_basic__old_hidden_commit_two(void)
revwalk_basic_setup_walk("testrepo.git");
- cl_git_pass(git_oid_fromstr(&new_id, "bd758010071961f28336333bc41e9c64c9a64866"));
+ cl_git_pass(git_oid__fromstr(&new_id, "bd758010071961f28336333bc41e9c64c9a64866", GIT_OID_SHA1));
cl_git_pass(git_revwalk_push(_walk, &new_id));
- cl_git_pass(git_oid_fromstr(&old_id, "b91e763008b10db366442469339f90a2b8400d0a"));
+ cl_git_pass(git_oid__fromstr(&old_id, "b91e763008b10db366442469339f90a2b8400d0a", GIT_OID_SHA1));
cl_git_pass(git_revwalk_hide(_walk, &old_id));
cl_git_pass(git_revwalk_next(&oid, _walk));