Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
name-rev: differentiate between tags and commits they point at
[gitweb.git]
/
builtin
/
grep.c
diff --git
a/builtin/grep.c
b/builtin/grep.c
index e8f0f92cf739c87c19d2be1722b6093ddbed7330..159e65d47a41b56634bc3fb480f9c051d40e692c 100644
(file)
--- a/
builtin/grep.c
+++ b/
builtin/grep.c
@@
-821,6
+821,8
@@
int cmd_grep(int argc, const char **argv, const char *prefix)
/* Is it a rev? */
if (!get_sha1(arg, sha1)) {
struct object *object = parse_object_or_die(sha1, arg);
+ if (!seen_dashdash)
+ verify_non_filename(prefix, arg);
add_object_array(object, arg, &list);
continue;
}