diff options
author | Jeff King <peff@peff.net> | 2017-09-25 16:27:57 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-26 12:55:59 +0900 |
commit | a1f3515da74504db0a046759d9ac1615a1d5f4b8 (patch) | |
tree | 69734aa73683db87c4c1eca0706e121588f333d6 | |
parent | files-backend: prefer "0" for write_in_full() error check (diff) | |
download | tgif-a1f3515da74504db0a046759d9ac1615a1d5f4b8.tar.xz |
notes-merge: drop dead zero-write code
We call write_in_full() with a size that we know is greater
than zero. The return value can never be zero, then, since
write_in_full() converts such a failed write() into ENOSPC
and returns -1. We can just drop this branch of the error
handling entirely.
Suggested-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | notes-merge.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/notes-merge.c b/notes-merge.c index 597d43f65c..4352c34a6e 100644 --- a/notes-merge.c +++ b/notes-merge.c @@ -308,8 +308,6 @@ static void write_buf_to_worktree(const struct object_id *obj, if (errno == EPIPE) break; die_errno("notes-merge"); - } else if (!ret) { - die("notes-merge: disk full?"); } size -= ret; buf += ret; |