summaryrefslogtreecommitdiff
path: root/tests-clar/checkout/head.c
diff options
context:
space:
mode:
authorMichael Schubert <schu@schu.io>2012-10-24 15:46:15 +0200
committerMichael Schubert <schu@schu.io>2012-10-24 15:46:15 +0200
commitab2af775ec467ebb328a7374653f247920f258f3 (patch)
treedfcb09fadc67bc28a99bffcb8b751d426024974c /tests-clar/checkout/head.c
parent90fefe87d87b08010a1ea10ae496a4b0ee630f5e (diff)
parent6f6b0c013c6eff2aca2a7ada1027044f2e20f578 (diff)
downloadlibgit2-features/push_old.tar.gz
Merge branch 'development' into gsoc-pushfeatures/push_old
Diffstat (limited to 'tests-clar/checkout/head.c')
-rw-r--r--tests-clar/checkout/head.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests-clar/checkout/head.c b/tests-clar/checkout/head.c
index f2f81e5e2..d36034c52 100644
--- a/tests-clar/checkout/head.c
+++ b/tests-clar/checkout/head.c
@@ -1,5 +1,6 @@
#include "clar_libgit2.h"
#include "refs.h"
+#include "repo/repo_helpers.h"
static git_repository *g_repo;
@@ -15,10 +16,7 @@ void test_checkout_head__cleanup(void)
void test_checkout_head__checking_out_an_orphaned_head_returns_GIT_EORPHANEDHEAD(void)
{
- git_reference *head;
-
- cl_git_pass(git_reference_create_symbolic(&head, g_repo, GIT_HEAD_FILE, "refs/heads/hide/and/seek", 1));
- git_reference_free(head);
+ make_head_orphaned(g_repo, NON_EXISTING_HEAD);
cl_assert_equal_i(GIT_EORPHANEDHEAD, git_checkout_head(g_repo, NULL, NULL));
}