[ostree/wip/transaction: 8/9] builtin-refs: Remove the ref delete function



commit 26e42e2ac7e37e11f05792d615d777be27407f04
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Sep 5 17:19:34 2013 -0400

    builtin-refs: Remove the ref delete function
    
    This should be part of write-refs

 src/ostree/ot-builtin-refs.c |   24 ++++--------------------
 1 files changed, 4 insertions(+), 20 deletions(-)
---
diff --git a/src/ostree/ot-builtin-refs.c b/src/ostree/ot-builtin-refs.c
index 99a9333..b13980b 100644
--- a/src/ostree/ot-builtin-refs.c
+++ b/src/ostree/ot-builtin-refs.c
@@ -26,10 +26,7 @@
 #include "ostree.h"
 #include "libgsystem.h"
 
-static gboolean opt_delete;
-
 static GOptionEntry options[] = {
-  { "delete", 0, 0, G_OPTION_ARG_NONE, &opt_delete, "Delete refs which match PREFIX, rather than listing 
them", "PREFIX" },
   { NULL }
 };
 
@@ -56,24 +53,11 @@ ostree_builtin_refs (int argc, char **argv, OstreeRepo *repo, GCancellable *canc
                               cancellable, error))
     goto out;
 
-  if (!opt_delete)
-    {
-      g_hash_table_iter_init (&hashiter, refs);
-      while (g_hash_table_iter_next (&hashiter, &hashkey, &hashvalue))
-        {
-          const char *ref = hashkey;
-          g_print ("%s\n", ref);
-        }
-    }
-  else
+  g_hash_table_iter_init (&hashiter, refs);
+  while (g_hash_table_iter_next (&hashiter, &hashkey, &hashvalue))
     {
-      g_hash_table_iter_init (&hashiter, refs);
-      while (g_hash_table_iter_next (&hashiter, &hashkey, &hashvalue))
-        {
-          const char *refspec = hashkey;
-          if (!ostree_repo_write_refspec (repo, refspec, NULL, error))
-            goto out;
-        }
+      const char *ref = hashkey;
+      g_print ("%s\n", ref);
     }
  
   ret = TRUE;


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