summaryrefslogtreecommitdiff
path: root/rev-parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'rev-parse.c')
-rw-r--r--rev-parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rev-parse.c b/rev-parse.c
index 7abad35..9567b0f 100644
--- a/rev-parse.c
+++ b/rev-parse.c
@@ -294,7 +294,9 @@ int main(int argc, char **argv)
}
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);