git-0.1: Git operations in haskell

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityunix
Safe HaskellNone
LanguageHaskell98

Data.Git.Storage.Loose

Contents

Description

 

Synopsis

Documentation

newtype Zipped Source

Constructors

Zipped 

marshall from and to lazy bytestring

looseUnmarshall :: ByteString -> Object Source

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 -> Object Source

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 -> ByteString Source

marshall as lazy bytestring an object except deltas.

read and check object existence

looseRead :: LocalPath -> Ref -> IO Object Source

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

looseReadHeader :: LocalPath -> Ref -> IO ObjectHeader Source

read only the header of a loose object.

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

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

looseExists :: LocalPath -> Ref -> IO Bool Source

check if a specific ref exists as loose object

write objects

looseWriteBlobFromFile :: LocalPath -> LocalPath -> IO Ref Source

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

looseWrite :: LocalPath -> Object -> IO Ref Source

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 :: LocalPath -> IO [[Char]] Source

enumarate all prefixes available in the object store.

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

enumerate all references available with a specific prefix.