Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-10-23 08:37:21 +0300
committerJunio C Hamano <gitster@pobox.com>2017-10-23 08:37:22 +0300
commit96c6bb566ee5354a1b07530a94d3f85055e46032 (patch)
tree675b4ea93a5c4ffd9db000608d23a794f6cf7d4e /diff.c
parent7186408f2486ebbb82736c15efb8fbc372fb5f95 (diff)
parentf48ecd38cb86b86f01914e875d74c92c077bf493 (diff)
Merge branch 'jk/write-in-full-fix' into maint
Many codepaths did not diagnose write failures correctly when disks go full, due to their misuse of write_in_full() helper function, which have been corrected. * jk/write-in-full-fix: read_pack_header: handle signed/unsigned comparison in read result config: flip return value of store_write_*() notes-merge: use ssize_t for write_in_full() return value pkt-line: check write_in_full() errors against "< 0" convert less-trivial versions of "write_in_full() != len" avoid "write_in_full(fd, buf, len) != len" pattern get-tar-commit-id: check write_in_full() return against 0 config: avoid "write_in_full(fd, buf, len) < len" pattern
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index fa77b00492..8406a8324e 100644
--- a/diff.c
+++ b/diff.c
@@ -2978,7 +2978,7 @@ static void prep_temp_blob(const char *path, struct diff_tempfile *temp,
blob = buf.buf;
size = buf.len;
}
- if (write_in_full(fd, blob, size) != size)
+ if (write_in_full(fd, blob, size) < 0)
die_errno("unable to write temp-file");
close_tempfile(&temp->tempfile);
temp->name = get_tempfile_path(&temp->tempfile);