Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> writes: > unpack_raw_entry() will not allocate and return decompressed blobs if > they are larger than core.bigFileThreshold. > > The blob content is needed by sha1_object() in some cases. When we do > need the blob content, we put it back in core with > get_data_from_pack(). However we rarely need that in pratice. > > The first case is when we find an in-repo blob with the same SHA-1. We > need to do collision test, byte-on-byte. Normally (e.g. in > fetch/pull/clone) this does not happen because git avoid to send > objects that client already has. Perhaps the codepath that performs the byte-for-byte comparison can be taught to stream from the received pack data and whatever was already in the repository, using the streaming interface? That way you do not have to hold all of the both objects at the same time in core, no? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html