summaryrefslogtreecommitdiff
path: root/tests/iterator
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2020-01-15 13:31:21 -0800
committerJosh Bleecher Snyder <josharian@gmail.com>2020-01-15 13:55:58 -0800
commit852c83ee44d6d53137f12443c9f82f70bbabbadc (patch)
treea17c19b32b4252160e885020d1a67b0f604d25ed /tests/iterator
parentdea5ce3df6f62a490b3307edd06958eddc5e90f4 (diff)
downloadlibgit2-852c83ee44d6d53137f12443c9f82f70bbabbadc.tar.gz
refs: refuse to delete HEAD
This requires adding a new symbolic ref to the testrepo fixture. Some of the existing tests attempt to delete HEAD, expecting a different failure. Introduce and use a non-HEAD symbolic ref instead. Adjust a few other tests as needed. Fixes #5357
Diffstat (limited to 'tests/iterator')
-rw-r--r--tests/iterator/workdir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/iterator/workdir.c b/tests/iterator/workdir.c
index 926cc6af0..72f8bf42c 100644
--- a/tests/iterator/workdir.c
+++ b/tests/iterator/workdir.c
@@ -620,6 +620,7 @@ void test_iterator_workdir__filesystem2(void)
"heads/subtrees",
"heads/test",
"heads/testrepo-worktree",
+ "symref",
"tags/e90810b",
"tags/foo/bar",
"tags/foo/foo/bar",
@@ -632,7 +633,7 @@ void test_iterator_workdir__filesystem2(void)
cl_git_pass(git_iterator_for_filesystem(
&i, "testrepo/.git/refs", NULL));
- expect_iterator_items(i, 16, expect_base, 16, expect_base);
+ expect_iterator_items(i, 17, expect_base, 17, expect_base);
git_iterator_free(i);
}