From: Dan Nicholson Date: Fri, 5 Aug 2016 13:52:55 +0000 (-0700) Subject: pull: Disable static deltas by default for local pulls X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~48^2~28 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1caef17c7f9f411317a17c91dba48d54049a4d54;p=ostree.git pull: Disable static deltas by default for local pulls For local pulls there's no benefit pulling the static delta over the individual object files since there's no HTTP overhead. Furthermore, processing deltas always generates the objects whereas a standard pull ensures that the exact object files are copied. Using deltas also prevents hardlinking the objects if the repos exist on the same filesystem. Closes: #447 Closes: #448 Approved by: cgwalters --- diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 712f17dc..5fe30e08 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -2413,6 +2413,12 @@ ostree_repo_pull_with_options (OstreeRepo *self, } } + /* For local pulls, default to disabling static deltas so that the + * exact object files are copied. + */ + if (pull_data->remote_repo_local && !require_static_deltas) + disable_static_deltas = TRUE; + pull_data->static_delta_superblocks = g_ptr_array_new_with_free_func ((GDestroyNotify)g_variant_unref); {