--exclude GLOB_PATTERN doesn't affect file lists
This bug was originally reported by Mike Hommey (mh+reportbug@glandium.org) in Debian bug #923995:
Take the following example:
$ mkdir a b
$ echo 0 > a/0
$ echo 0 > b/0
$ echo 1 > b/1
$ diffoscope a b --exclude-directory-metadata=recursive
--- a
+++ b
├── file list
│ @@ -1 +1,2 @@
│ -0
│ +0
│ +1
(BTW, note how weird this diff is)
First, it's worth noting that --new-file doesn't make a difference: the
contents of the new file are not displayed as a diff against an empty
file.
Now let's say I want to ignore `1` entirely. The logical way to do so
would be:
$ diffoscope a b --exclude-directory-metadata=recursive --new-file --exclude b/1
--- a
+++ b
├── file list
│ @@ -1 +1,2 @@
│ -0
│ +0
│ +1
but that doesn't yield the expected result.
If I do create an empty a/1 file, I do get what I'd expect without the
empty file existing.