summaryrefslogtreecommitdiff
path: root/tests-clar/online/push.c
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-08-16 16:22:37 -0700
committerVicent Martí <vicent@github.com>2013-08-16 16:22:37 -0700
commit51a5e13347a0f834e2d847b46d2f6002f03bd49f (patch)
tree0d981a359b03ae34156234571b24a6f509a9fdcb /tests-clar/online/push.c
parentb2be62fd23a9e39ce32725139bdeecf7e10aa2ac (diff)
parent5ce6c1e917a4282455fef6c7fd2236a7fb68653a (diff)
downloadlibgit2-51a5e13347a0f834e2d847b46d2f6002f03bd49f.tar.gz
Merge pull request #1778 from libgit2/push_tag_to_tag_test
push: handle tag chains correctly
Diffstat (limited to 'tests-clar/online/push.c')
-rw-r--r--tests-clar/online/push.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests-clar/online/push.c b/tests-clar/online/push.c
index 8b9602b45..4c0a28c1c 100644
--- a/tests-clar/online/push.c
+++ b/tests-clar/online/push.c
@@ -33,6 +33,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,
@@ -279,6 +280,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");
@@ -579,6 +581,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"};