hmgit-1.0.0: The subset of awesome content tracker Git
Safe HaskellNone
LanguageHaskell2010

HMGit.Internal.Core

Synopsis

Documentation

data ObjectType Source #

The Git object type. Currently, it does not support tags.

Constructors

Blob

Blob object

Commit

Commit object

Tree

Tree object

data ObjectInfo Source #

Information for built objects

data IndexEntry Source #

Constructors

IndexEntry 

Fields

Instances

Instances details
Show IndexEntry Source # 
Instance details

Defined in HMGit.Internal.Parser.Index

fromContents :: MonadCatch m => ObjectType -> ByteString -> HMGitT m ObjectInfo Source #

Create object ID, path, zlib compressed data from object type and content

storeObject :: (MonadIO m, MonadCatch m) => ObjectType -> ByteString -> HMGitT m ByteString Source #

Create an object to HMGit database

loadObject :: (MonadIO m, MonadCatch m, MonadPlus m) => String -> HMGitT m (ObjectType, ByteString) Source #

Read an object from HMGit database by Object ID

loadTree :: MonadThrow m => ByteString -> HMGitT m [(CMode, Path Rel File, String)] Source #

Read a tree from raw data

storeTree :: (MonadIO m, MonadCatch m) => HMGitT m ByteString Source #

Create a tree object to HMGit database NOTE: Currently only supports a single, top-level directory

loadIndex :: (MonadIO m, MonadThrow m) => HMGitT m [IndexEntry] Source #

Read index entries

storeIndex :: (MonadIO m, Foldable t) => t IndexEntry -> HMGitT m () Source #

Write index entries

data HMGitStatus Source #

Data representing status

Instances

Instances details
Show HMGitStatus Source # 
Instance details

Defined in HMGit.Internal.Core

latestBlobHashes :: (MonadIO m, MonadCatch m) => HMGitT m (Map (Path Rel File) String) Source #

Calculates the latest, or current, hash of the working tree and returns a map of its path and hash value.

NOTE: Currently latestBlobHashes does not support gitignore and submodule, so we are embedding content to ignore directly in the code. Comments HACK below are the relevant part.

indexedBlobHashes :: (MonadIO m, MonadCatch m) => HMGitT m (Map (Path Rel File) String) Source #

Returns a map of blob file paths and hashes that are already part of the repository. This is a pair with latestBlobHashes.