Re: [PATCH] pack-objects: use streaming interface for reading large loose blobs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 29, 2012, 17:56 UTC
- Message-ID
- <7vd35m6fct.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1338028081-22638-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 14 quoted lines
> git usually streams large blobs directly to packs. But there are cases > where git can create large loose blobs (unpack-objects or hash-object > over pipe). Or they can come from other git implementations. > core.bigfilethreshold can also be lowered down and introduce a new > wave of large loose blobs. > > Use streaming interface to read/compress/write these blobs in one > go. Fall back to normal way if somehow streaming interface cannot be > used. > > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> > --- > On top of ng/pack-objects-cleanup. Changes since the last version is > we do not rely on close_istream(NULL); any more.
This version looks much cleaner, at least to me, as the logic in the function always switches upon "st", using it as "are we reading the data from the stream incrementally?" boolean.
Thanks, will queue.