Thread (9 messages) flat view 9 messages, 3 authors, 2016-06-15

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

From: Sergey Vlasov <hidden>
Date: 2016-06-15 22:42:08

On Wed, Oct 12, 2005 at 04:25:22PM +0200, Johannes Schindelin wrote:
On Wed, 12 Oct 2005, Sergey Vlasov wrote:
quoted
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?

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help