diff --git a/tests/iterator/workdir.c b/tests/iterator/workdir.c index 28fcc0d23..165cca5ed 100644 --- a/tests/iterator/workdir.c +++ b/tests/iterator/workdir.c @@ -616,6 +616,7 @@ void test_iterator_workdir__filesystem2(void) "heads/packed-test", "heads/subtrees", "heads/test", + "heads/testrepo-worktree", "tags/e90810b", "tags/foo/bar", "tags/foo/foo/bar", @@ -628,7 +629,7 @@ void test_iterator_workdir__filesystem2(void) cl_git_pass(git_iterator_for_filesystem( &i, "testrepo/.git/refs", NULL)); - expect_iterator_items(i, 13, expect_base, 13, expect_base); + expect_iterator_items(i, 14, expect_base, 14, expect_base); git_iterator_free(i); } diff --git a/tests/refs/list.c b/tests/refs/list.c index 374943b05..b4101ba7a 100644 --- a/tests/refs/list.c +++ b/tests/refs/list.c @@ -36,7 +36,7 @@ void test_refs_list__all(void) /* We have exactly 12 refs in total if we include the packed ones: * there is a reference that exists both in the packfile and as * loose, but we only list it once */ - cl_assert_equal_i((int)ref_list.count, 15); + cl_assert_equal_i((int)ref_list.count, 16); git_strarray_free(&ref_list); } @@ -51,7 +51,7 @@ void test_refs_list__do_not_retrieve_references_which_name_end_with_a_lock_exten "144344043ba4d4a405da03de3844aa829ae8be0e\n"); cl_git_pass(git_reference_list(&ref_list, g_repo)); - cl_assert_equal_i((int)ref_list.count, 15); + cl_assert_equal_i((int)ref_list.count, 16); git_strarray_free(&ref_list); } diff --git a/tests/resources/testrepo-worktree/.gitted b/tests/resources/testrepo-worktree/.gitted new file mode 100644 index 000000000..fe4556a92 Binary files /dev/null and b/tests/resources/testrepo-worktree/.gitted differ diff --git a/tests/resources/testrepo-worktree/README b/tests/resources/testrepo-worktree/README new file mode 100644 index 000000000..a8233120f Binary files /dev/null and b/tests/resources/testrepo-worktree/README differ diff --git a/tests/resources/testrepo-worktree/branch_file.txt b/tests/resources/testrepo-worktree/branch_file.txt new file mode 100644 index 000000000..3697d64be Binary files /dev/null and b/tests/resources/testrepo-worktree/branch_file.txt differ diff --git a/tests/resources/testrepo-worktree/link_to_new.txt b/tests/resources/testrepo-worktree/link_to_new.txt new file mode 120000 index 000000000..c0528fd6c --- /dev/null +++ b/tests/resources/testrepo-worktree/link_to_new.txt @@ -0,0 +1 @@ +new.txt \ No newline at end of file diff --git a/tests/resources/testrepo-worktree/new.txt b/tests/resources/testrepo-worktree/new.txt new file mode 100644 index 000000000..a71586c1d Binary files /dev/null and b/tests/resources/testrepo-worktree/new.txt differ diff --git a/tests/resources/testrepo/.gitted/logs/refs/heads/testrepo-worktree b/tests/resources/testrepo/.gitted/logs/refs/heads/testrepo-worktree new file mode 100644 index 000000000..93ab5f06f Binary files /dev/null and b/tests/resources/testrepo/.gitted/logs/refs/heads/testrepo-worktree differ diff --git a/tests/resources/testrepo/.gitted/refs/heads/testrepo-worktree b/tests/resources/testrepo/.gitted/refs/heads/testrepo-worktree new file mode 100644 index 000000000..f31fe781b Binary files /dev/null and b/tests/resources/testrepo/.gitted/refs/heads/testrepo-worktree differ diff --git a/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/HEAD b/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/HEAD new file mode 100644 index 000000000..1b8637e32 Binary files /dev/null and b/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/HEAD differ diff --git a/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/commondir b/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/commondir new file mode 100644 index 000000000..aab0408ce Binary files /dev/null and b/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/commondir differ diff --git a/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/gitdir b/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/gitdir new file mode 100644 index 000000000..0d37a5792 Binary files /dev/null and b/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/gitdir differ diff --git a/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/index b/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/index new file mode 100644 index 000000000..41141906e Binary files /dev/null and b/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/index differ diff --git a/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/logs/HEAD b/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/logs/HEAD new file mode 100644 index 000000000..3bede502e Binary files /dev/null and b/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/logs/HEAD differ