lib/repo: Omit deltas from the summary file if there are none
If there are no deltas to be listed in the summary file, don’t bother including the key for them in the additional metadata section of the file. This saves a few bytes in some cases. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #911 Approved by: cgwalters
This commit is contained in:
1 parent
7ce6777028
commit
59ffce73c8
2 files changed
+2
-2
No files matched your search
@@ -4561,7 +4561,8 @@ ostree_repo_regenerate_summary (OstreeRepo *self,
|
||||
g_variant_dict_insert_value (&deltas_builder, delta_names->pdata[i], ot_gvariant_new_bytearray (csum, 32));
|
||||
}
|
||||
|
||||
g_variant_dict_insert_value (&additional_metadata_builder, OSTREE_SUMMARY_STATIC_DELTAS, g_variant_dict_end (&deltas_builder));
|
||||
if (delta_names->len > 0)
|
||||
g_variant_dict_insert_value (&additional_metadata_builder, OSTREE_SUMMARY_STATIC_DELTAS, g_variant_dict_end (&deltas_builder));
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user