Closed RKrahl closed 3 years ago
The core of the issue is that this feature has been implemented with the assumption that if an archive does not contain some directory, it will also not contain any content below that directory.
The problem is: it is not even clear what should be the correct output in this case? What should it mean to skip the directory content? Skip reporting any difference below that directory or only skip reporting missing content in archive-b.tar
?
I tend to the former: skip any reporting below that level. Because the --skip-dir-content
option is only supposed to make any sense if the assumption above is true anyway.
The command line tool
archive-tool diff
features the option--skip-dir-content
that, according to the documentation is supposed to: "in the case of a subdirectory missing from one archive, only report the directory, but skip its content." The result is inconsistent in some situations. Consider two archives:Note that
archive-b.tar
contains some content belowbase/data
, but not that directory itself.The output of
archive-tool diff
without the--skip-dir-content
option is correct:With that option, the output is just misleading or even plain wrong in this case:
Note that
archive-tool diff
reportsbase/data/aa
to be missing inarchive-a.tar
, which is false.