diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-10-20 10:44:01 +0200 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-10-20 12:01:04 +0200 |
commit | 209e34fa7068615b96324a4243a49b030b0c7156 (patch) | |
tree | ebb0b0d1424d9b99fae9e53f132cb02cac4a17a6 /tests-clar/reset | |
parent | c497a63bd6ac0f07b06b18e4891771fdbcd31dd6 (diff) | |
download | libgit2-209e34fa7068615b96324a4243a49b030b0c7156.tar.gz |
tests: leverage git_repository_detach_head()
Diffstat (limited to 'tests-clar/reset')
-rw-r--r-- | tests-clar/reset/soft.c | 13 |
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); } |