Safe Haskell | None |
---|
- data RepositoryFacts = RepositoryFacts {}
- type MonadGit m = (Failure GitException m, Applicative m, MonadIO m, MonadBaseControl IO m)
- class (Applicative m, Monad m, Failure GitException m, IsOid (Oid m)) => Repository m where
- type Oid m :: *
- data Tree m :: *
- data Options m :: *
- facts :: m RepositoryFacts
- parseOid :: Text -> m (Oid m)
- deleteRepository :: m ()
- createReference :: Text -> RefTarget m -> m ()
- lookupReference :: Text -> m (Maybe (RefTarget m))
- updateReference :: Text -> RefTarget m -> m ()
- deleteReference :: Text -> m ()
- listReferences :: m [Text]
- lookupCommit :: CommitOid m -> m (Commit m)
- lookupTree :: TreeOid m -> m (Tree m)
- lookupBlob :: BlobOid m -> m (Blob m)
- lookupTag :: TagOid m -> m (Tag m)
- lookupObject :: Oid m -> m (Object m)
- existsObject :: Oid m -> m Bool
- sourceObjects :: Maybe (CommitOid m) -> CommitOid m -> Bool -> Source m (ObjectOid m)
- newTreeBuilder :: Maybe (Tree m) -> m (TreeBuilder m)
- treeOid :: Tree m -> TreeOid m
- treeEntry :: Tree m -> Text -> m (Maybe (TreeEntry m))
- listTreeEntries :: Tree m -> m [(Text, TreeEntry m)]
- hashContents :: BlobContents m -> m (BlobOid m)
- createBlob :: BlobContents m -> m (BlobOid m)
- createCommit :: [CommitOid m] -> TreeOid m -> Signature -> Signature -> Text -> Maybe Text -> m (Commit m)
- createTag :: CommitOid m -> Signature -> Text -> Text -> m (Tag m)
- data RepositoryOptions = RepositoryOptions {
- repoPath :: !FilePath
- repoIsBare :: !Bool
- repoAutoCreate :: !Bool
- data RepositoryFactory t m c = RepositoryFactory {
- openRepository :: RepositoryOptions -> m c
- runRepository :: forall a. c -> t m a -> m a
- closeRepository :: c -> m ()
- getRepository :: t m c
- defaultOptions :: !RepositoryOptions
- startupBackend :: m ()
- shutdownBackend :: m ()
- class (Eq o, Ord o, Show o) => IsOid o where
- renderOid :: o -> Text
- renderObjOid :: Tagged a o -> Text
- type BlobOid m = Tagged (Blob m) (Oid m)
- type TreeOid m = Tagged (Tree m) (Oid m)
- type CommitOid m = Tagged (Commit m) (Oid m)
- type TagOid m = Tagged (Tag m) (Oid m)
- data ObjectOid m
- = BlobObjOid !(BlobOid m)
- | TreeObjOid !(TreeOid m)
- | CommitObjOid !(CommitOid m)
- | TagObjOid !(TagOid m)
- parseObjOid :: Repository m => forall o. Text -> m (Tagged o (Oid m))
- copyOid :: (Repository m, Repository n) => Oid m -> n (Oid n)
- newtype SHA = SHA ByteString
- shaToText :: SHA -> Text
- textToSha :: Monad m => Text -> m SHA
- data Blob m = Blob {
- blobOid :: !(BlobOid m)
- blobContents :: !(BlobContents m)
- type ByteSource m = Producer m ByteString
- data BlobContents m
- = BlobString !ByteString
- | BlobStream !(ByteSource m)
- | BlobSizedStream !(ByteSource m) !Int
- data BlobKind
- data TreeEntry m
- = BlobEntry {
- blobEntryOid :: !(BlobOid m)
- blobEntryKind :: !BlobKind
- | TreeEntry {
- treeEntryOid :: !(TreeOid m)
- | CommitEntry {
- commitEntryOid :: !(CommitOid m)
- = BlobEntry {
- treeEntryToOid :: Repository m => TreeEntry m -> Oid m
- data TreeBuilder m = TreeBuilder {
- mtbBaseTreeOid :: Maybe (TreeOid m)
- mtbPendingUpdates :: HashMap Text (TreeBuilder m)
- mtbNewBuilder :: Maybe (Tree m) -> m (TreeBuilder m)
- mtbWriteContents :: TreeBuilder m -> m (ModifiedBuilder m, TreeOid m)
- mtbLookupEntry :: Text -> m (Maybe (TreeEntry m))
- mtbEntryCount :: m Int
- mtbPutEntry :: TreeBuilder m -> Text -> TreeEntry m -> m (ModifiedBuilder m)
- mtbDropEntry :: TreeBuilder m -> Text -> m (ModifiedBuilder m)
- data ModifiedBuilder m
- = ModifiedBuilder (TreeBuilder m)
- | BuilderUnchanged (TreeBuilder m)
- fromBuilderMod :: ModifiedBuilder m -> TreeBuilder m
- data Commit m = Commit {
- commitOid :: !(CommitOid m)
- commitParents :: ![CommitOid m]
- commitTree :: !(TreeOid m)
- commitAuthor :: !Signature
- commitCommitter :: !Signature
- commitLog :: !Text
- commitEncoding :: !Text
- lookupCommitParents :: Repository m => Commit m -> m [Commit m]
- data Signature = Signature {
- signatureName :: !Text
- signatureEmail :: !Text
- signatureWhen :: !ZonedTime
- data Tag m = Tag {}
- data Object m
- objectOid :: Repository m => Object m -> Oid m
- loadObject :: Repository m => ObjectOid m -> m (Object m)
- objectToObjOid :: Repository m => Object m -> ObjectOid m
- untagObjOid :: Repository m => ObjectOid m -> Oid m
- data RefTarget m
- = RefObj !(CommitOid m)
- | RefSymbolic !Text
- commitRefTarget :: Commit m -> RefTarget m
- data ModificationKind
- = Unchanged
- | Modified
- | Added
- | Deleted
- | TypeChanged
- data MergeStatus
- mergeStatus :: ModificationKind -> ModificationKind -> MergeStatus
- data MergeResult m
- = MergeSuccess {
- mergeCommit :: CommitOid m
- | MergeConflicted { }
- = MergeSuccess {
- copyMergeResult :: (Repository m, MonadGit m, Repository n, MonadGit n) => MergeResult m -> n (MergeResult n)
- data GitException
- = BackendError Text
- | GitError Text
- | RepositoryNotExist
- | RepositoryInvalid
- | RepositoryCannotAccess Text
- | BlobCreateFailed
- | BlobEmptyCreateFailed
- | BlobEncodingUnknown Text
- | BlobLookupFailed
- | PushNotFastForward Text
- | TranslationException Text
- | TreeCreateFailed Text
- | TreeBuilderCreateFailed
- | TreeBuilderInsertFailed Text
- | TreeBuilderRemoveFailed Text
- | TreeBuilderWriteFailed Text
- | TreeLookupFailed
- | TreeCannotTraverseBlob
- | TreeCannotTraverseCommit
- | TreeEntryLookupFailed Text
- | TreeUpdateFailed
- | TreeWalkFailed
- | TreeEmptyCreateFailed
- | CommitCreateFailed
- | CommitLookupFailed Text
- | ReferenceCreateFailed
- | ReferenceDeleteFailed Text
- | RefCannotCreateFromPartialOid
- | ReferenceListingFailed
- | ReferenceLookupFailed Text
- | ObjectLookupFailed Text Int
- | ObjectRefRequiresFullOid
- | OidCopyFailed
- | OidParseFailed Text
- | QuotaHardLimitExceeded Int Int
Documentation
type MonadGit m = (Failure GitException m, Applicative m, MonadIO m, MonadBaseControl IO m)Source
class (Applicative m, Monad m, Failure GitException m, IsOid (Oid m)) => Repository m whereSource
Repository
is the central point of contact between user code and Git
data objects. Every object must belong to some repository.
facts :: m RepositoryFactsSource
parseOid :: Text -> m (Oid m)Source
deleteRepository :: m ()Source
createReference :: Text -> RefTarget m -> m ()Source
lookupReference :: Text -> m (Maybe (RefTarget m))Source
updateReference :: Text -> RefTarget m -> m ()Source
deleteReference :: Text -> m ()Source
listReferences :: m [Text]Source
lookupCommit :: CommitOid m -> m (Commit m)Source
lookupTree :: TreeOid m -> m (Tree m)Source
lookupBlob :: BlobOid m -> m (Blob m)Source
lookupTag :: TagOid m -> m (Tag m)Source
lookupObject :: Oid m -> m (Object m)Source
existsObject :: Oid m -> m BoolSource
:: Maybe (CommitOid m) | A commit we may already have |
-> CommitOid m | The commit we need |
-> Bool | Include commit trees also? |
-> Source m (ObjectOid m) | All the objects in between |
newTreeBuilder :: Maybe (Tree m) -> m (TreeBuilder m)Source
treeOid :: Tree m -> TreeOid mSource
treeEntry :: Tree m -> Text -> m (Maybe (TreeEntry m))Source
listTreeEntries :: Tree m -> m [(Text, TreeEntry m)]Source
hashContents :: BlobContents m -> m (BlobOid m)Source
createBlob :: BlobContents m -> m (BlobOid m)Source
createCommit :: [CommitOid m] -> TreeOid m -> Signature -> Signature -> Text -> Maybe Text -> m (Commit m)Source
createTag :: CommitOid m -> Signature -> Text -> Text -> m (Tag m)Source
data RepositoryOptions Source
RepositoryOptions | |
|
data RepositoryFactory t m c Source
RepositoryFactory | |
|
BlobObjOid !(BlobOid m) | |
TreeObjOid !(TreeOid m) | |
CommitObjOid !(CommitOid m) | |
TagObjOid !(TagOid m) |
parseObjOid :: Repository m => forall o. Text -> m (Tagged o (Oid m))Source
copyOid :: (Repository m, Repository n) => Oid m -> n (Oid n)Source
Blob | |
|
type ByteSource m = Producer m ByteStringSource
data BlobContents m Source
BlobString !ByteString | |
BlobStream !(ByteSource m) | |
BlobSizedStream !(ByteSource m) !Int |
Eq (BlobContents m) |
BlobEntry | |
| |
TreeEntry | |
| |
CommitEntry | |
|
Repository m => Show (TreeEntry m) |
treeEntryToOid :: Repository m => TreeEntry m -> Oid mSource
data TreeBuilder m Source
TreeBuilder | |
|
data ModifiedBuilder m Source
fromBuilderMod :: ModifiedBuilder m -> TreeBuilder mSource
Commit | |
|
lookupCommitParents :: Repository m => Commit m -> m [Commit m]Source
Signature | |
|
objectOid :: Repository m => Object m -> Oid mSource
loadObject :: Repository m => ObjectOid m -> m (Object m)Source
objectToObjOid :: Repository m => Object m -> ObjectOid mSource
untagObjOid :: Repository m => ObjectOid m -> Oid mSource
commitRefTarget :: Commit m -> RefTarget mSource
data ModificationKind Source
data MergeStatus Source
data MergeResult m Source
Repository m => Show (MergeResult m) |
copyMergeResult :: (Repository m, MonadGit m, Repository n, MonadGit n) => MergeResult m -> n (MergeResult n)Source
data GitException Source
There is a separate GitException
for each possible failure when
interacting with the Git repository.