This series addresses the bits leftover from the discussion two weeks ago in: https://public-inbox.org/git/20170913170807.cyx7rrpoyhaauvol@xxxxxxxxxxxxxxxxxxxxx/ and its subthread. I don't think any of these is a real problem in practice, so this can be considered as a cleanup. I'm on the fence over whether the final one is a good idea. See the commit message for details. [1/7]: files-backend: prefer "0" for write_in_full() error check [2/7]: notes-merge: drop dead zero-write code [3/7]: read_in_full: reset errno before reading [4/7]: get-tar-commit-id: prefer "!=" for read_in_full() error check [5/7]: worktree: use xsize_t to access file size [6/7]: worktree: check the result of read_in_full() [7/7]: add xread_in_full() helper builtin/get-tar-commit-id.c | 5 +---- builtin/worktree.c | 11 ++++++++--- bulk-checkin.c | 4 +--- cache.h | 7 +++++++ combine-diff.c | 8 +------- csum-file.c | 6 +----- notes-merge.c | 2 -- pack-write.c | 3 +-- refs/files-backend.c | 2 +- wrapper.c | 12 ++++++++++++ 10 files changed, 33 insertions(+), 27 deletions(-) -Peff