X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=revision.c;h=03dd23893947231ef8040ad3c38021ae64f27ae5;hb=ced9456a27197fc038fbc5b5ebad87e55f1920d2;hp=e1f9816bd7e2f91b3c23dedd50f0a03d33c33dfc;hpb=6feba7cb744d5a19472ea0bf5b337ad8a32acf80;p=git.git diff --git a/revision.c b/revision.c index e1f9816b..03dd2389 100644 --- a/revision.c +++ b/revision.c @@ -675,17 +675,15 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch arg++; } if (get_sha1(arg, sha1) < 0) { - struct stat st; int j; if (seen_dashdash || local_flags) die("bad revision '%s'", arg); /* If we didn't have a "--", all filenames must exist */ - for (j = i; j < argc; j++) { - if (lstat(argv[j], &st) < 0) - die("'%s': %s", argv[j], strerror(errno)); - } + for (j = i; j < argc; j++) + verify_filename(revs->prefix, argv[j]); + revs->prune_data = get_pathspec(revs->prefix, argv + i); break; }