summaryrefslogtreecommitdiff
path: root/builtin/grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-06-28 22:19:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-06-28 22:19:32 (GMT)
commit08080894b7bd68db413275e601286d94b40752bd (patch)
tree4541a9e47013b90380d18111c97df65d138aaf8b /builtin/grep.c
parentdefd7aa34c81148904ed5d22d975b5b3c843e040 (diff)
parent023e37c37780d6a56f2870a979c8eb3a9ee9a44d (diff)
downloadgit-08080894b7bd68db413275e601286d94b40752bd.zip
git-08080894b7bd68db413275e601286d94b40752bd.tar.gz
git-08080894b7bd68db413275e601286d94b40752bd.tar.bz2
Merge branch 'mm/verify-filename-fix'
"git diff COPYING HEAD:COPYING" gave a nonsense error message that claimed that the treeish HEAD did not have COPYING in it.
Diffstat (limited to 'builtin/grep.c')
-rw-r--r--builtin/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index fe1726f..29adb0a 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -928,7 +928,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
if (!seen_dashdash) {
int j;
for (j = i; j < argc; j++)
- verify_filename(prefix, argv[j]);
+ verify_filename(prefix, argv[j], j == i);
}
paths = get_pathspec(prefix, argv + i);