Allow creating and pulling static deltas starting from "empty"

You create these with something like:
  ostree static-delta generate --empty --to=master

These will be automatically used during pull if no previous revision
exists in the target repo.

These work very much like the normal static deltas except they
are named just by the "to" revision. I.e:

deltas/94/f7d2dc23759dd21f9bd01e6705a8fdf98f90cad3e0109ba3f6c091c1a3774d

for a from-scratch to 94f7d2dc23759dd21f9bd01e6705a8fdf98f90cad3e0109ba3f6c091c1a3774d delta.

https://bugzilla.gnome.org/show_bug.cgi?id=721799
This commit is contained in:
Alexander Larsson committed 2015-01-14 14:43:32 +01:00
1 parent 82ed6c43ed
commit 5b721a5b08
7 files changed
+78 -30

No files matched your search

+10 -1
View File
@@ -204,7 +204,7 @@ diff_add_dir_recurse (GFile *d,
/**
* ostree_diff_dirs:
* @flags: Flags
* @a: First directory path
* @a: First directory path, or %NULL
* @b: First directory path
* @modified: (element-type OstreeDiffItem): Modified files
* @removed: (element-type Gio.File): Removed files
@@ -231,6 +231,15 @@ ostree_diff_dirs (OstreeDiffFlags flags,
gs_unref_object GFileInfo *child_a_info = NULL;
gs_unref_object GFileInfo *child_b_info = NULL;
if (a == NULL)
{
if (!diff_add_dir_recurse (b, added, cancellable, error))
goto out;
ret = TRUE;
goto out;
}
child_a_info = g_file_query_info (a, OSTREE_GIO_FAST_QUERYINFO,
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
cancellable, error);