зеркало из https://github.com/microsoft/git.git
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:
Родитель
88780c37b3
Коммит
a1f3515da7
|
@ -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;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче