Portability | unix |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
- data ObjectLocation
- data ObjectType
- = TypeTree
- | TypeBlob
- | TypeCommit
- | TypeTag
- | TypeDeltaOff
- | TypeDeltaRef
- type ObjectHeader = (ObjectType, Word64, Maybe ObjectPtr)
- type ObjectData = ByteString
- data ObjectPtr
- data Object
- = Tree [TreeEnt]
- | Blob ByteString
- | Commit Ref [Ref] Name Name ByteString
- | Tag Ref ObjectType ByteString Name ByteString
- | DeltaOfs Word64 Delta
- | DeltaRef Ref Delta
- data ObjectInfo = ObjectInfo {
- oiHeader :: ObjectHeader
- oiData :: ObjectData
- oiChains :: [ObjectPtr]
- objectToType :: Object -> ObjectType
- objectTypeMarshall :: ObjectType -> String
- objectTypeUnmarshall :: String -> ObjectType
- objectTypeIsDelta :: ObjectType -> Bool
- objectParseTree :: Parser Object
- objectParseCommit :: Parser Object
- objectParseTag :: Parser Object
- objectParseBlob :: Parser Object
- objectWriteHeader :: ObjectType -> Word64 -> ByteString
- objectWrite :: Object -> ByteString
- objectHash :: ObjectType -> Word64 -> ByteString -> Ref
Documentation
data ObjectLocation Source
location of an object in the database
data ObjectType Source
type of a git object.
Enum ObjectType | the enum instance is useful when marshalling to pack file. |
Eq ObjectType | |
Show ObjectType |
type ObjectHeader = (ObjectType, Word64, Maybe ObjectPtr)Source
type ObjectData = ByteStringSource
Delta objects points to some others objects in the database either as offset in the pack or as a direct reference.
describe a git object, that could of 6 differents types: tree, blob, commit, tag and deltas (offset or ref). the deltas one are only available through packs.
Tree [TreeEnt] | |
Blob ByteString | |
Commit Ref [Ref] Name Name ByteString | |
Tag Ref ObjectType ByteString Name ByteString | |
DeltaOfs Word64 Delta | |
DeltaRef Ref Delta |
data ObjectInfo Source
Raw objects infos have an header (type, size, ptr), the data and a pointers chains to parents for resolved objects.
ObjectInfo | |
|
parsing function
writing function
objectWriteHeader :: ObjectType -> Word64 -> ByteStringSource
parse a tree content
parse a blob content
parse a commit content
parse a tag content
objectHash :: ObjectType -> Word64 -> ByteString -> RefSource