Skip to content

Commit 28224c2

Browse files
phillipwoodgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Phillip Wood <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a4b8ab5 commit 28224c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin/am.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,8 @@ static int read_author_script(struct am_state *state)
318318
if (fd < 0) {
319319
if (errno == ENOENT)
320320
return 0;
321-
die_errno(_("could not open '%s' for reading"), filename);
321+
return error_errno(_("could not open '%s' for reading"),
322+
filename);
322323
}
323324
strbuf_read(&buf, fd, 0);
324325
close(fd);

0 commit comments

Comments
 (0)