Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJameson Miller <jamill@microsoft.com>2012-12-18 03:48:26 +0400
committerMichael Schubert <schu@schu.io>2013-01-09 19:15:58 +0400
commit087f64d3e3ea224dadb9b4ae1130b9499f49cff9 (patch)
treeff8dd785970e117eee9a50286235baf61b8e002e /tests-clar/online/push.c
parent11fccddcb513b30d841160ddb411a4828be3ed91 (diff)
Relax refspecs accepted by push
Diffstat (limited to 'tests-clar/online/push.c')
-rw-r--r--tests-clar/online/push.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests-clar/online/push.c b/tests-clar/online/push.c
index 9d949b77b..0fc57799f 100644
--- a/tests-clar/online/push.c
+++ b/tests-clar/online/push.c
@@ -525,3 +525,25 @@ void test_online_push__expressions(void)
exp_stats_right_expr, ARRAY_SIZE(exp_stats_right_expr),
NULL, 0, 0);
}
+
+void test_network_push__notes(void)
+{
+ git_oid note_oid, *target_oid, expected_oid;
+ git_signature *signature;
+ const char *specs[] = { "refs/notes/commits:refs/notes/commits" };
+ push_status exp_stats[] = { { "refs/notes/commits", NULL } };
+ expected_ref exp_refs[] = { { "refs/notes/commits", &expected_oid } };
+ git_oid_fromstr(&expected_oid, "8461a99b27b7043e58ff6e1f5d2cf07d282534fb");
+
+ target_oid = &_oid_b6;
+
+ /* Create note to push */
+ cl_git_pass(git_signature_new(&signature, "nulltoken", "emeric.fermas@gmail.com", 1323847743, 60)); /* Wed Dec 14 08:29:03 2011 +0100 */
+ cl_git_pass(git_note_create(&note_oid, _repo, signature, signature, NULL, target_oid, "hello world\n"));
+
+ do_push(specs, ARRAY_SIZE(specs),
+ exp_stats, ARRAY_SIZE(exp_stats),
+ exp_refs, ARRAY_SIZE(exp_refs), 0);
+
+ git_signature_free(signature);
+}