[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [RFC] Plumbing-only support for storing object metadata
From:       "Scott Chacon" <schacon () gmail ! com>
Date:       2008-08-09 21:49:20
Message-ID: d411cc4a0808091449n7e0c9b7et7980cf668106aead () mail ! gmail ! com
[Download RAW message or body]

> We began trying to implement this proposal, but we found this enum
> definition in cache.h, which made us think there's only room for one
> more kind of object:
>
>        enum object_type {
>                OBJ_BAD = -1,
>                OBJ_NONE = 0,
>                OBJ_COMMIT = 1,
>                OBJ_TREE = 2,
>                OBJ_BLOB = 3,
>                OBJ_TAG = 4,
>                /* 5 for future expansion */
>                OBJ_OFS_DELTA = 6,
>                OBJ_REF_DELTA = 7,
>                OBJ_ANY,
>                OBJ_MAX,
>        };
>
> Do these object_type values appear in any on-disk structure, or does any
> other reason exist why this set of values cannot change? Can we add
> additional object types for inodes and props? If not, what would you
> recommend instead?

If I'm not mistaken, these are the values used to identify data in the
header sections of packfile objects.  The first four bits are used to
identify the object type, where the first bit is static and the next
three are the object type of the data following the header.  Since the
type is encoded using those three bits, 0-7 is the valid range.  I
would assume that would be difficult to change, since all the
packfiles depend on that range.

Scott
--
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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic