Oh, man, I'd forgotten about these negated .gitignore patterns entirely. It actually hadn't occurred to me that they could override the behaviour of ignoring empty directories. This is potentially actually useful for me, because I have a project with test data that consists of miniature filesystem sub-trees — that should include empty directories to ensure edge cases are covered. I've been zipping them up and having…
Why not having a txt file with indented tree, a bootstrap function that parses the file and creates the tree and a test for that function? You will have proper diff for the tree this way.
But mainly because, as you acknowledge, that process needs its own tests. Basic unzipping functionality is already tested for me.