summaryrefslogtreecommitdiff
path: root/tests-clar/reset/soft.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests-clar/reset/soft.c')
-rw-r--r--tests-clar/reset/soft.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/tests-clar/reset/soft.c b/tests-clar/reset/soft.c
index 3200c1591..3c678ad73 100644
--- a/tests-clar/reset/soft.c
+++ b/tests-clar/reset/soft.c
@@ -39,20 +39,9 @@ void test_reset_soft__can_reset_the_non_detached_Head_to_the_specified_commit(vo
assert_reset_soft(false);
}
-static void detach_head(void)
-{
- git_reference *head;
- git_oid oid;
-
- cl_git_pass(git_reference_name_to_oid(&oid, repo, "HEAD"));
-
- cl_git_pass(git_reference_create_oid(&head, repo, "HEAD", &oid, true));
- git_reference_free(head);
-}
-
void test_reset_soft__can_reset_the_detached_Head_to_the_specified_commit(void)
{
- detach_head();
+ git_repository_detach_head(repo);
assert_reset_soft(true);
}