summaryrefslogtreecommitdiffstats
path: root/builtin/am.c
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2018-10-31 11:15:52 +0100
committerJunio C Hamano <gitster@pobox.com>2018-11-01 04:08:06 +0100
commit28224c23597e5d4b405b87e4e3dc321fd2d2c4f6 (patch)
tree891d92ae2980af0ad266cab01b8da34abff6b033 /builtin/am.c
parentFourth batch for 2.20 (diff)
downloadgit-28224c23597e5d4b405b87e4e3dc321fd2d2c4f6.tar.xz
git-28224c23597e5d4b405b87e4e3dc321fd2d2c4f6.zip
am: don't die in read_author_script()
The caller is already prepared to handle errors returned from this function so there is no need for it to die if it cannot read the file. Suggested-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r--builtin/am.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 5e643e2a3e..4f7f28a9dc 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -318,7 +318,8 @@ static int read_author_script(struct am_state *state)
if (fd < 0) {
if (errno == ENOENT)
return 0;
- die_errno(_("could not open '%s' for reading"), filename);
+ return error_errno(_("could not open '%s' for reading"),
+ filename);
}
strbuf_read(&buf, fd, 0);
close(fd);