#define OSTREE_SUMMARY_COLLECTION_MAP "ostree.summary.collection-map"
#define OSTREE_SUMMARY_MODE "ostree.summary.mode"
#define OSTREE_SUMMARY_TOMBSTONE_COMMITS "ostree.summary.tombstone-commits"
+#define OSTREE_SUMMARY_INDEXED_DELTAS "ostree.summary.indexed-deltas"
#define _OSTREE_PAYLOAD_LINK_PREFIX "../"
#define _OSTREE_PAYLOAD_LINK_PREFIX_LEN (sizeof (_OSTREE_PAYLOAD_LINK_PREFIX) - 1)
{
g_autoptr(GPtrArray) all_deltas = NULL;
g_autoptr(GHashTable) deltas_to_commit_ht = NULL; /* map: to checksum -> ptrarray of from checksums (or NULL) */
+ gboolean opt_indexed_deltas;
/* Protect against parallel prune operation */
g_autoptr(OstreeRepoAutoLock) lock =
if (!lock)
return FALSE;
+ /* Enusre that the "indexed-deltas" option is set on the config, so we know this when pulling */
+ if (!ot_keyfile_get_boolean_with_default (repo->config, "core",
+ "indexed-deltas", FALSE,
+ &opt_indexed_deltas, error))
+ return FALSE;
+
+ if (!opt_indexed_deltas)
+ {
+ g_autoptr(GKeyFile) config = ostree_repo_copy_config (repo);
+ g_key_file_set_boolean (config, "core", "indexed-deltas", TRUE);
+ if (!ostree_repo_write_config (repo, config, error))
+ return FALSE;
+ }
+
deltas_to_commit_ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify)null_or_ptr_array_unref);
if (opt_to_commit == NULL)
g_variant_new_boolean (tombstone_commits));
}
+ g_variant_dict_insert_value (&additional_metadata_builder, OSTREE_SUMMARY_INDEXED_DELTAS,
+ g_variant_new_boolean (TRUE));
+
/* Add refs which have a collection specified, which could be in refs/mirrors,
* refs/heads, and/or refs/remotes. */
{