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>
This commit is contained in:
parent
88780c37b3
commit
a1f3515da7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user