mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
49 lines
2 KiB
Diff
49 lines
2 KiB
Diff
|
From 31a64d94369d21bfe9dd890e0e8412361c49563d Mon Sep 17 00:00:00 2001
|
||
|
From: Ignacio Casal Quinteiro <icq@gnome.org>
|
||
|
Date: Fri, 17 Jul 2015 12:04:50 +0200
|
||
|
Subject: new-project-dialog: use the new fetch options to add the remote
|
||
|
callbacks
|
||
|
|
||
|
|
||
|
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);
|
||
|
|
||
|
--
|
||
|
cgit v0.10.2
|
||
|
|