]> git.proxmox.com Git - libgit2.git/blobdiff - tests/refs/races.c
New upstream version 1.1.0+dfsg.1
[libgit2.git] / tests / refs / races.c
index fbecf4a75eea562c0303de042465789329ab589a..04a1bc17b3b97f8f302efe46d53ca9c2c2652bad 100644 (file)
@@ -74,8 +74,8 @@ void test_refs_races__delete(void)
        git_reference_free(ref);
 
        /* We cannot delete a symbolic value that doesn't match */
-       cl_git_pass(git_reference_lookup(&ref, g_repo, "HEAD"));
-       cl_git_pass(git_reference_symbolic_create_matching(&ref2, g_repo, "HEAD", other_refname, 1, NULL, refname));
+       cl_git_pass(git_reference_lookup(&ref, g_repo, "refs/symref"));
+       cl_git_pass(git_reference_symbolic_create_matching(&ref2, g_repo, "refs/symref", other_refname, 1, NULL, refname));
        cl_git_fail_with(GIT_EMODIFIED, git_reference_delete(ref));
 
        git_reference_free(ref);
@@ -131,19 +131,19 @@ void test_refs_races__switch_symbolic_to_oid(void)
        git_oid_fromstr(&other_id, other_commit_id);
 
        /* Removing a symbolic ref when it's currently direct should fail */
-       cl_git_pass(git_reference_lookup(&ref, g_repo, "HEAD"));
-       cl_git_pass(git_reference_create(&ref2, g_repo, "HEAD", &id, 1, NULL));
+       cl_git_pass(git_reference_lookup(&ref, g_repo, "refs/symref"));
+       cl_git_pass(git_reference_create(&ref2, g_repo, "refs/symref", &id, 1, NULL));
        cl_git_fail_with(GIT_EMODIFIED, git_reference_delete(ref));
 
        git_reference_free(ref);
        git_reference_free(ref2);
 
-       cl_git_pass(git_reference_symbolic_create(&ref, g_repo, "HEAD", refname, 1, NULL));
+       cl_git_pass(git_reference_symbolic_create(&ref, g_repo, "refs/symref", refname, 1, NULL));
        git_reference_free(ref);
 
        /* Updating a symbolic ref when it's currently direct should fail */
-       cl_git_pass(git_reference_lookup(&ref, g_repo, "HEAD"));
-       cl_git_pass(git_reference_create(&ref2, g_repo, "HEAD", &id, 1, NULL));
+       cl_git_pass(git_reference_lookup(&ref, g_repo, "refs/symref"));
+       cl_git_pass(git_reference_create(&ref2, g_repo, "refs/symref", &id, 1, NULL));
        cl_git_fail_with(GIT_EMODIFIED, git_reference_symbolic_set_target(&ref3, ref, other_refname, NULL));
 
        git_reference_free(ref);