diff --git a/builtin-grep.c b/builtin-grep.c
index 5308b346e69a50d7695b26f3b8e00bfdf71e1dd2..e5583686a2daeb05def8358044f49f03ba3acbef 100644 (file)
--- a/builtin-grep.c
+++ b/builtin-grep.c
patterns = fopen(arg, "r");
if (!patterns)
- die("'%s': %s", arg, strerror(errno));
+ die_errno("cannot open '%s'", arg);
while (strbuf_getline(&sb, patterns, '\n') == 0) {
/* ignore empty line like grep does */
if (sb.len == 0)
* unrecognized non option is the beginning of the refs list
* that continues up to the -- (if exists), and then paths.
*/
- argc = parse_options(argc, argv, options, grep_usage,
+ argc = parse_options(argc, argv, prefix, options, grep_usage,
PARSE_OPT_KEEP_DASHDASH |
PARSE_OPT_STOP_AT_NON_OPTION |
PARSE_OPT_NO_INTERNAL_HELP);