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:
Jeff King 2017-09-25 16:27:57 -04:00 коммит произвёл Junio C Hamano
Родитель 88780c37b3
Коммит a1f3515da7
1 изменённых файлов: 0 добавлений и 2 удалений

Просмотреть файл

@ -308,8 +308,6 @@ static void write_buf_to_worktree(const struct object_id *obj,
if (errno == EPIPE) if (errno == EPIPE)
break; break;
die_errno("notes-merge"); die_errno("notes-merge");
} else if (!ret) {
die("notes-merge: disk full?");
} }
size -= ret; size -= ret;
buf += ret; buf += ret;