git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] grep: avoid accepting ambiguous revision

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Jan 21, 2013, 13:00 UTC
Message-ID
<1358773249-24384-2-git-send-email-pclouds@gmail.com>
In-Reply-To
<1358773249-24384-1-git-send-email-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 builtin/grep.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/builtin/grep.c b/builtin/grep.c
index 0e1b6c8..8025964 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -823,6 +823,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
 			struct object *object = parse_object(sha1);
 			if (!object)
 				die(_("bad object %s"), arg);
+			if (!seen_dashdash)
+				verify_non_filename(prefix, arg);
 			add_object_array(object, arg, &list);
 			continue;
 		}
-- 
1.8.0.rc2.23.g1fb49df
Previous: Nguyễn Thái Ngọc DuyNext: Junio C Hamano
Message 2 of 5 in “Update :/abc ambiguity check”
  1. 1/2 Update :/abc ambiguity checkNguyễn Thái Ngọc Duy, Jan 21, 2013
  2. 2/2 grep: avoid accepting ambiguous revisionNguyễn Thái Ngọc Duy, Jan 21, 2013
  3. Junio C HamanoJan 21, 2013
  4. Duy NguyenJan 22, 2013
  5. Junio C HamanoJan 22, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.