[gnome-builder/wip/project-selector: 69/72] git: release clone options when cloning



commit 776ff58ac518dff6d4f079349b2fad8cd8646f6b
Author: Christian Hergert <christian hergert me>
Date:   Mon Apr 6 23:21:08 2015 -0700

    git: release clone options when cloning

 src/dialogs/gb-new-project-dialog.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/dialogs/gb-new-project-dialog.c b/src/dialogs/gb-new-project-dialog.c
index b0f7b85..7214cd8 100644
--- a/src/dialogs/gb-new-project-dialog.c
+++ b/src/dialogs/gb-new-project-dialog.c
@@ -197,17 +197,17 @@ gb_new_project_dialog__clone_worker (GTask        *task,
   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);
   g_object_bind_property (callbacks, "fraction", self->clone_progress, "fraction", G_BINDING_SYNC_CREATE);
   ggit_clone_options_set_remote_callbacks (clone_options, callbacks);
 
-  ggit_clone_options_set_is_bare (clone_options, FALSE);
-  ggit_clone_options_set_checkout_branch (clone_options, "master");
-
   repository = ggit_repository_clone (req->uri, req->location, clone_options, &error);
 
   g_object_unref (callbacks);
+  ggit_clone_options_free (clone_options);
 
   if (repository == NULL)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]