rev-parse: make "whatchanged -- git-fetch-script" work again.
[gitweb.git] / rev-parse.c
index 7abad35de90b190c5d5e5456661853cf8167954a..9567b0f5b919c76700ea9899ba807425953bf87c 100644 (file)
@@ -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);