From: Junio C Hamano Date: Mon, 30 Apr 2012 19:12:51 GMT Subject: Re: [PATCH 5/5] archive-zip: stream large blobs into zip file Message-ID: <7vipghf2z0.fsf@alter.siamese.dyndns.org> In-Reply-To: <1335761837-12482-6-git-send-email-pclouds@gmail.com> Nguyễn Thái Ngọc Duy writes: > A large blob will be read twice. One for calculating crc32, one for > actual writing. Is that because you need the checksum before the payload? That is unfortunate. It would be nice (read: not a rejection of this patch---it is a good first step to do it stupid but correct way before trying to optimize it) to avoid it when the output is seekable, especially because we are talking about a *large* payload. > diff --git a/t/t1050-large.sh b/t/t1050-large.sh > index fe47554..458fdde 100755 > --- a/t/t1050-large.sh > +++ b/t/t1050-large.sh > @@ -138,4 +138,8 @@ test_expect_success 'tar achiving' ' > git archive --format=tar HEAD >/dev/null > ' > > +test_expect_success 'zip achiving' ' > + git archive --format=zip HEAD >/dev/null > +' Can't we do better than "we only check if it finishes without barfing; we cannot afford to check the correctness of the output"? The same comment applies to all the tests you added to this file in the past 3 months.