Commit 1c13b0bfdcfb510863a6e5e3238f8a461551aa0f

Edward Thomson 2013-07-12T15:30:05

test that suggests tags arent fully peeled during push

diff --git a/tests-clar/online/push.c b/tests-clar/online/push.c
index 5dc7974..3211807 100644
--- a/tests-clar/online/push.c
+++ b/tests-clar/online/push.c
@@ -29,6 +29,7 @@ static git_oid _tag_commit;
 static git_oid _tag_tree;
 static git_oid _tag_blob;
 static git_oid _tag_lightweight;
+static git_oid _tag_tag;
 
 static int cred_acquire_cb(
 		git_cred **cred,
@@ -272,6 +273,7 @@ void test_online_push__initialize(void)
 	git_oid_fromstr(&_tag_tree, "ff83aa4c5e5d28e3bcba2f5c6e2adc61286a4e5e");
 	git_oid_fromstr(&_tag_blob, "b483ae7ba66decee9aee971f501221dea84b1498");
 	git_oid_fromstr(&_tag_lightweight, "951bbbb90e2259a4c8950db78946784fb53fcbce");
+	git_oid_fromstr(&_tag_tag, "eea4f2705eeec2db3813f2430829afce99cd00b5");
 
 	/* Remote URL environment variable must be set.  User and password are optional.  */
 	_remote_url = cl_getenv("GITTEST_REMOTE_URL");
@@ -569,6 +571,16 @@ void test_online_push__tag_lightweight(void)
 		exp_refs, ARRAY_SIZE(exp_refs), 0);
 }
 
+void test_online_push__tag_to_tag(void)
+{
+	const char *specs[] = { "refs/tags/tag-tag:refs/tags/tag-tag" };
+	push_status exp_stats[] = { { "refs/tags/tag-tag", NULL } };
+	expected_ref exp_refs[] = { { "refs/tags/tag-tag", &_tag_tag } };
+	do_push(specs, ARRAY_SIZE(specs),
+		exp_stats, ARRAY_SIZE(exp_stats),
+		exp_refs, ARRAY_SIZE(exp_refs), 0);
+}
+
 void test_online_push__force(void)
 {
 	const char *specs1[] = {"refs/heads/b3:refs/heads/tgt"};
diff --git a/tests-clar/resources/push_src/.gitted/objects/36/f79b2846017d3761e0a02d0bccd573e0f90c57 b/tests-clar/resources/push_src/.gitted/objects/36/f79b2846017d3761e0a02d0bccd573e0f90c57
new file mode 100644
index 0000000..0bc57f2
--- /dev/null
+++ b/tests-clar/resources/push_src/.gitted/objects/36/f79b2846017d3761e0a02d0bccd573e0f90c57
@@ -0,0 +1,2 @@
+x%]
+0S͏B)}
@bnf`f`>3(nibC0hQ6BMv2&-M0Q)+
tNsE*;}JϲN픹(th@#B˺C?TÅoyk7
\ No newline at end of file
diff --git a/tests-clar/resources/push_src/.gitted/objects/ee/a4f2705eeec2db3813f2430829afce99cd00b5 b/tests-clar/resources/push_src/.gitted/objects/ee/a4f2705eeec2db3813f2430829afce99cd00b5
new file mode 100644
index 0000000..b7b81d5
Binary files /dev/null and b/tests-clar/resources/push_src/.gitted/objects/ee/a4f2705eeec2db3813f2430829afce99cd00b5 differ
diff --git a/tests-clar/resources/push_src/.gitted/refs/tags/tag-commit-two b/tests-clar/resources/push_src/.gitted/refs/tags/tag-commit-two
new file mode 100644
index 0000000..abb3650
--- /dev/null
+++ b/tests-clar/resources/push_src/.gitted/refs/tags/tag-commit-two
@@ -0,0 +1 @@
+36f79b2846017d3761e0a02d0bccd573e0f90c57
diff --git a/tests-clar/resources/push_src/.gitted/refs/tags/tag-tag b/tests-clar/resources/push_src/.gitted/refs/tags/tag-tag
new file mode 100644
index 0000000..d6cd748
--- /dev/null
+++ b/tests-clar/resources/push_src/.gitted/refs/tags/tag-tag
@@ -0,0 +1 @@
+eea4f2705eeec2db3813f2430829afce99cd00b5