mirror of
https://github.com/git/git
synced 2024-08-28 20:20:07 +00:00
builtin-apply: Show a more descriptive error on failure when opening a patch
When a patch can't be opened (it doesn't exist, there are permission problems, etc.) we get the usage text, which is not a proper indication of failure. Signed-off-by: Alberto Bertogli <albertito@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
2c2d02a6a7
commit
1da16439be
|
@ -2888,7 +2888,7 @@ int cmd_apply(int argc, const char **argv, const char *unused_prefix)
|
|||
|
||||
fd = open(arg, O_RDONLY);
|
||||
if (fd < 0)
|
||||
usage(apply_usage);
|
||||
die("can't open patch '%s': %s", arg, strerror(errno));
|
||||
read_stdin = 0;
|
||||
set_default_whitespace_mode(whitespace_option);
|
||||
errs |= apply_patch(fd, arg, inaccurate_eof);
|
||||
|
|
Loading…
Reference in a new issue