git-0.2.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 

Instances

marshall from and to lazy bytestring

looseUnmarshall :: HashAlgorithm hash => ByteString -> Object hash Source #

unmarshall an object (with header) from a bytestring.

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

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

looseUnmarshallZipped :: HashAlgorithm hash => Zipped -> Object hash Source #

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

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

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

looseMarshall :: Object hash -> ByteString Source #

marshall as lazy bytestring an object except deltas.

read and check object existence

looseRead :: HashAlgorithm hash => LocalPath -> Ref hash -> IO (Object hash) Source #

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

looseReadHeader :: HashAlgorithm hash => LocalPath -> Ref hash -> IO (ObjectHeader hash) Source #

read only the header of a loose object.

looseReadRaw :: HashAlgorithm hash => LocalPath -> Ref hash -> IO (ObjectHeader hash, ObjectData) Source #

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

looseExists :: HashAlgorithm hash => LocalPath -> Ref hash -> IO Bool Source #

check if a specific ref exists as loose object

write objects

looseWriteBlobFromFile :: HashAlgorithm hash => LocalPath -> LocalPath -> IO (Ref hash) Source #

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

looseWrite :: HashAlgorithm hash => LocalPath -> Object hash -> IO (Ref hash) 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 :: HashAlgorithm hash => LocalPath -> String -> (Ref hash -> Bool) -> IO [Ref hash] Source #

enumerate all references available with a specific prefix.

looseEnumerateWithPrefix :: HashAlgorithm hash => LocalPath -> String -> IO [Ref hash] Source #