diff options
Diffstat (limited to 'builtin-merge.c')
-rw-r--r-- | builtin-merge.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin-merge.c b/builtin-merge.c index 7c2b90c70b..cf869751b4 100644 --- a/builtin-merge.c +++ b/builtin-merge.c @@ -293,8 +293,10 @@ static void squash_message(void) pretty_print_commit(rev.commit_format, commit, &out, rev.abbrev, NULL, NULL, rev.date_mode, 0); } - write(fd, out.buf, out.len); - close(fd); + if (write(fd, out.buf, out.len) < 0) + die("Writing SQUASH_MSG: %s", strerror(errno)); + if (close(fd)) + die("Finishing SQUASH_MSG: %s", strerror(errno)); strbuf_release(&out); } |