Ibrahim Khalifa wrote: > Hi, > > If you run diff against two directories where you have file(s) and the only > difference is that you have file(s) that only exists in one of the > directories, diff will exit with 0. If you use -N och -P it will however exit > with 1. > > Reading through the man-page, I can’t find any reference that this would be > intentionally. Rather I expected it to exit with 1, since there is a > difference found. The only other diff I have access to is GNU diff, which > seems to exit with 1 in the same scenario. > > If the behavior is intentionally, I think the man-page should also reflect > this. Otherwise diff should be changed to exit with 1 even if -N or -P isn’t > used. > > Both changes are trivial and I can provide a patch if there is some consensus > on which behavior is the best.
it's probably an oversight. the exit code should be 1.