diff --git a/rev-parse.c b/rev-parse.c
index a1aa86398a62559b8d04cde2a542edaee7290cf1..d2f086432b0b709c9c8c5f2b8c6c15a9ddb59e29 100644 (file)
--- a/rev-parse.c
+++ b/rev-parse.c
}
if (verify)
die("Needed a single revision");
- if (lstat(arg, &st) < 0)
+ if ((filter & DO_REVS) &&
+ (filter & DO_NONFLAGS) && /* !def && */
+ lstat(arg, &st) < 0)
die("'%s': %s", arg, strerror(errno));
as_is = 1;
show_file(arg);