Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ObjectType
- data ObjectInfo
- data IndexEntry = IndexEntry {}
- fromContents :: MonadCatch m => ObjectType -> ByteString -> HMGitT m ObjectInfo
- storeObject :: (MonadIO m, MonadCatch m) => ObjectType -> ByteString -> HMGitT m ByteString
- loadObject :: (MonadIO m, MonadCatch m, MonadPlus m) => String -> HMGitT m (ObjectType, ByteString)
- loadTree :: MonadThrow m => ByteString -> HMGitT m [(CMode, Path Rel File, String)]
- storeTree :: (MonadIO m, MonadCatch m) => HMGitT m ByteString
- loadIndex :: (MonadIO m, MonadThrow m) => HMGitT m [IndexEntry]
- storeIndex :: (MonadIO m, Foldable t) => t IndexEntry -> HMGitT m ()
- data HMGitStatus
- latestBlobHashes :: (MonadIO m, MonadCatch m) => HMGitT m (Map (Path Rel File) String)
- indexedBlobHashes :: (MonadIO m, MonadCatch m) => HMGitT m (Map (Path Rel File) String)
- getStatus :: (MonadIO m, MonadCatch m) => HMGitT m HMGitStatus
Documentation
data ObjectType Source #
The Git object type. Currently, it does not support tags.
Instances
Enum ObjectType Source # | |
Defined in HMGit.Internal.Parser.Object succ :: ObjectType -> ObjectType # pred :: ObjectType -> ObjectType # toEnum :: Int -> ObjectType # fromEnum :: ObjectType -> Int # enumFrom :: ObjectType -> [ObjectType] # enumFromThen :: ObjectType -> ObjectType -> [ObjectType] # enumFromTo :: ObjectType -> ObjectType -> [ObjectType] # enumFromThenTo :: ObjectType -> ObjectType -> ObjectType -> [ObjectType] # | |
Eq ObjectType Source # | |
Defined in HMGit.Internal.Parser.Object (==) :: ObjectType -> ObjectType -> Bool # (/=) :: ObjectType -> ObjectType -> Bool # | |
Read ObjectType Source # | |
Defined in HMGit.Internal.Parser.Object readsPrec :: Int -> ReadS ObjectType # readList :: ReadS [ObjectType] # readPrec :: ReadPrec ObjectType # readListPrec :: ReadPrec [ObjectType] # | |
Show ObjectType Source # | |
Defined in HMGit.Internal.Parser.Object showsPrec :: Int -> ObjectType -> ShowS # show :: ObjectType -> String # showList :: [ObjectType] -> ShowS # |
data ObjectInfo Source #
Information for built objects
data IndexEntry Source #
IndexEntry | |
|
Instances
Show IndexEntry Source # | |
Defined in HMGit.Internal.Parser.Index showsPrec :: Int -> IndexEntry -> ShowS # show :: IndexEntry -> String # showList :: [IndexEntry] -> ShowS # |
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
Show HMGitStatus Source # | |
Defined in HMGit.Internal.Core showsPrec :: Int -> HMGitStatus -> ShowS # show :: HMGitStatus -> String # showList :: [HMGitStatus] -> ShowS # |
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
.
getStatus :: (MonadIO m, MonadCatch m) => HMGitT m HMGitStatus Source #
Get status