summaryrefslogtreecommitdiff
path: root/builtin-grep.c
diff options
context:
space:
mode:
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 73fc922c49..e5583686a2 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -594,7 +594,7 @@ static int file_callback(const struct option *opt, const char *arg, int unset)
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)