[PATCH] Diff-files fix with more tests.

The same check we added earlier to update-cache to catch ENOTDIR
turns out to be missing from diff-files.  This causes a
difference not being reported when you have DF/DF (a file in a
subdirectory) in the cache and DF is a file on the filesystem.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Junio C Hamano
2005-05-20 09:48:38 -07:00
committed by Linus Torvalds
parent 63713028cd
commit 411746940f
2 changed files with 62 additions and 1 deletions

View File

@ -108,7 +108,7 @@ int main(int argc, char **argv)
}
if (lstat(ce->name, &st) < 0) {
if (errno != ENOENT) {
if (errno != ENOENT && errno != ENOTDIR) {
perror(ce->name);
continue;
}