[ostree/wip/bootloader: 3/4] pull-local: Support --remote argument



commit 2ed6355abeae90cf67fe5e7286c8666cb6104ff4
Author: Colin Walters <walters verbum org>
Date:   Sat Jun 29 11:44:26 2013 -0400

    pull-local: Support --remote argument
    
    For offline upgrades, pull-local can now write the refs into a
    specific remote, rather than using the local heads.

 src/ostree/ot-builtin-pull-local.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/ostree/ot-builtin-pull-local.c b/src/ostree/ot-builtin-pull-local.c
index f0c10df..1f760db 100644
--- a/src/ostree/ot-builtin-pull-local.c
+++ b/src/ostree/ot-builtin-pull-local.c
@@ -28,7 +28,10 @@
 #include <unistd.h>
 #include <stdlib.h>
 
+static char *opt_remote;
+
 static GOptionEntry options[] = {
+  { "remote", 0, 0, G_OPTION_ARG_STRING, &opt_remote, "Add REMOTE to refspec", "REMOTE" },
   { NULL }
 };
 
@@ -310,8 +313,9 @@ ostree_builtin_pull_local (int argc, char **argv, GFile *repo_path, GError **err
     {
       const char *name = key;
       const char *checksum = value;
-
-      if (!ostree_repo_write_ref (data->dest_repo, NULL, name, checksum, error))
+        
+      if (!ostree_repo_write_ref (data->dest_repo, opt_remote, name, checksum,
+                                  error))
         goto out;
     }
 


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