diff --git a/builtin-apply.c b/builtin-apply.c
index c8ca41b68f8febb4856e3d6cc9a0ebef0a0a9973..1103625a4a923d92ca8d335d1a872236630541e5 100644 (file)
--- a/builtin-apply.c
+++ b/builtin-apply.c
* In such a case, path "new_name" does not exist as
* far as git is concerned.
*/
- if (has_symlink_leading_path(new_name, NULL))
+ if (has_symlink_leading_path(strlen(new_name), new_name))
return 0;
return error("%s: already exists in working directory", new_name);
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);