1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-31 22:37:54 +01:00
git/refs
Jeff King 88780c37b3 files-backend: prefer "0" for write_in_full() error check
Commit 06f46f237a (avoid "write_in_full(fd, buf, len) !=
len" pattern, 2017-09-13) converted this callsite from:

  write_in_full(...) != 1

to

  write_in_full(...) < 0

But during the conflict resolution in c50424a6f0 (Merge
branch 'jk/write-in-full-fix', 2017-09-25), this morphed
into

  write_in_full(...) < 1

This behaves as we want, but we prefer to avoid modeling the
"less than length" error-check which can be subtly buggy, as
shown in efacf609c8 (config: avoid "write_in_full(fd, buf,
len) < len" pattern, 2017-09-13).

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-09-26 12:54:43 +09:00
..
files-backend.c files-backend: prefer "0" for write_in_full() error check 2017-09-26 12:54:43 +09:00
iterator.c prefix_ref_iterator: don't trim too much 2017-05-23 14:29:52 +09:00
packed-backend.c Merge branch 'mh/packed-ref-transactions' 2017-09-19 10:47:56 +09:00
packed-backend.h packed-backend: rip out some now-unused code 2017-09-09 03:18:04 +09:00
ref-cache.c *.[ch] refactoring: make use of the FREE_AND_NULL() macro 2017-06-16 12:44:09 -07:00
ref-cache.h create_ref_entry(): remove check_name option 2017-05-23 14:29:56 +09:00
refs-internal.h struct ref_transaction: add a place for backends to store data 2017-09-09 03:18:03 +09:00