Open Crest opened 1 year ago
According to https://github.com/opencontainers/image-spec/blob/main/layer.md#distributable-format layer changesets encoded as tar archives "MUST NOT include duplicate entries for file paths in the resulting tar archive".
When ocitar parses the creation or modification of a directory it adds the directory to the list of paths to archive. Both zfs diff and tar both recurse over all files (including subdirectories) in these directories. If I understand the code correctly it should be enough to change the
tar -cf- -T-
invocation totar -cf -nT-
when inzfs_diff
mode, but I'm not certain if would interact with whiteouts on anything but normal filese e.g. does the format require one whiteout for each file in a directory to be removed or are whiteouts applied by recursively to a directory by deleting the directory content before the directory?