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>
This commit is contained in:
parent
a4b8ab5363
commit
28224c2359
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user