From: Shawn O. Pearce Date: Fri, 12 Jan 2007 04:33:46 GMT Subject: Re: Clean up write_in_full() users Message-ID: <20070112043346.GB24195@spearce.org> In-Reply-To: Linus Torvalds wrote: > I actually think "read_in_full()" should get the same loving tender care > too, for all the same reasons. I think "read_or_die()" is totally broken. > Anybody who uses "read_or_die()" is buggy by definition, since it will do > a partial read AND NOT RETURN ANY INDICATION THAT IT WAS PARTIAL! AFAIK the only user of read_or_die is sha1_file.c when it reads in the 12 byte pack header and the 20 byte pack trailer to "quickly" verify the packfile is sane before using it. If I recall correctly it was correct when I created it, but the read_in_full refactoring changed it. -- Shawn.