summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2015-11-10 15:53:09 +0100
committerPatrick Steinhardt <ps@pks.im>2017-02-13 10:13:02 +0100
commit8acc3b16efb3332596579b17b2046ecdeeac275a (patch)
tree0cca1dbf6c9a075e7d8e13e2d50c5ddfdfedf57c
parente5a620de803ddcb0c05e43c6a8d7d6d4baeb808c (diff)
downloadlibgit2-8acc3b16efb3332596579b17b2046ecdeeac275a.tar.gz
tests: add merge-conflict branch for testrepo
Add a new branch that causes a merge conflict to `testrepo` so that we are able to test merging in worktrees.
-rw-r--r--tests/iterator/workdir.c3
-rw-r--r--tests/refs/list.c4
-rw-r--r--tests/resources/testrepo/.gitted/objects/9b/1719f5cf069568785080a0bbabbe7c377e22aebin0 -> 24 bytes
-rw-r--r--tests/resources/testrepo/.gitted/objects/a3/8d028f71eaa590febb7d716b1ca32350cf70dabin0 -> 155 bytes
-rw-r--r--tests/resources/testrepo/.gitted/objects/ad/edac69457183c8265c8a9614c1c4fed31d1ff3bin0 -> 119 bytes
-rw-r--r--tests/resources/testrepo/.gitted/refs/heads/merge-conflict1
-rw-r--r--tests/revwalk/basic.c2
7 files changed, 6 insertions, 4 deletions
diff --git a/tests/iterator/workdir.c b/tests/iterator/workdir.c
index 165cca5ed..f33fd98f1 100644
--- a/tests/iterator/workdir.c
+++ b/tests/iterator/workdir.c
@@ -613,6 +613,7 @@ void test_iterator_workdir__filesystem2(void)
"heads/ident",
"heads/long-file-name",
"heads/master",
+ "heads/merge-conflict",
"heads/packed-test",
"heads/subtrees",
"heads/test",
@@ -629,7 +630,7 @@ void test_iterator_workdir__filesystem2(void)
cl_git_pass(git_iterator_for_filesystem(
&i, "testrepo/.git/refs", NULL));
- expect_iterator_items(i, 14, expect_base, 14, expect_base);
+ expect_iterator_items(i, 15, expect_base, 15, expect_base);
git_iterator_free(i);
}
diff --git a/tests/refs/list.c b/tests/refs/list.c
index b4101ba7a..f7ca3f707 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, 16);
+ cl_assert_equal_i((int)ref_list.count, 17);
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, 16);
+ cl_assert_equal_i((int)ref_list.count, 17);
git_strarray_free(&ref_list);
}
diff --git a/tests/resources/testrepo/.gitted/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae b/tests/resources/testrepo/.gitted/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae
new file mode 100644
index 000000000..13e3f581a
--- /dev/null
+++ b/tests/resources/testrepo/.gitted/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae
Binary files differ
diff --git a/tests/resources/testrepo/.gitted/objects/a3/8d028f71eaa590febb7d716b1ca32350cf70da b/tests/resources/testrepo/.gitted/objects/a3/8d028f71eaa590febb7d716b1ca32350cf70da
new file mode 100644
index 000000000..4df22ec17
--- /dev/null
+++ b/tests/resources/testrepo/.gitted/objects/a3/8d028f71eaa590febb7d716b1ca32350cf70da
Binary files differ
diff --git a/tests/resources/testrepo/.gitted/objects/ad/edac69457183c8265c8a9614c1c4fed31d1ff3 b/tests/resources/testrepo/.gitted/objects/ad/edac69457183c8265c8a9614c1c4fed31d1ff3
new file mode 100644
index 000000000..c054fc0c4
--- /dev/null
+++ b/tests/resources/testrepo/.gitted/objects/ad/edac69457183c8265c8a9614c1c4fed31d1ff3
Binary files differ
diff --git a/tests/resources/testrepo/.gitted/refs/heads/merge-conflict b/tests/resources/testrepo/.gitted/refs/heads/merge-conflict
new file mode 100644
index 000000000..3e24a24e0
--- /dev/null
+++ b/tests/resources/testrepo/.gitted/refs/heads/merge-conflict
@@ -0,0 +1 @@
+a38d028f71eaa590febb7d716b1ca32350cf70da
diff --git a/tests/revwalk/basic.c b/tests/revwalk/basic.c
index 572035c85..a38d7f406 100644
--- a/tests/revwalk/basic.c
+++ b/tests/revwalk/basic.c
@@ -177,7 +177,7 @@ void test_revwalk_basic__glob_heads_with_invalid(void)
/* walking */;
/* git log --branches --oneline | wc -l => 16 */
- cl_assert_equal_i(18, i);
+ cl_assert_equal_i(19, i);
}
void test_revwalk_basic__push_head(void)