Brandon Williams <bmw...@google.com> writes:
> On 03/26, Jeff Hostetler wrote:
>> All of these cases could be eliminated if the type/size were available
>> in the OID.
>> Just a thought. While we are converting to a new hash it seems like
>> this would be a good time to at least discuss it.
> Echoing what Stefan said. I don't think its a good idea to embed this
> sort of data into the OID. There are a lot of reasons but one of them
> being that would block having access to this data behind completing the
> hash transition (which could very well still be years away from
> I think that a much better approach would be to create a meta-data data
> structure, much like the commit graph that stolee has been working on)
> which can store this data along side the objects (but not in the
> packfiles themselves). It could be a stacking structure which is
> periodically coalesced and we could add in a wire feature to fetch this
> meta data from the server upon fetching objects.
Well, the type of the object is available, from what I remember, in the
bitmap file for a packfile (if one does enable creaating them). There
are four compressed bit vectors, one for each type, with bit set to 1 on
i-th place if i-th object in packfile is of given type.