[gnome-builder/wip/newgit2: 2/2] new-project-dialog: use the new fetch options to add the remote callbacks
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/newgit2: 2/2] new-project-dialog: use the new fetch options to add the remote callbacks
- Date: Fri, 17 Jul 2015 10:05:31 +0000 (UTC)
commit 31a64d94369d21bfe9dd890e0e8412361c49563d
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Fri Jul 17 12:04:50 2015 +0200
new-project-dialog: use the new fetch options to add the remote callbacks
src/dialogs/gb-new-project-dialog.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/dialogs/gb-new-project-dialog.c b/src/dialogs/gb-new-project-dialog.c
index f011e34..dfa7e91 100644
--- a/src/dialogs/gb-new-project-dialog.c
+++ b/src/dialogs/gb-new-project-dialog.c
@@ -188,6 +188,7 @@ gb_new_project_dialog__clone_worker (GTask *task,
g_autoptr(GFile) workdir = NULL;
CloneRequest *req = task_data;
GgitCloneOptions *clone_options;
+ GgitFetchOptions *fetch_options;
GgitRemoteCallbacks *callbacks;
IdeProgress *progress;
GError *error = NULL;
@@ -197,16 +198,20 @@ gb_new_project_dialog__clone_worker (GTask *task,
g_assert (req != NULL);
g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
- clone_options = ggit_clone_options_new ();
- ggit_clone_options_set_is_bare (clone_options, FALSE);
- ggit_clone_options_set_checkout_branch (clone_options, "master");
-
callbacks = g_object_new (IDE_TYPE_GIT_REMOTE_CALLBACKS, NULL);
progress = ide_git_remote_callbacks_get_progress (IDE_GIT_REMOTE_CALLBACKS (callbacks));
g_object_bind_property (progress, "fraction",
self->clone_progress, "fraction",
G_BINDING_SYNC_CREATE);
- ggit_clone_options_set_remote_callbacks (clone_options, callbacks);
+
+ fetch_options = ggit_fetch_options_new ();
+ ggit_fetch_options_set_remote_callbacks (fetch_options, callbacks);
+
+ clone_options = ggit_clone_options_new ();
+ ggit_clone_options_set_is_bare (clone_options, FALSE);
+ ggit_clone_options_set_checkout_branch (clone_options, "master");
+ ggit_clone_options_set_fetch_options (clone_options, fetch_options);
+ ggit_fetch_options_free (fetch_options);
repository = ggit_repository_clone (req->uri, req->location, clone_options, &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]