| Portability | unix |
|---|---|
| Stability | experimental |
| Maintainer | Vincent Hanquez <vincent@snarc.org> |
Data.Git.Object
Contents
Description
- data ObjectLocation
- data ObjectType
- = TypeTree
- | TypeBlob
- | TypeCommit
- | TypeTag
- | TypeDeltaOff
- | TypeDeltaRef
- type ObjectHeader = (ObjectType, Word64, Maybe ObjectPtr)
- type ObjectData = ByteString
- data ObjectPtr
- data Object = forall a . Objectable a => Object a
- data Tree = Tree {
- treeGetEnts :: [TreeEnt]
- data Commit = Commit {
- commitTreeish :: Ref
- commitParents :: [Ref]
- commitAuthor :: Name
- commitCommitter :: Name
- commitMessage :: ByteString
- data Blob = Blob {}
- data Tag = Tag {
- tagRef :: Ref
- tagObjectType :: ObjectType
- tagBlob :: ByteString
- tagName :: Name
- tagS :: ByteString
- data DeltaOfs = DeltaOfs Word64 Delta
- data DeltaRef = DeltaRef Ref Delta
- data ObjectInfo = ObjectInfo {
- oiHeader :: ObjectHeader
- oiData :: ObjectData
- oiChains :: [ObjectPtr]
- objectWrap :: Objectable a => a -> Object
- objectToType :: Object -> ObjectType
- objectTypeMarshall :: ObjectType -> String
- objectTypeUnmarshall :: String -> ObjectType
- objectTypeIsDelta :: ObjectType -> Bool
- objectIsDelta :: Object -> Bool
- objectToTree :: Object -> Maybe Tree
- objectToCommit :: Object -> Maybe Commit
- objectToTag :: Object -> Maybe Tag
- objectToBlob :: Object -> Maybe Blob
- treeParse :: Parser ByteString Tree
- commitParse :: Parser ByteString Commit
- tagParse :: Parser ByteString Tag
- blobParse :: Parser ByteString Blob
- objectParseTree :: Parser ByteString Object
- objectParseCommit :: Parser ByteString Object
- objectParseTag :: Parser ByteString Object
- objectParseBlob :: Parser ByteString Object
- objectWriteHeader :: ObjectType -> Word64 -> ByteString
- objectWrite :: Object -> ByteString
- objectHash :: ObjectType -> Word64 -> ByteString -> Ref
Documentation
data ObjectType Source
type of a git object.
Constructors
| TypeTree | |
| TypeBlob | |
| TypeCommit | |
| TypeTag | |
| TypeDeltaOff | |
| TypeDeltaRef |
Instances
| 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.
Constructors
| forall a . Objectable a => Object a |
Constructors
| Tree | |
Fields
| |
Constructors
| Commit | |
Fields
| |
Constructors
| Blob | |
Fields | |
Constructors
| Tag | |
Fields
| |
data ObjectInfo Source
Raw objects infos have an header (type, size, ptr), the data and a pointers chains to parents for resolved objects.
Constructors
| ObjectInfo | |
Fields
| |
Instances
objectWrap :: Objectable a => a -> ObjectSource
objectIsDelta :: Object -> BoolSource
objectToTree :: Object -> Maybe TreeSource
objectToTag :: Object -> Maybe TagSource
objectToBlob :: Object -> Maybe BlobSource
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