diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-03-17 20:36:51 +0400 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-03-17 20:47:47 +0400 |
commit | cb562c3fb305b7fa2ddc46983a6107f7b8340293 (patch) | |
tree | 6bee34fa724813034b043a59adeeca953f866e9f /tests | |
parent | 853b1407c0325f6690eab92746d1f53c78b0da49 (diff) |
repo: remove test which deletes HEAD
This is not something anybody would ever do; removing HEAD makes the
.git/ directory no longer be a repository, so we wouldn't be expected to
handle such a situation.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/repo/head.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/repo/head.c b/tests/repo/head.c index c5965fac6..459ab8b40 100644 --- a/tests/repo/head.c +++ b/tests/repo/head.c @@ -270,24 +270,3 @@ void test_repo_head__setting_head_updates_reflog(void) git_object_free(tag); git_signature_free(sig); } - -void test_repo_head__setting_creates_head_ref(void) -{ - git_reference *head; - git_reflog *log; - const git_reflog_entry *entry; - - cl_git_pass(git_reference_lookup(&head, repo, "HEAD")); - cl_git_pass(git_reference_delete(head)); - cl_git_pass(git_reflog_delete(repo, "HEAD")); - - cl_git_pass(git_repository_set_head(repo, "refs/heads/haacked", NULL, "create HEAD")); - - cl_git_pass(git_reflog_read(&log, repo, "HEAD")); - cl_assert_equal_i(1, git_reflog_entrycount(log)); - entry = git_reflog_entry_byindex(log, 0); - cl_assert_equal_s("create HEAD", git_reflog_entry_message(entry)); - - git_reflog_free(log); - git_reference_free(head); -} |