diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-09-25 15:24:06 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-25 15:24:06 +0900 |
commit | c50424a6f07f17ff9b06927606df650cd73a09a3 (patch) | |
tree | 8dad3903bf837ace4c3e05f223004864aead881d /fast-import.c | |
parent | 94982b69994c448dafbc0721398f8944ab5856e3 (diff) | |
parent | f48ecd38cb86b86f01914e875d74c92c077bf493 (diff) | |
download | git-c50424a6f07f17ff9b06927606df650cd73a09a3.tar.gz |
Merge branch 'jk/write-in-full-fix'
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 'fast-import.c')
-rw-r--r-- | fast-import.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fast-import.c b/fast-import.c index 49516d60e6..35bf671f12 100644 --- a/fast-import.c +++ b/fast-import.c @@ -2952,7 +2952,7 @@ static void parse_reset_branch(const char *arg) static void cat_blob_write(const char *buf, unsigned long size) { - if (write_in_full(cat_blob_fd, buf, size) != size) + if (write_in_full(cat_blob_fd, buf, size) < 0) die_errno("Write to frontend failed"); } |