[ostree] remote: Fix regression in previous commit wrt adding branches



commit 1962623bbcbefd7ad155d9c02478e3edc800cecd
Author: Colin Walters <walters verbum org>
Date:   Sat Jun 21 12:10:24 2014 -0400

    remote: Fix regression in previous commit wrt adding branches
    
    branches is always NULL at that point, we want to look at argc.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731984

 src/ostree/ot-builtin-remote.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/ostree/ot-builtin-remote.c b/src/ostree/ot-builtin-remote.c
index 4375030..75abc55 100644
--- a/src/ostree/ot-builtin-remote.c
+++ b/src/ostree/ot-builtin-remote.c
@@ -102,7 +102,6 @@ ostree_builtin_remote (int argc, char **argv, OstreeRepo *repo, GCancellable *ca
       char **iter;
       gs_free char *target_name = NULL;
       gs_unref_object GFile *target_conf = NULL;
-      gs_unref_ptrarray GPtrArray *branches = NULL;
       gs_unref_variant_builder GVariantBuilder *optbuilder = NULL;
 
       if (argc < 4)
@@ -113,7 +112,7 @@ ostree_builtin_remote (int argc, char **argv, OstreeRepo *repo, GCancellable *ca
 
       optbuilder = g_variant_builder_new (G_VARIANT_TYPE ("a{sv}"));
 
-      if (branches)
+      if (argc > 4)
         {
           gs_unref_ptrarray GPtrArray *branchesp = g_ptr_array_new ();
 


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