summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c2d02a)
raw | patch | inline | side by side (parent: 2c2d02a)
author | Alberto Bertogli <albertito@gmail.com> | |
Mon, 14 Apr 2008 15:30:27 +0000 (12:30 -0300) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 16 Apr 2008 05:42:08 +0000 (22:42 -0700) |
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>
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>
builtin-apply.c | patch | blob | history |
diff --git a/builtin-apply.c b/builtin-apply.c
index 03f2e950ba55bce81a846514926512af6746f41b..65388353a75814d940171aa259e4058683f355a2 100644 (file)
--- a/builtin-apply.c
+++ b/builtin-apply.c
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);