tests: drop unused variables
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
diff --git a/tests-clar/refs/create.c b/tests-clar/refs/create.c
index bef9bfd..d22f049 100644
--- a/tests-clar/refs/create.c
+++ b/tests-clar/refs/create.c
@@ -25,16 +25,11 @@ void test_refs_create__symbolic(void)
git_reference *new_reference, *looked_up_ref, *resolved_ref;
git_repository *repo2;
git_oid id;
- git_buf ref_path = GIT_BUF_INIT;
const char *new_head_tracker = "ANOTHER_HEAD_TRACKER";
git_oid_fromstr(&id, current_master_tip);
- /* Retrieve the physical path to the symbolic ref for further cleaning */
- cl_git_pass(git_buf_joinpath(&ref_path, g_repo->path_repository, new_head_tracker));
- git_buf_free(&ref_path);
-
/* 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));
@@ -72,13 +67,11 @@ void test_refs_create__deep_symbolic(void)
// create a deep symbolic reference
git_reference *new_reference, *looked_up_ref, *resolved_ref;
git_oid id;
- git_buf ref_path = GIT_BUF_INIT;
const char *new_head_tracker = "deep/rooted/tracker";
git_oid_fromstr(&id, current_master_tip);
- cl_git_pass(git_buf_joinpath(&ref_path, g_repo->path_repository, new_head_tracker));
cl_git_pass(git_reference_symbolic_create(&new_reference, g_repo, new_head_tracker, current_head_target, 0));
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));
@@ -87,7 +80,6 @@ void test_refs_create__deep_symbolic(void)
git_reference_free(new_reference);
git_reference_free(looked_up_ref);
git_reference_free(resolved_ref);
- git_buf_free(&ref_path);
}
void test_refs_create__oid(void)
@@ -96,15 +88,11 @@ void test_refs_create__oid(void)
git_reference *new_reference, *looked_up_ref;
git_repository *repo2;
git_oid id;
- git_buf ref_path = GIT_BUF_INIT;
const char *new_head = "refs/heads/new-head";
git_oid_fromstr(&id, current_master_tip);
- /* Retrieve the physical path to the symbolic ref for further cleaning */
- cl_git_pass(git_buf_joinpath(&ref_path, g_repo->path_repository, new_head));
-
/* Create and write the new object id reference */
cl_git_pass(git_reference_create(&new_reference, g_repo, new_head, &id, 0));
@@ -128,7 +116,6 @@ void test_refs_create__oid(void)
git_reference_free(new_reference);
git_reference_free(looked_up_ref);
- git_buf_free(&ref_path);
}
void test_refs_create__oid_unknown(void)