From 80c573478b5bfa72254d9f3fbdb2c634bbb1c7af Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Tue, 9 Aug 2016 09:41:48 -0700 Subject: [PATCH] pull-local: Support requiring static deltas Add the --require-static-deltas option like pull to ensure static deltas are processed for local pulls. Closes: #447 Closes: #448 Approved by: cgwalters --- src/ostree/ot-builtin-pull-local.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ostree/ot-builtin-pull-local.c b/src/ostree/ot-builtin-pull-local.c index b6f649f6..5401a281 100644 --- a/src/ostree/ot-builtin-pull-local.c +++ b/src/ostree/ot-builtin-pull-local.c @@ -33,6 +33,7 @@ static char *opt_remote; static gboolean opt_disable_fsync; static gboolean opt_untrusted; +static gboolean opt_require_static_deltas; static gboolean opt_gpg_verify; static gboolean opt_gpg_verify_summary; static int opt_depth = 0; @@ -41,6 +42,7 @@ static GOptionEntry options[] = { { "remote", 0, 0, G_OPTION_ARG_STRING, &opt_remote, "Add REMOTE to refspec", "REMOTE" }, { "disable-fsync", 0, 0, G_OPTION_ARG_NONE, &opt_disable_fsync, "Do not invoke fsync()", NULL }, { "untrusted", 0, 0, G_OPTION_ARG_NONE, &opt_untrusted, "Do not trust source", NULL }, + { "require-static-deltas", 0, 0, G_OPTION_ARG_NONE, &opt_require_static_deltas, "Require static deltas", NULL }, { "gpg-verify", 0, 0, G_OPTION_ARG_NONE, &opt_gpg_verify, "GPG verify commits (must specify --remote)", NULL }, { "gpg-verify-summary", 0, 0, G_OPTION_ARG_NONE, &opt_gpg_verify_summary, "GPG verify summary (must specify --remote)", NULL }, { "depth", 0, 0, G_OPTION_ARG_INT, &opt_depth, "Traverse DEPTH parents (-1=infinite) (default: 0)", "DEPTH" }, @@ -146,6 +148,8 @@ ostree_builtin_pull_local (int argc, char **argv, GCancellable *cancellable, GEr if (opt_remote) g_variant_builder_add (&builder, "{s@v}", "override-remote-name", g_variant_new_variant (g_variant_new_string (opt_remote))); + g_variant_builder_add (&builder, "{s@v}", "require-static-deltas", + g_variant_new_variant (g_variant_new_boolean (opt_require_static_deltas))); if (opt_gpg_verify) g_variant_builder_add (&builder, "{s@v}", "gpg-verify", g_variant_new_variant (g_variant_new_boolean (TRUE)));