core: Stub out a diff API and builtin
This commit is contained in:
1 parent
f265579367
commit
a3043c0d64
6 files changed
+141
No files matched your search
@@ -1842,3 +1842,33 @@ ostree_repo_checkout (OstreeRepo *self,
|
||||
g_clear_object (&root_info);
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
ostree_repo_diff (OstreeRepo *self,
|
||||
const char *ref,
|
||||
GFile *target,
|
||||
GPtrArray **out_modified,
|
||||
GPtrArray **out_removed,
|
||||
GPtrArray **out_added,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
GPtrArray *ret_modified = NULL;
|
||||
GPtrArray *ret_removed = NULL;
|
||||
GPtrArray *ret_added = NULL;
|
||||
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"Not implemented yet");
|
||||
goto out;
|
||||
|
||||
ret = TRUE;
|
||||
out:
|
||||
if (ret_modified)
|
||||
g_ptr_array_free (ret_modified, TRUE);
|
||||
if (ret_removed)
|
||||
g_ptr_array_free (ret_removed, TRUE);
|
||||
if (ret_added)
|
||||
g_ptr_array_free (ret_added, TRUE);
|
||||
return ret;
|
||||
}
|
||||
@@ -124,6 +124,30 @@ gboolean ostree_repo_checkout (OstreeRepo *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
typedef struct {
|
||||
guint content_differs : 1;
|
||||
guint xattrs_differs : 1;
|
||||
guint unused : 30;
|
||||
|
||||
GFileInfo *src_info;
|
||||
GFileInfo *target_info;
|
||||
|
||||
char *src_file_checksum;
|
||||
char *target_file_checksum;
|
||||
|
||||
GVariant *src_xattrs;
|
||||
GVariant *target_xattrs;
|
||||
} OstreeRepoDiffItem;
|
||||
|
||||
gboolean ostree_repo_diff (OstreeRepo *self,
|
||||
const char *ref,
|
||||
GFile *target,
|
||||
GPtrArray **out_modified, /* OstreeRepoDiffItem */
|
||||
GPtrArray **out_removed, /* OstreeRepoDiffItem */
|
||||
GPtrArray **out_added, /* OstreeRepoDiffItem */
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
typedef void (*OstreeRepoObjectIter) (OstreeRepo *self, const char *path,
|
||||
GFileInfo *fileinfo, gpointer user_data);
|
||||
|
||||
|
||||
Reference in new issue
Block a user