Allow comparing directories with container formats (tar/ZIP/ISO etc)
This bug was originally reported by Paul Wise (@pabs) in Debian bug #988488:
When comparing directories and files that are essentially directories
serialised into a file (such as tar, ZIP, ISO etc), currently
diffoscope just says one is a file while one is a directory.
$ rm -rf ./* ; mkdir foo ; echo foo > foo/bar ; tar acf foo.tar foo ; ec=
ho bar >> foo/bar
$ diffoscope foo foo.tar
--- foo
+++ foo.tar
@@ -1 +1 @@
-type: directory
+type: file
diffoscope can already compare two directories, or two tar files or a
zip file and a tar file, so it would be useful if it could compare a
directory with a file in one of the many types of container formats.
This would be useful in many situations but especially for the
situation where dpkg-source reports a change to a file in the working
directory compared to the upstream tarball, but the change isn't
obvious from the output and should not be present in theory.