hit-0.6.1: Git operations in haskell

Portabilityunix
Stabilityexperimental
MaintainerVincent Hanquez <vincent@snarc.org>
Safe HaskellNone

Data.Git.Storage.Loose

Contents

Description

 

Synopsis

Documentation

newtype Zipped Source

Constructors

Zipped 

Instances

marshall from and to lazy bytestring

looseUnmarshall :: ByteString -> ObjectSource

unmarshall an object (with header) from a bytestring.

looseUnmarshallRaw :: ByteString -> (ObjectHeader, ObjectData)Source

unmarshall an object as (header, data) tuple from a bytestring

looseUnmarshallZipped :: Zipped -> ObjectSource

unmarshall an object (with header) from a zipped stream.

looseUnmarshallZippedRaw :: Zipped -> (ObjectHeader, ObjectData)Source

unmarshall an object as (header, data) tuple from a zipped stream

looseMarshall :: Object -> ByteStringSource

marshall as lazy bytestring an object except deltas.

read and check object existence

looseRead :: FilePath -> Ref -> IO ObjectSource

read a specific ref from a loose object and returns an object

looseReadHeader :: FilePath -> Ref -> IO (ObjectType, Word64, Maybe a)Source

read only the header of a loose object.

looseReadRaw :: FilePath -> Ref -> IO (ObjectHeader, ObjectData)Source

read a specific ref from a loose object and returns an header and data.

looseExists :: FilePath -> Ref -> IO BoolSource

check if a specific ref exists as loose object

write objects

looseWriteBlobFromFile :: FilePath -> FilePath -> IO RefSource

create a new blob on a temporary location and on success move it to the object store with its digest name.

looseWrite :: FilePath -> Object -> IO RefSource

write an object to disk as a loose reference. use looseWriteBlobFromFile for efficiently writing blobs when being commited from a file.

enumeration of loose objects

looseEnumeratePrefixes :: FilePath -> IO [[Char]]Source

enumarate all prefixes available in the object store.

looseEnumerateWithPrefixFilter :: FilePath -> String -> (Ref -> Bool) -> IO [Ref]Source

enumerate all references available with a specific prefix.