Thread (1 message) 1 message, 1 author, 2017-09-27

Re: [PATCH v2 0/7] read/write_in_full leftovers

From: Junio C Hamano <hidden>
Date: 2017-09-27 06:58:04

Jeff King [off-list ref] writes:
I dropped the "read_in_full() should set errno on short reads" idea (3/7
in the earlier series). It really is the caller's fault for looking at
errno when they know there hasn't been an error in the first place. We
should just bite the bullet and have the callers do the right thing.

I also dropped the "xread_in_full" helper (7/7 earlier). The lego
sentences it created just weren't worth the hassle. Instead, I've fixed
all of the relevant callers to provide good error messages for both
cases. It's a few more lines of code, and it's probably rare for users
to see these in the first place. But it doesn't hurt too much to be
thorough, and I think it's good to model correct error handling. This is
in patches 4 and 5 below.
Thanks for being thorough.  My comment on 3/7 might be taken as
contradicting with how 5/7 ties the loose ends up, but I do not care
too deeply either way.

Will queue.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help