From: "Shawn O. Pearce" <spearce@spearce.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Git Mailing List <git@vger.kernel.org>, Junio C Hamano <junkio@cox.net>
Subject: Re: Clean up write_in_full() users
Date: Thu, 11 Jan 2007 23:33:46 -0500 [thread overview]
Message-ID: <20070112043346.GB24195@spearce.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0701112014050.3594@woody.osdl.org>
Linus Torvalds <torvalds@osdl.org> 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.
next prev parent reply other threads:[~2007-01-12 4:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-12 4:23 Clean up write_in_full() users Linus Torvalds
2007-01-12 4:33 ` Shawn O. Pearce [this message]
2007-01-12 4:43 ` Linus Torvalds
2007-01-12 14:37 ` Morten Welinder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070112043346.GB24195@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox