Skip to content

Commit a1f3515

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Jeff King <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 88780c3 commit a1f3515

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

notes-merge.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,6 @@ static void write_buf_to_worktree(const struct object_id *obj,
308308
if (errno == EPIPE)
309309
break;
310310
die_errno("notes-merge");
311-
} else if (!ret) {
312-
die("notes-merge: disk full?");
313311
}
314312
size -= ret;
315313
buf += ret;

0 commit comments

Comments
 (0)