hit-0.3.0: Git operations

MaintainerVincent Hanquez <vincent@snarc.org>
Safe HaskellSafe-Infered






marshall from and to lazy bytestring

looseUnmarshall :: ByteString -> ObjectSource

unmarshall an object (with header) from a lazy bytestring.

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

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

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.