1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-16 05:38:39 +00:00
Commit graph

4 commits

Author SHA1 Message Date
Aleksa Sarai
ad35cae482
compare: always diff "xattr" keys
Because of how xattr works (it will not be set on all files, but it's
possible for it to be added to a file without changing any other key)
it's necessary that we _always_ compute a diff when we hit an inode that
has xattr keys set.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-12-17 20:14:17 +11:00
21723a3974
*: fix comparison of missing keywords
Adding another test validated from the FreeBSD workflow.

Just because the keywords requested to be validated are not present in
the manifest, it is not an error.
Also, if the keywords from a new manifest are not present in a prior
manifest, then only compare the common keywords.

Fixes https://github.com/vbatts/go-mtree/issues/86

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-11-17 21:38:10 -05:00
4eec68be4b
*: make Keyword and KeyVal pervasive
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-11-17 21:38:01 -05:00
Aleksa Sarai
26ff922da6
compare: implement mtree.DirectoryHierarchy comparisons
This is part of a patchset that refactors all of the checking logic into
comparison operations. Essentially, provide a Compare(...) function that
allows for two different manifests to be compared. Extra and missing
entries are supported in addition to the standard modified entry, and by
implementing as a manifest comparison there is no double-scanning of the
manifest source.

The main annoyance is that we have to also include tar_time handling,
which has not been abstracted inside keywords.go. This is a bit ugly
right now, but works fine for the moment.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-11-10 11:30:06 +11:00