I'm unsure if this is a bug or a feature of diff, but certainly it was 
unexpected to me
that diff doesn't account for an empty directory or file:

$ diff --version
$ diff (GNU diffutils) 3.0
Packaged by Gentoo (3.0)

$ mkdir a/c -p
$ mkdir b/c -p
$ touch b/c/emptyfile
$ diff -urN a b

One might argue that diff isn't exactly tar. But when generating a patch you
sometimes need to create empty directories, empty files or both.





Reply via email to