Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
rebase: consistent error messages for staged and unstaged changes.
[gitweb.git]
/
builtin-grep.c
diff --git
a/builtin-grep.c
b/builtin-grep.c
index ff8e51b43ee7ebf635d72de023dca898c0db9440..f477659100fdc63bff5938b4c96f28eaefc07460 100644
(file)
--- a/
builtin-grep.c
+++ b/
builtin-grep.c
@@
-612,7
+612,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)