mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
tests: add worktree test data
This commit is contained in:
@@ -616,6 +616,7 @@ void test_iterator_workdir__filesystem2(void)
|
|||||||
"heads/packed-test",
|
"heads/packed-test",
|
||||||
"heads/subtrees",
|
"heads/subtrees",
|
||||||
"heads/test",
|
"heads/test",
|
||||||
|
"heads/testrepo-worktree",
|
||||||
"tags/e90810b",
|
"tags/e90810b",
|
||||||
"tags/foo/bar",
|
"tags/foo/bar",
|
||||||
"tags/foo/foo/bar",
|
"tags/foo/foo/bar",
|
||||||
@@ -628,7 +629,7 @@ void test_iterator_workdir__filesystem2(void)
|
|||||||
|
|
||||||
cl_git_pass(git_iterator_for_filesystem(
|
cl_git_pass(git_iterator_for_filesystem(
|
||||||
&i, "testrepo/.git/refs", NULL));
|
&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);
|
git_iterator_free(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ void test_refs_list__all(void)
|
|||||||
/* We have exactly 12 refs in total if we include the packed ones:
|
/* 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
|
* there is a reference that exists both in the packfile and as
|
||||||
* loose, but we only list it once */
|
* 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);
|
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");
|
"144344043ba4d4a405da03de3844aa829ae8be0e\n");
|
||||||
|
|
||||||
cl_git_pass(git_reference_list(&ref_list, g_repo));
|
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);
|
git_strarray_free(&ref_list);
|
||||||
}
|
}
|
||||||
|
|||||||
1
tests/resources/testrepo-worktree/.gitted
Normal file
1
tests/resources/testrepo-worktree/.gitted
Normal file
@@ -0,0 +1 @@
|
|||||||
|
gitdir: ../testrepo/.git/worktrees/testrepo-worktree
|
||||||
1
tests/resources/testrepo-worktree/README
Normal file
1
tests/resources/testrepo-worktree/README
Normal file
@@ -0,0 +1 @@
|
|||||||
|
hey there
|
||||||
2
tests/resources/testrepo-worktree/branch_file.txt
Normal file
2
tests/resources/testrepo-worktree/branch_file.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
hi
|
||||||
|
bye!
|
||||||
1
tests/resources/testrepo-worktree/link_to_new.txt
Symbolic link
1
tests/resources/testrepo-worktree/link_to_new.txt
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
new.txt
|
||||||
1
tests/resources/testrepo-worktree/new.txt
Normal file
1
tests/resources/testrepo-worktree/new.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
my new file
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
0000000000000000000000000000000000000000 099fabac3a9ea935598528c27f866e34089c2eff Patrick Steinhardt <ps@pks.im> 1442484463 +0200 branch: Created from HEAD
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
099fabac3a9ea935598528c27f866e34089c2eff
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ref: refs/heads/testrepo-worktree
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../..
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../../../../testrepo-worktree/.git
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
099fabac3a9ea935598528c27f866e34089c2eff 099fabac3a9ea935598528c27f866e34089c2eff Patrick Steinhardt <ps@pks.im> 1442484463 +0200 checkout: moving from 099fabac3a9ea935598528c27f866e34089c2eff to testrepo-worktree
|
||||||
Reference in New Issue
Block a user