From: Phillip Wood Date: Tue, 30 Oct 2018 10:39:12 GMT Subject: [PATCH v3 1/5] am: don't die in read_author_script() Message-ID: <20181030103916.6241-2-phillip.wood@talktalk.net> In-Reply-To: <20181030103916.6241-1-phillip.wood@talktalk.net> From: Phillip Wood 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 Signed-off-by: Phillip Wood --- builtin/am.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/am.c b/builtin/am.c index 5e866d17c7..b68578bc3f 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); -- 2.19.1