Re: [PATCH] Add '--create-index' to git-unpack-objects

From: Sergey Vlasov <vsu@altlinux.ru>
Date: 2005-10-13 00:55:48
On Wed, Oct 12, 2005 at 04:25:22PM +0200, Johannes Schindelin wrote:
> On Wed, 12 Oct 2005, Sergey Vlasov wrote:
> > Saving unpacked objects in memory would obviously be unacceptable.
> 
> Actually, this is what git-unpack-objects does. All unresolved deltas are 
> stored in a linked list, and handled later.

Yes, this may be a problem if the pack is large and contains many
deltas.  But these stored deltas are thrown away immediately when the
base object is found; if you want to implement a streaming reindex,
you will need to store them until you reach the end of pack (or write
those objects to some temporary files).

> Of course, it would be nicer to use a seekable file if you have one. But 
> then, I am not at all sure that base objects should be allowed to come 
> later in the file: since the delta chains must not be cyclic, the objects
> can be sorted. Thus, it could be guaranteed that the base objects are 
> already unpacked when unpacking the derived object.

Hmm, pack-objects.c:write_one() does exactly the opposite - it writes
the base object _after_ writing out the delta (but it does not ensure
that ordering completely, so references to base objects can be
pointing in both directions).  Why?

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Received on Thu Oct 13 00:56:47 2005

This archive was generated by hypermail 2.1.8 : 2005-10-13 00:56:50 EST