diff options
Diffstat (limited to 'builtin/am.c')
-rw-r--r-- | builtin/am.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/builtin/am.c b/builtin/am.c index a97422387..5fdf5b4c2 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -402,13 +402,8 @@ static int read_commit_msg(struct am_state *state) */ static void write_commit_msg(const struct am_state *state) { - int fd; const char *filename = am_path(state, "final-commit"); - - fd = xopen(filename, O_WRONLY | O_CREAT, 0666); - if (write_in_full(fd, state->msg, state->msg_len) < 0) - die_errno(_("could not write to %s"), filename); - close(fd); + write_file_buf(filename, state->msg, state->msg_len); } /** |