summaryrefslogtreecommitdiff
path: root/tests/online/push_util.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-10-10 13:35:57 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-11-09 00:01:58 +0100
commit6eb9e39ce03e4db1fb39ff9fa8ed771463fca1bd (patch)
tree14ba452630b8ddd5d07b76d9a80bc6f22b2d87c9 /tests/online/push_util.c
parent3149547b5ae526f28412574d64d874a4dfd2ed9c (diff)
downloadlibgit2-6eb9e39ce03e4db1fb39ff9fa8ed771463fca1bd.tar.gz
push: move main test function to git_remote_push()
We have the step-by-step method in the initialization function as we want to remove references based on the list of references which are already there, and we can use the convenience function for testing the main push.
Diffstat (limited to 'tests/online/push_util.c')
-rw-r--r--tests/online/push_util.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/online/push_util.c b/tests/online/push_util.c
index 68e71eacc..cd483c7c0 100644
--- a/tests/online/push_util.c
+++ b/tests/online/push_util.c
@@ -14,15 +14,31 @@ void updated_tip_free(updated_tip *t)
git__free(t);
}
+void push_status_free(push_status *s)
+{
+ git__free(s->ref);
+ git__free(s->msg);
+ git__free(s);
+}
+
void record_callbacks_data_clear(record_callbacks_data *data)
{
size_t i;
updated_tip *tip;
+ push_status *status;
git_vector_foreach(&data->updated_tips, i, tip)
updated_tip_free(tip);
git_vector_free(&data->updated_tips);
+
+ git_vector_foreach(&data->statuses, i, status)
+ push_status_free(status);
+
+ git_vector_free(&data->statuses);
+
+ data->pack_progress_calls = 0;
+ data->transfer_progress_calls = 0;
}
int record_update_tips_cb(const char *refname, const git_oid *a, const git_oid *b, void *data)