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:
authorCarlos Martín Nieto <cmn@dwim.me>2013-09-16 06:20:05 +0400
committerCarlos Martín Nieto <cmn@dwim.me>2013-10-02 08:41:42 +0400
commitd31402a3fc4aa1b7d48ba43fd3bb072e7d69a527 (patch)
treecc8eb1e1801c98c25349951d6cd3667d94d9ea19 /tests-clar/online/clone.c
parent71e33d2649f990086237a6cd0fdb7f7d6f742b51 (diff)
remote: put the _download() callback with the others
The text progress and update_tips callbacks are already part of the struct, which was meant to unify the callback setup, but the download one was left out.
Diffstat (limited to 'tests-clar/online/clone.c')
-rw-r--r--tests-clar/online/clone.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/tests-clar/online/clone.c b/tests-clar/online/clone.c
index dc5aa4150..bda260858 100644
--- a/tests-clar/online/clone.c
+++ b/tests-clar/online/clone.c
@@ -100,11 +100,15 @@ void test_online_clone__can_checkout_a_cloned_repo(void)
bool checkout_progress_cb_was_called = false,
fetch_progress_cb_was_called = false;
+ git_remote_callbacks callbacks = GIT_REMOTE_CALLBACKS_INIT;
+
g_options.checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
g_options.checkout_opts.progress_cb = &checkout_progress;
g_options.checkout_opts.progress_payload = &checkout_progress_cb_was_called;
- g_options.fetch_progress_cb = &fetch_progress;
- g_options.fetch_progress_payload = &fetch_progress_cb_was_called;
+
+ callbacks.transfer_progress = &fetch_progress;
+ callbacks.payload = &fetch_progress_cb_was_called;
+ g_options.remote_callbacks = &callbacks;
cl_git_pass(git_clone(&g_repo, LIVE_REPO_URL, "./foo", &g_options));
@@ -199,6 +203,16 @@ static int cancel_at_half(const git_transfer_progress *stats, void *payload)
void test_online_clone__can_cancel(void)
{
- g_options.fetch_progress_cb = cancel_at_half;
+ git_remote_callbacks callbacks = GIT_REMOTE_CALLBACKS_INIT;
+
+ callbacks.transfer_progress = cancel_at_half;
+ g_options.remote_callbacks = &callbacks;
+
cl_git_fail_with(git_clone(&g_repo, LIVE_REPO_URL, "./foo", &g_options), GIT_EUSER);
}
+
+
+
+
+
+