There's still a few good reasons to unpack things, even though I
hate sitting through 5000 objects unpacking on a Windows system,
or a very slow NFS system (one NFS based system I work with unpacks
small <1KiB objects at a rate of about 1 every 15 seconds).
- We don't completely trust the remote peer. If the remote sends
us an object we already have we want to use the bytes we have
and not the bytes they are sending. That way even if the remote
were able to generate a hash collision and produce a replacement
byte sequence with the same hash, our known good byte sequence
is not affected.
- Packs sent over the network can be thin packs. A think pack
may not contain the object used as the delta base for a delta
within that pack. This is done to save network bandwidth when
both sides already have the delta base for an object that is
being transferred.
- Local packs cannot access delta base objects not in the same
pack. This limitation simplifies the pack access code in a
lot of the system. It also means that you can in a worst case
scenario obtain everything in that pack back when all you have
is the pack file itself.
I'm sure there's more reasons than that, but those are the major
ones.
--
Shawn.
-
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