summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/checkout/tree.c2
-rw-r--r--tests/commit/write.c2
-rw-r--r--tests/diff/rename.c6
-rw-r--r--tests/merge/merge_helpers.c2
-rw-r--r--tests/merge/workdir/simple.c2
-rw-r--r--tests/merge/workdir/trivial.c2
-rw-r--r--tests/refs/branches/delete.c2
-rw-r--r--tests/refs/branches/ishead.c6
-rw-r--r--tests/refs/branches/iterator.c4
-rw-r--r--tests/refs/crashes.c2
-rw-r--r--tests/refs/create.c16
-rw-r--r--tests/refs/createwithlog.c2
-rw-r--r--tests/refs/delete.c2
-rw-r--r--tests/refs/foreachglob.c2
-rw-r--r--tests/refs/overwrite.c26
-rw-r--r--tests/refs/pack.c4
-rw-r--r--tests/refs/reflog/reflog.c10
-rw-r--r--tests/refs/rename.c10
-rw-r--r--tests/refs/revparse.c3
-rw-r--r--tests/refs/settargetwithlog.c2
-rw-r--r--tests/refs/setter.c10
-rw-r--r--tests/refs/unicode.c2
-rw-r--r--tests/refs/update.c2
-rw-r--r--tests/repo/head.c6
-rw-r--r--tests/repo/repo_helpers.c2
-rw-r--r--tests/stash/save.c2
-rw-r--r--tests/submodule/lookup.c2
-rw-r--r--tests/threads/refdb.c6
28 files changed, 70 insertions, 69 deletions
diff --git a/tests/checkout/tree.c b/tests/checkout/tree.c
index 06aa6a594..f0699fdb7 100644
--- a/tests/checkout/tree.c
+++ b/tests/checkout/tree.c
@@ -484,7 +484,7 @@ void assert_conflict(
/* Make HEAD point to this branch */
cl_git_pass(git_reference_symbolic_create(
- &head, g_repo, "HEAD", git_reference_name(branch), 1));
+ &head, g_repo, "HEAD", git_reference_name(branch), 1, NULL, NULL));
git_reference_free(head);
git_reference_free(branch);
diff --git a/tests/commit/write.c b/tests/commit/write.c
index 73436b74b..8e5b67f2f 100644
--- a/tests/commit/write.c
+++ b/tests/commit/write.c
@@ -116,7 +116,7 @@ void test_commit_write__root(void)
cl_assert(head_old != NULL);
git_reference_free(head);
- cl_git_pass(git_reference_symbolic_create(&head, g_repo, "HEAD", branch_name, 1));
+ cl_git_pass(git_reference_symbolic_create(&head, g_repo, "HEAD", branch_name, 1, NULL, NULL));
cl_git_pass(git_commit_create_v(
&commit_id, /* out id */
diff --git a/tests/diff/rename.c b/tests/diff/rename.c
index 93e69f479..4d1f7646e 100644
--- a/tests/diff/rename.c
+++ b/tests/diff/rename.c
@@ -945,7 +945,7 @@ void test_diff_rename__rejected_match_can_match_others(void)
cl_git_pass(git_reference_lookup(&head, g_repo, "HEAD"));
cl_git_pass(git_reference_symbolic_set_target(
- &selfsimilar, head, "refs/heads/renames_similar"));
+ &selfsimilar, head, "refs/heads/renames_similar", NULL, NULL));
cl_git_pass(git_checkout_head(g_repo, &opts));
cl_git_pass(git_repository_index(&index, g_repo));
@@ -1030,7 +1030,7 @@ void test_diff_rename__rejected_match_can_match_others_two(void)
cl_git_pass(git_reference_lookup(&head, g_repo, "HEAD"));
cl_git_pass(git_reference_symbolic_set_target(
- &selfsimilar, head, "refs/heads/renames_similar_two"));
+ &selfsimilar, head, "refs/heads/renames_similar_two", NULL, NULL));
cl_git_pass(git_checkout_head(g_repo, &opts));
cl_git_pass(git_repository_index(&index, g_repo));
@@ -1088,7 +1088,7 @@ void test_diff_rename__rejected_match_can_match_others_three(void)
cl_git_pass(git_reference_lookup(&head, g_repo, "HEAD"));
cl_git_pass(git_reference_symbolic_set_target(
- &selfsimilar, head, "refs/heads/renames_similar_two"));
+ &selfsimilar, head, "refs/heads/renames_similar_two", NULL, NULL));
cl_git_pass(git_checkout_head(g_repo, &opts));
cl_git_pass(git_repository_index(&index, g_repo));
diff --git a/tests/merge/merge_helpers.c b/tests/merge/merge_helpers.c
index 5660179a7..7ce5e28ff 100644
--- a/tests/merge/merge_helpers.c
+++ b/tests/merge/merge_helpers.c
@@ -87,7 +87,7 @@ int merge_branches(git_merge_result **result, git_repository *repo, const char *
head_checkout_opts.checkout_strategy = GIT_CHECKOUT_FORCE;
- cl_git_pass(git_reference_symbolic_create(&head_ref, repo, "HEAD", ours_branch, 1));
+ cl_git_pass(git_reference_symbolic_create(&head_ref, repo, "HEAD", ours_branch, 1, NULL, NULL));
cl_git_pass(git_checkout_head(repo, &head_checkout_opts));
cl_git_pass(git_reference_lookup(&theirs_ref, repo, theirs_branch));
diff --git a/tests/merge/workdir/simple.c b/tests/merge/workdir/simple.c
index 4a3b86ee4..98dca53ef 100644
--- a/tests/merge/workdir/simple.c
+++ b/tests/merge/workdir/simple.c
@@ -406,7 +406,7 @@ void test_merge_workdir_simple__directory_file(void)
{ 0100644, "f5504f36e6f4eb797a56fc5bac6c6c7f32969bf2", 3, "file-5/new" },
};
- cl_git_pass(git_reference_symbolic_create(&head, repo, GIT_HEAD_FILE, GIT_REFS_HEADS_DIR OURS_DIRECTORY_FILE, 1));
+ cl_git_pass(git_reference_symbolic_create(&head, repo, GIT_HEAD_FILE, GIT_REFS_HEADS_DIR OURS_DIRECTORY_FILE, 1, NULL, NULL));
cl_git_pass(git_reference_name_to_id(&head_commit_id, repo, GIT_HEAD_FILE));
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));
diff --git a/tests/merge/workdir/trivial.c b/tests/merge/workdir/trivial.c
index 9f9566243..df18b0e0b 100644
--- a/tests/merge/workdir/trivial.c
+++ b/tests/merge/workdir/trivial.c
@@ -42,7 +42,7 @@ static int merge_trivial(const char *ours, const char *theirs, bool automerge)
opts.merge_tree_opts.automerge_flags |= automerge ? 0 : GIT_MERGE_AUTOMERGE_NONE;
git_buf_printf(&branch_buf, "%s%s", GIT_REFS_HEADS_DIR, ours);
- cl_git_pass(git_reference_symbolic_create(&our_ref, repo, "HEAD", branch_buf.ptr, 1));
+ cl_git_pass(git_reference_symbolic_create(&our_ref, repo, "HEAD", branch_buf.ptr, 1, NULL, NULL));
cl_git_pass(git_checkout_head(repo, &checkout_opts));
diff --git a/tests/refs/branches/delete.c b/tests/refs/branches/delete.c
index de90cb734..a642f8704 100644
--- a/tests/refs/branches/delete.c
+++ b/tests/refs/branches/delete.c
@@ -14,7 +14,7 @@ void test_refs_branches_delete__initialize(void)
cl_git_pass(git_repository_open(&repo, "testrepo.git"));
cl_git_pass(git_oid_fromstr(&id, "be3563ae3f795b2b4353bcce3a527ad0a4f7f644"));
- cl_git_pass(git_reference_create(&fake_remote, repo, "refs/remotes/nulltoken/master", &id, 0));
+ cl_git_pass(git_reference_create(&fake_remote, repo, "refs/remotes/nulltoken/master", &id, 0, NULL, NULL));
}
void test_refs_branches_delete__cleanup(void)
diff --git a/tests/refs/branches/ishead.c b/tests/refs/branches/ishead.c
index b1ad09c3e..12a8c4449 100644
--- a/tests/refs/branches/ishead.c
+++ b/tests/refs/branches/ishead.c
@@ -98,9 +98,9 @@ void test_refs_branches_ishead__only_direct_references_are_considered(void)
git_repository_free(repo);
repo = cl_git_sandbox_init("testrepo.git");
- cl_git_pass(git_reference_symbolic_create(&linked, repo, "refs/heads/linked", "refs/heads/master", 0));
- cl_git_pass(git_reference_symbolic_create(&super, repo, "refs/heads/super", "refs/heads/linked", 0));
- cl_git_pass(git_reference_symbolic_create(&head, repo, GIT_HEAD_FILE, "refs/heads/super", 1));
+ cl_git_pass(git_reference_symbolic_create(&linked, repo, "refs/heads/linked", "refs/heads/master", 0, NULL, NULL));
+ cl_git_pass(git_reference_symbolic_create(&super, repo, "refs/heads/super", "refs/heads/linked", 0, NULL, NULL));
+ cl_git_pass(git_reference_symbolic_create(&head, repo, GIT_HEAD_FILE, "refs/heads/super", 1, NULL, NULL));
cl_assert_equal_i(false, git_branch_is_head(linked));
cl_assert_equal_i(false, git_branch_is_head(super));
diff --git a/tests/refs/branches/iterator.c b/tests/refs/branches/iterator.c
index 904c6a146..29ca59aca 100644
--- a/tests/refs/branches/iterator.c
+++ b/tests/refs/branches/iterator.c
@@ -12,7 +12,7 @@ void test_refs_branches_iterator__initialize(void)
cl_git_pass(git_repository_open(&repo, "testrepo.git"));
cl_git_pass(git_oid_fromstr(&id, "be3563ae3f795b2b4353bcce3a527ad0a4f7f644"));
- cl_git_pass(git_reference_create(&fake_remote, repo, "refs/remotes/nulltoken/master", &id, 0));
+ cl_git_pass(git_reference_create(&fake_remote, repo, "refs/remotes/nulltoken/master", &id, 0, NULL, NULL));
}
void test_refs_branches_iterator__cleanup(void)
@@ -113,7 +113,7 @@ void test_refs_branches_iterator__retrieve_remote_symbolic_HEAD_when_present(voi
};
git_reference_free(fake_remote);
- cl_git_pass(git_reference_symbolic_create(&fake_remote, repo, "refs/remotes/nulltoken/HEAD", "refs/remotes/nulltoken/master", 0));
+ cl_git_pass(git_reference_symbolic_create(&fake_remote, repo, "refs/remotes/nulltoken/HEAD", "refs/remotes/nulltoken/master", 0, NULL, NULL));
assert_retrieval(GIT_BRANCH_REMOTE, 3);
diff --git a/tests/refs/crashes.c b/tests/refs/crashes.c
index 5a1885a7a..03082d71e 100644
--- a/tests/refs/crashes.c
+++ b/tests/refs/crashes.c
@@ -7,7 +7,7 @@ void test_refs_crashes__double_free(void)
const char *REFNAME = "refs/heads/xxx";
cl_git_pass(git_repository_open(&repo, cl_fixture("testrepo.git")));
- cl_git_pass(git_reference_symbolic_create(&ref, repo, REFNAME, "refs/heads/master", 0));
+ cl_git_pass(git_reference_symbolic_create(&ref, repo, REFNAME, "refs/heads/master", 0, NULL, NULL));
cl_git_pass(git_reference_lookup(&ref2, repo, REFNAME));
cl_git_pass(git_reference_delete(ref));
git_reference_free(ref);
diff --git a/tests/refs/create.c b/tests/refs/create.c
index 85ff05aa9..50b8e84f8 100644
--- a/tests/refs/create.c
+++ b/tests/refs/create.c
@@ -32,7 +32,7 @@ void test_refs_create__symbolic(void)
git_oid_fromstr(&id, current_master_tip);
/* Create and write the new symbolic reference */
- cl_git_pass(git_reference_symbolic_create(&new_reference, g_repo, new_head_tracker, current_head_target, 0));
+ cl_git_pass(git_reference_symbolic_create(&new_reference, g_repo, new_head_tracker, current_head_target, 0, NULL, NULL));
/* Ensure the reference can be looked-up... */
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, new_head_tracker));
@@ -73,7 +73,7 @@ void test_refs_create__deep_symbolic(void)
git_oid_fromstr(&id, current_master_tip);
- cl_git_pass(git_reference_symbolic_create(&new_reference, g_repo, new_head_tracker, current_head_target, 0));
+ cl_git_pass(git_reference_symbolic_create(&new_reference, g_repo, new_head_tracker, current_head_target, 0, NULL, NULL));
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, new_head_tracker));
cl_git_pass(git_reference_resolve(&resolved_ref, looked_up_ref));
cl_assert(git_oid_cmp(&id, git_reference_target(resolved_ref)) == 0);
@@ -95,7 +95,7 @@ void test_refs_create__oid(void)
git_oid_fromstr(&id, current_master_tip);
/* Create and write the new object id reference */
- cl_git_pass(git_reference_create(&new_reference, g_repo, new_head, &id, 0));
+ cl_git_pass(git_reference_create(&new_reference, g_repo, new_head, &id, 0, NULL, NULL));
/* Ensure the reference can be looked-up... */
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, new_head));
@@ -130,7 +130,7 @@ void test_refs_create__oid_unknown(void)
git_oid_fromstr(&id, "deadbeef3f795b2b4353bcce3a527ad0a4f7f644");
/* Create and write the new object id reference */
- cl_git_fail(git_reference_create(&new_reference, g_repo, new_head, &id, 0));
+ cl_git_fail(git_reference_create(&new_reference, g_repo, new_head, &id, 0, NULL, NULL));
/* Ensure the reference can't be looked-up... */
cl_git_fail(git_reference_lookup(&looked_up_ref, g_repo, new_head));
@@ -144,10 +144,10 @@ void test_refs_create__propagate_eexists(void)
/* Make sure it works for oid and for symbolic both */
git_oid_fromstr(&oid, current_master_tip);
- error = git_reference_create(&ref, g_repo, current_head_target, &oid, false);
+ error = git_reference_create(&ref, g_repo, current_head_target, &oid, false, NULL, NULL);
cl_assert(error == GIT_EEXISTS);
- error = git_reference_symbolic_create(&ref, g_repo, "HEAD", current_head_target, false);
+ error = git_reference_symbolic_create(&ref, g_repo, "HEAD", current_head_target, false, NULL, NULL);
cl_assert(error == GIT_EEXISTS);
}
@@ -161,8 +161,8 @@ void test_refs_create__creating_a_reference_with_an_invalid_name_returns_EINVALI
git_oid_fromstr(&id, current_master_tip);
cl_assert_equal_i(GIT_EINVALIDSPEC, git_reference_create(
- &new_reference, g_repo, name, &id, 0));
+ &new_reference, g_repo, name, &id, 0, NULL, NULL));
cl_assert_equal_i(GIT_EINVALIDSPEC, git_reference_symbolic_create(
- &new_reference, g_repo, name, current_head_target, 0));
+ &new_reference, g_repo, name, current_head_target, 0, NULL, NULL));
}
diff --git a/tests/refs/createwithlog.c b/tests/refs/createwithlog.c
index 0fe81df91..026ff6d6a 100644
--- a/tests/refs/createwithlog.c
+++ b/tests/refs/createwithlog.c
@@ -35,7 +35,7 @@ void test_refs_createwithlog__creating_a_direct_reference_adds_a_reflog_entry(vo
cl_git_pass(git_signature_now(&signature, "foo", "foo@bar"));
cl_git_pass(
- git_reference_create_with_log(&reference, g_repo, name, &id, 0, signature, message));
+ git_reference_create(&reference, g_repo, name, &id, 0, signature, message));
cl_git_pass(git_reflog_read(&reflog, g_repo, name));
cl_assert_equal_sz(1, git_reflog_entrycount(reflog));
diff --git a/tests/refs/delete.c b/tests/refs/delete.c
index 973768aeb..5e4afb138 100644
--- a/tests/refs/delete.c
+++ b/tests/refs/delete.c
@@ -66,7 +66,7 @@ void test_refs_delete__packed_only(void)
git_oid_fromstr(&id, current_master_tip);
/* Create and write the new object id reference */
- cl_git_pass(git_reference_create(&ref, g_repo, new_ref, &id, 0));
+ cl_git_pass(git_reference_create(&ref, g_repo, new_ref, &id, 0, NULL, NULL));
git_reference_free(ref);
/* Lookup the reference */
diff --git a/tests/refs/foreachglob.c b/tests/refs/foreachglob.c
index c0f6ce763..b992b07b8 100644
--- a/tests/refs/foreachglob.c
+++ b/tests/refs/foreachglob.c
@@ -12,7 +12,7 @@ void test_refs_foreachglob__initialize(void)
cl_git_pass(git_repository_open(&repo, "testrepo.git"));
cl_git_pass(git_oid_fromstr(&id, "be3563ae3f795b2b4353bcce3a527ad0a4f7f644"));
- cl_git_pass(git_reference_create(&fake_remote, repo, "refs/remotes/nulltoken/master", &id, 0));
+ cl_git_pass(git_reference_create(&fake_remote, repo, "refs/remotes/nulltoken/master", &id, 0, NULL, NULL));
}
void test_refs_foreachglob__cleanup(void)
diff --git a/tests/refs/overwrite.c b/tests/refs/overwrite.c
index ebe72069c..78ce4ace7 100644
--- a/tests/refs/overwrite.c
+++ b/tests/refs/overwrite.c
@@ -27,8 +27,8 @@ void test_refs_overwrite__symbolic(void)
git_reference *ref, *branch_ref;
/* The target needds to exist and we need to check the name has changed */
- cl_git_pass(git_reference_symbolic_create(&branch_ref, g_repo, ref_branch_name, ref_master_name, 0));
- cl_git_pass(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_branch_name, 0));
+ cl_git_pass(git_reference_symbolic_create(&branch_ref, g_repo, ref_branch_name, ref_master_name, 0, NULL, NULL));
+ cl_git_pass(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_branch_name, 0, NULL, NULL));
git_reference_free(ref);
/* Ensure it points to the right place*/
@@ -38,8 +38,8 @@ void test_refs_overwrite__symbolic(void)
git_reference_free(ref);
/* Ensure we can't create it unless we force it to */
- cl_git_fail(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_master_name, 0));
- cl_git_pass(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_master_name, 1));
+ cl_git_fail(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_master_name, 0, NULL, NULL));
+ cl_git_pass(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_master_name, 1, NULL, NULL));
git_reference_free(ref);
/* Ensure it points to the right place */
@@ -63,7 +63,7 @@ void test_refs_overwrite__object_id(void)
git_reference_free(ref);
/* Create it */
- cl_git_pass(git_reference_create(&ref, g_repo, ref_name, &id, 0));
+ cl_git_pass(git_reference_create(&ref, g_repo, ref_name, &id, 0, NULL, NULL));
git_reference_free(ref);
cl_git_pass(git_reference_lookup(&ref, g_repo, ref_test_name));
@@ -72,8 +72,8 @@ void test_refs_overwrite__object_id(void)
git_reference_free(ref);
/* Ensure we can't overwrite unless we force it */
- cl_git_fail(git_reference_create(&ref, g_repo, ref_name, &id, 0));
- cl_git_pass(git_reference_create(&ref, g_repo, ref_name, &id, 1));
+ cl_git_fail(git_reference_create(&ref, g_repo, ref_name, &id, 0, NULL, NULL));
+ cl_git_pass(git_reference_create(&ref, g_repo, ref_name, &id, 1, NULL, NULL));
git_reference_free(ref);
/* Ensure it has been overwritten */
@@ -94,10 +94,10 @@ void test_refs_overwrite__object_id_with_symbolic(void)
git_oid_cpy(&id, git_reference_target(ref));
git_reference_free(ref);
- cl_git_pass(git_reference_create(&ref, g_repo, ref_name, &id, 0));
+ cl_git_pass(git_reference_create(&ref, g_repo, ref_name, &id, 0, NULL, NULL));
git_reference_free(ref);
- cl_git_fail(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_master_name, 0));
- cl_git_pass(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_master_name, 1));
+ cl_git_fail(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_master_name, 0, NULL, NULL));
+ cl_git_pass(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_master_name, 1, NULL, NULL));
git_reference_free(ref);
/* Ensure it points to the right place */
@@ -120,11 +120,11 @@ void test_refs_overwrite__symbolic_with_object_id(void)
git_reference_free(ref);
/* Create the symbolic ref */
- cl_git_pass(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_master_name, 0));
+ cl_git_pass(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_master_name, 0, NULL, NULL));
git_reference_free(ref);
/* It shouldn't overwrite unless we tell it to */
- cl_git_fail(git_reference_create(&ref, g_repo, ref_name, &id, 0));
- cl_git_pass(git_reference_create(&ref, g_repo, ref_name, &id, 1));
+ cl_git_fail(git_reference_create(&ref, g_repo, ref_name, &id, 0, NULL, NULL));
+ cl_git_pass(git_reference_create(&ref, g_repo, ref_name, &id, 1, NULL, NULL));
git_reference_free(ref);
/* Ensure it points to the right place */
diff --git a/tests/refs/pack.c b/tests/refs/pack.c
index 849a052aa..7f5c611a7 100644
--- a/tests/refs/pack.c
+++ b/tests/refs/pack.c
@@ -93,11 +93,11 @@ void test_refs_pack__symbolic(void)
for (i = 0; i < 100; ++i) {
snprintf(name, sizeof(name), "refs/heads/symbolic-%03d", i);
cl_git_pass(git_reference_symbolic_create(
- &ref, g_repo, name, "refs/heads/master", 0));
+ &ref, g_repo, name, "refs/heads/master", 0, NULL, NULL));
git_reference_free(ref);
snprintf(name, sizeof(name), "refs/heads/direct-%03d", i);
- cl_git_pass(git_reference_create(&ref, g_repo, name, &head, 0));
+ cl_git_pass(git_reference_create(&ref, g_repo, name, &head, 0, NULL, NULL));
git_reference_free(ref);
}
diff --git a/tests/refs/reflog/reflog.c b/tests/refs/reflog/reflog.c
index a1c5adaf4..82b28de15 100644
--- a/tests/refs/reflog/reflog.c
+++ b/tests/refs/reflog/reflog.c
@@ -82,7 +82,7 @@ void test_refs_reflog_reflog__append_then_read(void)
/* Create a new branch pointing at the HEAD */
git_oid_fromstr(&oid, current_master_tip);
- cl_git_pass(git_reference_create(&ref, g_repo, new_ref, &oid, 0));
+ cl_git_pass(git_reference_create(&ref, g_repo, new_ref, &oid, 0, NULL, NULL));
git_reference_free(ref);
cl_git_pass(git_signature_now(&committer, "foo", "foo@bar"));
@@ -189,11 +189,11 @@ void test_refs_reflog_reflog__write_only_std_locations(void)
git_oid_fromstr(&id, current_master_tip);
- cl_git_pass(git_reference_create(&ref, g_repo, "refs/heads/foo", &id, 1));
+ cl_git_pass(git_reference_create(&ref, g_repo, "refs/heads/foo", &id, 1, NULL, NULL));
git_reference_free(ref);
- cl_git_pass(git_reference_create(&ref, g_repo, "refs/tags/foo", &id, 1));
+ cl_git_pass(git_reference_create(&ref, g_repo, "refs/tags/foo", &id, 1, NULL, NULL));
git_reference_free(ref);
- cl_git_pass(git_reference_create(&ref, g_repo, "refs/notes/foo", &id, 1));
+ cl_git_pass(git_reference_create(&ref, g_repo, "refs/notes/foo", &id, 1, NULL, NULL));
git_reference_free(ref);
assert_has_reflog(true, "refs/heads/foo");
@@ -210,7 +210,7 @@ void test_refs_reflog_reflog__write_when_explicitly_active(void)
git_oid_fromstr(&id, current_master_tip);
git_reference_ensure_log(g_repo, "refs/tags/foo");
- cl_git_pass(git_reference_create(&ref, g_repo, "refs/tags/foo", &id, 1));
+ cl_git_pass(git_reference_create(&ref, g_repo, "refs/tags/foo", &id, 1, NULL, NULL));
git_reference_free(ref);
assert_has_reflog(true, "refs/tags/foo");
}
diff --git a/tests/refs/rename.c b/tests/refs/rename.c
index 543bc4d62..120967892 100644
--- a/tests/refs/rename.c
+++ b/tests/refs/rename.c
@@ -268,15 +268,15 @@ void test_refs_rename__overwrite(void)
git_oid_cpy(&id, git_reference_target(ref));
/* Create loose references */
- cl_git_pass(git_reference_create(&ref_one, g_repo, ref_one_name, &id, 0));
- cl_git_pass(git_reference_create(&ref_two, g_repo, ref_two_name, &id, 0));
+ cl_git_pass(git_reference_create(&ref_one, g_repo, ref_one_name, &id, 0, NULL, NULL));
+ cl_git_pass(git_reference_create(&ref_two, g_repo, ref_two_name, &id, 0, NULL, NULL));
/* Pack everything */
cl_git_pass(git_repository_refdb(&refdb, g_repo));
cl_git_pass(git_refdb_compress(refdb));
/* Attempt to create illegal reference */
- cl_git_fail(git_reference_create(&ref_one_new, g_repo, ref_one_name_new, &id, 0));
+ cl_git_fail(git_reference_create(&ref_one_new, g_repo, ref_one_name_new, &id, 0, NULL, NULL));
/* Illegal reference couldn't be created so this is supposed to fail */
cl_git_fail(git_reference_lookup(&ref_one_new, g_repo, ref_one_name_new));
@@ -301,7 +301,7 @@ void test_refs_rename__prefix(void)
git_oid_cpy(&id, git_reference_target(ref));
/* Create loose references */
- cl_git_pass(git_reference_create(&ref_two, g_repo, ref_two_name, &id, 0));
+ cl_git_pass(git_reference_create(&ref_two, g_repo, ref_two_name, &id, 0, NULL, NULL));
/* An existing reference... */
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, ref_two_name));
@@ -334,7 +334,7 @@ void test_refs_rename__move_up(void)
git_oid_cpy(&id, git_reference_target(ref));
/* Create loose references */
- cl_git_pass(git_reference_create(&ref_two, g_repo, ref_two_name_new, &id, 0));
+ cl_git_pass(git_reference_create(&ref_two, g_repo, ref_two_name_new, &id, 0, NULL, NULL));
git_reference_free(ref_two);
/* An existing reference... */
diff --git a/tests/refs/revparse.c b/tests/refs/revparse.c
index 37d3981bb..522a44c82 100644
--- a/tests/refs/revparse.c
+++ b/tests/refs/revparse.c
@@ -596,7 +596,8 @@ void test_refs_revparse__issue_994(void)
repo,
"refs/remotes/origin/bim_with_3d@11296",
git_reference_target(head),
- 0));
+ 0,
+ NULL, NULL));
cl_git_pass(git_revparse_single(&target, repo, "origin/bim_with_3d@11296"));
git_object_free(target);
diff --git a/tests/refs/settargetwithlog.c b/tests/refs/settargetwithlog.c
index cfa1c99d5..524ce771c 100644
--- a/tests/refs/settargetwithlog.c
+++ b/tests/refs/settargetwithlog.c
@@ -38,7 +38,7 @@ void test_refs_settargetwithlog__updating_a_direct_reference_adds_a_reflog_entry
cl_git_pass(git_signature_now(&signature, "foo", "foo@bar"));
- cl_git_pass(git_reference_set_target_with_log(
+ cl_git_pass(git_reference_set_target(
&reference_out, reference, &target_id, signature, message));
cl_git_pass(git_reflog_read(&reflog, g_repo, br2_name));
diff --git a/tests/refs/setter.c b/tests/refs/setter.c
index 6d875f9b6..9a945db00 100644
--- a/tests/refs/setter.c
+++ b/tests/refs/setter.c
@@ -34,7 +34,7 @@ void test_refs_setter__update_direct(void)
cl_git_pass(git_reference_lookup(&test_ref, g_repo, ref_test_name));
cl_assert(git_reference_type(test_ref) == GIT_REF_OID);
- cl_git_pass(git_reference_set_target(&new_ref, test_ref, &id));
+ cl_git_pass(git_reference_set_target(&new_ref, test_ref, &id, NULL, NULL));
git_reference_free(test_ref);
git_reference_free(new_ref);
@@ -53,7 +53,7 @@ void test_refs_setter__update_symbolic(void)
cl_assert(git_reference_type(head) == GIT_REF_SYMBOLIC);
cl_assert(strcmp(git_reference_symbolic_target(head), ref_master_name) == 0);
- cl_git_pass(git_reference_symbolic_set_target(&new_head, head, ref_test_name));
+ cl_git_pass(git_reference_symbolic_set_target(&new_head, head, ref_test_name, NULL, NULL));
git_reference_free(new_head);
git_reference_free(head);
@@ -73,7 +73,7 @@ void test_refs_setter__cant_update_direct_with_symbolic(void)
cl_assert(git_reference_type(ref) == GIT_REF_OID);
git_oid_cpy(&id, git_reference_target(ref));
- cl_git_fail(git_reference_symbolic_set_target(&new, ref, ref_name));
+ cl_git_fail(git_reference_symbolic_set_target(&new, ref, ref_name, NULL, NULL));
git_reference_free(ref);
}
@@ -90,10 +90,10 @@ void test_refs_setter__cant_update_symbolic_with_direct(void)
git_reference_free(ref);
/* Create the symbolic ref */
- cl_git_pass(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_master_name, 0));
+ cl_git_pass(git_reference_symbolic_create(&ref, g_repo, ref_name, ref_master_name, 0, NULL, NULL));
/* Can't set an OID on a direct ref */
- cl_git_fail(git_reference_set_target(&new, ref, &id));
+ cl_git_fail(git_reference_set_target(&new, ref, &id, NULL, NULL));
git_reference_free(ref);
}
diff --git a/tests/refs/unicode.c b/tests/refs/unicode.c
index b56012869..471b0b8d3 100644
--- a/tests/refs/unicode.c
+++ b/tests/refs/unicode.c
@@ -24,7 +24,7 @@ void test_refs_unicode__create_and_lookup(void)
/* Create the reference */
cl_git_pass(git_reference_lookup(&ref0, repo, master));
cl_git_pass(git_reference_create(
- &ref1, repo, REFNAME, git_reference_target(ref0), 0));
+ &ref1, repo, REFNAME, git_reference_target(ref0), 0, NULL, NULL));
cl_assert_equal_s(REFNAME, git_reference_name(ref1));
git_reference_free(ref0);
diff --git a/tests/refs/update.c b/tests/refs/update.c
index 205b526a2..873fc4ebe 100644
--- a/tests/refs/update.c
+++ b/tests/refs/update.c
@@ -22,5 +22,5 @@ void test_refs_update__updating_the_target_of_a_symref_with_an_invalid_name_retu
cl_assert_equal_i(GIT_REF_SYMBOLIC, git_reference_type(head));
git_reference_free(head);
- cl_assert_equal_i(GIT_EINVALIDSPEC, git_reference_symbolic_create(&head, g_repo, GIT_HEAD_FILE, "refs/heads/inv@{id", 1));
+ cl_assert_equal_i(GIT_EINVALIDSPEC, git_reference_symbolic_create(&head, g_repo, GIT_HEAD_FILE, "refs/heads/inv@{id", 1, NULL, NULL));
}
diff --git a/tests/repo/head.c b/tests/repo/head.c
index 5a55984bd..101e30f10 100644
--- a/tests/repo/head.c
+++ b/tests/repo/head.c
@@ -26,7 +26,7 @@ void test_repo_head__head_detached(void)
cl_assert_equal_i(true, git_repository_head_detached(repo));
/* take the reop back to it's original state */
- cl_git_pass(git_reference_symbolic_create(&ref, repo, "HEAD", "refs/heads/master", 1));
+ cl_git_pass(git_reference_symbolic_create(&ref, repo, "HEAD", "refs/heads/master", 1, NULL, NULL));
git_reference_free(ref);
cl_assert_equal_i(false, git_repository_head_detached(repo));
@@ -44,7 +44,7 @@ void test_repo_head__unborn_head(void)
/* take the repo back to it's original state */
- cl_git_pass(git_reference_symbolic_create(&ref, repo, "HEAD", "refs/heads/master", 1));
+ cl_git_pass(git_reference_symbolic_create(&ref, repo, "HEAD", "refs/heads/master", 1, NULL, NULL));
cl_assert(git_repository_head_unborn(repo) == 0);
git_reference_free(ref);
@@ -156,7 +156,7 @@ void test_repo_head__detach_head_Fails_if_HEAD_and_point_to_a_non_commitish(void
{
git_reference *head;
- cl_git_pass(git_reference_symbolic_create(&head, repo, GIT_HEAD_FILE, "refs/tags/point_to_blob", 1));
+ cl_git_pass(git_reference_symbolic_create(&head, repo, GIT_HEAD_FILE, "refs/tags/point_to_blob", 1, NULL, NULL));
cl_git_fail(git_repository_detach_head(repo));
diff --git a/tests/repo/repo_helpers.c b/tests/repo/repo_helpers.c
index 3d477ff42..7c5db4a81 100644
--- a/tests/repo/repo_helpers.c
+++ b/tests/repo/repo_helpers.c
@@ -7,7 +7,7 @@ void make_head_unborn(git_repository* repo, const char *target)
{
git_reference *head;
- cl_git_pass(git_reference_symbolic_create(&head, repo, GIT_HEAD_FILE, target, 1));
+ cl_git_pass(git_reference_symbolic_create(&head, repo, GIT_HEAD_FILE, target, 1, NULL, NULL));
git_reference_free(head);
}
diff --git a/tests/stash/save.c b/tests/stash/save.c
index 3d92b26bd..293a89a97 100644
--- a/tests/stash/save.c
+++ b/tests/stash/save.c
@@ -174,7 +174,7 @@ void test_stash_save__cannot_stash_against_an_unborn_branch(void)
{
git_reference *head;
- cl_git_pass(git_reference_symbolic_create(&head, repo, "HEAD", "refs/heads/unborn", 1));
+ cl_git_pass(git_reference_symbolic_create(&head, repo, "HEAD", "refs/heads/unborn", 1, NULL, NULL));
cl_assert_equal_i(GIT_EUNBORNBRANCH,
git_stash_save(&stash_tip_oid, repo, signature, NULL, GIT_STASH_DEFAULT));
diff --git a/tests/submodule/lookup.c b/tests/submodule/lookup.c
index 5f320e702..ac3fa0415 100644
--- a/tests/submodule/lookup.c
+++ b/tests/submodule/lookup.c
@@ -108,7 +108,7 @@ void test_submodule_lookup__lookup_even_with_unborn_head(void)
/* put us on an unborn branch */
cl_git_pass(git_reference_symbolic_create(
- &head, g_repo, "HEAD", "refs/heads/garbage", 1));
+ &head, g_repo, "HEAD", "refs/heads/garbage", 1, NULL, NULL));
git_reference_free(head);
/* lookup existing */
diff --git a/tests/threads/refdb.c b/tests/threads/refdb.c
index 3c651e341..fbf6ac09b 100644
--- a/tests/threads/refdb.c
+++ b/tests/threads/refdb.c
@@ -58,7 +58,7 @@ void test_threads_refdb__iterator(void)
for (r = 0; r < 200; ++r) {
snprintf(name, sizeof(name), "refs/heads/direct-%03d", r);
- cl_git_pass(git_reference_create(&ref, g_repo, name, &head, 0));
+ cl_git_pass(git_reference_create(&ref, g_repo, name, &head, 0, NULL, NULL));
git_reference_free(ref);
}
@@ -102,7 +102,7 @@ static void *create_refs(void *arg)
for (i = 0; i < 10; ++i) {
snprintf(name, sizeof(name), "refs/heads/thread-%03d-%02d", *id, i);
- cl_git_pass(git_reference_create(&ref[i], g_repo, name, &head, 0));
+ cl_git_pass(git_reference_create(&ref[i], g_repo, name, &head, 0, NULL, NULL));
if (i == 5) {
git_refdb *refdb;
@@ -165,7 +165,7 @@ void test_threads_refdb__edit_while_iterate(void)
for (r = 0; r < 50; ++r) {
snprintf(name, sizeof(name), "refs/heads/starter-%03d", r);
- cl_git_pass(git_reference_create(&ref, g_repo, name, &head, 0));
+ cl_git_pass(git_reference_create(&ref, g_repo, name, &head, 0, NULL, NULL));
git_reference_free(ref);
}