diff: Add ostree_diff_dirs_with_options(), expose via cmdline
The first options are owner_uid/owner_gid, which makes it possible to use diff on local files where --owner-uid/gid have been passed to commit. Closes: #740 Approved by: cgwalters
This commit is contained in:
1 parent
5d413dff88
commit
e665e51408
7 files changed
+119
-5
No files matched your search
@@ -71,6 +71,42 @@ gboolean ostree_diff_dirs (OstreeDiffFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
/**
|
||||
* OstreeDiffDirsOptions:
|
||||
*
|
||||
* An extensible options structure controlling diff dirs. Make sure
|
||||
* that owner_uid/gid is set to -1 when not used. This is used by
|
||||
* ostree_diff_dirs_with_options().
|
||||
*/
|
||||
typedef struct {
|
||||
gint owner_uid;
|
||||
gint owner_gid;
|
||||
|
||||
OstreeRepoDevInoCache *devino_to_csum_cache;
|
||||
|
||||
gboolean unused_bools[7];
|
||||
int unused_ints[6];
|
||||
gpointer unused_ptrs[7];
|
||||
} OstreeDiffDirsOptions;
|
||||
|
||||
/**
|
||||
* OSTREE_DIFF_DIRS_OPTIONS_INIT:
|
||||
*
|
||||
* Use this to initialize an `OstreeDiffDirsOptions` structure.
|
||||
*/
|
||||
#define OSTREE_DIFF_DIRS_OPTIONS_INIT { .owner_uid = -1, .owner_gid = -1, }
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_diff_dirs_with_options (OstreeDiffFlags flags,
|
||||
GFile *a,
|
||||
GFile *b,
|
||||
GPtrArray *modified,
|
||||
GPtrArray *removed,
|
||||
GPtrArray *added,
|
||||
OstreeDiffDirsOptions *options,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_diff_print (GFile *a,
|
||||
GFile *b,
|
||||
|
||||
Reference in new issue
Block a user