{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Ggit.Objects.Repository
(
Repository(..) ,
IsRepository ,
toRepository ,
#if defined(ENABLE_OVERLOADING)
ResolveRepositoryMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
RepositoryAddRemoteFetchMethodInfo ,
#endif
repositoryAddRemoteFetch ,
#if defined(ENABLE_OVERLOADING)
RepositoryAddRemotePushMethodInfo ,
#endif
repositoryAddRemotePush ,
#if defined(ENABLE_OVERLOADING)
RepositoryBlameFileMethodInfo ,
#endif
repositoryBlameFile ,
#if defined(ENABLE_OVERLOADING)
RepositoryCheckoutHeadMethodInfo ,
#endif
repositoryCheckoutHead ,
#if defined(ENABLE_OVERLOADING)
RepositoryCheckoutIndexMethodInfo ,
#endif
repositoryCheckoutIndex ,
#if defined(ENABLE_OVERLOADING)
RepositoryCheckoutTreeMethodInfo ,
#endif
repositoryCheckoutTree ,
#if defined(ENABLE_OVERLOADING)
RepositoryCherryPickMethodInfo ,
#endif
repositoryCherryPick ,
#if defined(ENABLE_OVERLOADING)
RepositoryCherryPickCommitMethodInfo ,
#endif
repositoryCherryPickCommit ,
repositoryClone ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateBlobMethodInfo ,
#endif
repositoryCreateBlob ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateBlobFromBufferMethodInfo,
#endif
repositoryCreateBlobFromBuffer ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateBlobFromFileMethodInfo ,
#endif
repositoryCreateBlobFromFile ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateBlobFromPathMethodInfo ,
#endif
repositoryCreateBlobFromPath ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateBranchMethodInfo ,
#endif
repositoryCreateBranch ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateCommitMethodInfo ,
#endif
repositoryCreateCommit ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateCommitFromIdsMethodInfo ,
#endif
repositoryCreateCommitFromIds ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateIndexEntryForFileMethodInfo,
#endif
repositoryCreateIndexEntryForFile ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateIndexEntryForPathMethodInfo,
#endif
repositoryCreateIndexEntryForPath ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateNoteMethodInfo ,
#endif
repositoryCreateNote ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateReferenceMethodInfo ,
#endif
repositoryCreateReference ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateRemoteMethodInfo ,
#endif
repositoryCreateRemote ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateSymbolicReferenceMethodInfo,
#endif
repositoryCreateSymbolicReference ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateTagMethodInfo ,
#endif
repositoryCreateTag ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateTagAnnotationMethodInfo ,
#endif
repositoryCreateTagAnnotation ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateTagFromBufferMethodInfo ,
#endif
repositoryCreateTagFromBuffer ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateTagLightweightMethodInfo,
#endif
repositoryCreateTagLightweight ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateTreeBuilderMethodInfo ,
#endif
repositoryCreateTreeBuilder ,
#if defined(ENABLE_OVERLOADING)
RepositoryCreateTreeBuilderFromTreeMethodInfo,
#endif
repositoryCreateTreeBuilderFromTree ,
#if defined(ENABLE_OVERLOADING)
RepositoryDeleteTagMethodInfo ,
#endif
repositoryDeleteTag ,
repositoryDiscover ,
repositoryDiscoverFull ,
#if defined(ENABLE_OVERLOADING)
RepositoryDropStashMethodInfo ,
#endif
repositoryDropStash ,
#if defined(ENABLE_OVERLOADING)
RepositoryEnumerateBranchesMethodInfo ,
#endif
repositoryEnumerateBranches ,
#if defined(ENABLE_OVERLOADING)
RepositoryFileStatusMethodInfo ,
#endif
repositoryFileStatus ,
#if defined(ENABLE_OVERLOADING)
RepositoryFileStatusForeachMethodInfo ,
#endif
repositoryFileStatusForeach ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetAheadBehindMethodInfo ,
#endif
repositoryGetAheadBehind ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetAttributeMethodInfo ,
#endif
repositoryGetAttribute ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetConfigMethodInfo ,
#endif
repositoryGetConfig ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetDefaultNotesRefMethodInfo ,
#endif
repositoryGetDefaultNotesRef ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetDescendantOfMethodInfo ,
#endif
repositoryGetDescendantOf ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetHeadMethodInfo ,
#endif
repositoryGetHead ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetIndexMethodInfo ,
#endif
repositoryGetIndex ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetLocationMethodInfo ,
#endif
repositoryGetLocation ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetSubmoduleStatusMethodInfo ,
#endif
repositoryGetSubmoduleStatus ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetWorkdirMethodInfo ,
#endif
repositoryGetWorkdir ,
repositoryInitRepository ,
#if defined(ENABLE_OVERLOADING)
RepositoryIsBareMethodInfo ,
#endif
repositoryIsBare ,
#if defined(ENABLE_OVERLOADING)
RepositoryIsEmptyMethodInfo ,
#endif
repositoryIsEmpty ,
#if defined(ENABLE_OVERLOADING)
RepositoryIsHeadDetachedMethodInfo ,
#endif
repositoryIsHeadDetached ,
#if defined(ENABLE_OVERLOADING)
RepositoryIsHeadUnbornMethodInfo ,
#endif
repositoryIsHeadUnborn ,
#if defined(ENABLE_OVERLOADING)
RepositoryListRemotesMethodInfo ,
#endif
repositoryListRemotes ,
#if defined(ENABLE_OVERLOADING)
RepositoryListTagsMethodInfo ,
#endif
repositoryListTags ,
#if defined(ENABLE_OVERLOADING)
RepositoryListTagsMatchMethodInfo ,
#endif
repositoryListTagsMatch ,
#if defined(ENABLE_OVERLOADING)
RepositoryLookupMethodInfo ,
#endif
repositoryLookup ,
#if defined(ENABLE_OVERLOADING)
RepositoryLookupBlobMethodInfo ,
#endif
repositoryLookupBlob ,
#if defined(ENABLE_OVERLOADING)
RepositoryLookupBranchMethodInfo ,
#endif
repositoryLookupBranch ,
#if defined(ENABLE_OVERLOADING)
RepositoryLookupCommitMethodInfo ,
#endif
repositoryLookupCommit ,
#if defined(ENABLE_OVERLOADING)
RepositoryLookupReferenceMethodInfo ,
#endif
repositoryLookupReference ,
#if defined(ENABLE_OVERLOADING)
RepositoryLookupReferenceDwimMethodInfo ,
#endif
repositoryLookupReferenceDwim ,
#if defined(ENABLE_OVERLOADING)
RepositoryLookupRemoteMethodInfo ,
#endif
repositoryLookupRemote ,
#if defined(ENABLE_OVERLOADING)
RepositoryLookupSubmoduleMethodInfo ,
#endif
repositoryLookupSubmodule ,
#if defined(ENABLE_OVERLOADING)
RepositoryLookupTagMethodInfo ,
#endif
repositoryLookupTag ,
#if defined(ENABLE_OVERLOADING)
RepositoryLookupTreeMethodInfo ,
#endif
repositoryLookupTree ,
#if defined(ENABLE_OVERLOADING)
RepositoryMergeMethodInfo ,
#endif
repositoryMerge ,
#if defined(ENABLE_OVERLOADING)
RepositoryMergeBaseMethodInfo ,
#endif
repositoryMergeBase ,
#if defined(ENABLE_OVERLOADING)
RepositoryMergeCommitsMethodInfo ,
#endif
repositoryMergeCommits ,
#if defined(ENABLE_OVERLOADING)
RepositoryMergeTreesMethodInfo ,
#endif
repositoryMergeTrees ,
#if defined(ENABLE_OVERLOADING)
RepositoryNoteForeachMethodInfo ,
#endif
repositoryNoteForeach ,
repositoryOpen ,
#if defined(ENABLE_OVERLOADING)
RepositoryPathIsIgnoredMethodInfo ,
#endif
repositoryPathIsIgnored ,
#if defined(ENABLE_OVERLOADING)
RepositoryReadNoteMethodInfo ,
#endif
repositoryReadNote ,
#if defined(ENABLE_OVERLOADING)
RepositoryRebaseInitMethodInfo ,
#endif
repositoryRebaseInit ,
#if defined(ENABLE_OVERLOADING)
RepositoryRebaseOpenMethodInfo ,
#endif
repositoryRebaseOpen ,
#if defined(ENABLE_OVERLOADING)
RepositoryReferencesForeachMethodInfo ,
#endif
repositoryReferencesForeach ,
#if defined(ENABLE_OVERLOADING)
RepositoryReferencesForeachNameMethodInfo,
#endif
repositoryReferencesForeachName ,
#if defined(ENABLE_OVERLOADING)
RepositoryRemoveNoteMethodInfo ,
#endif
repositoryRemoveNote ,
#if defined(ENABLE_OVERLOADING)
RepositoryRemoveRemoteMethodInfo ,
#endif
repositoryRemoveRemote ,
#if defined(ENABLE_OVERLOADING)
RepositoryRenameRemoteMethodInfo ,
#endif
repositoryRenameRemote ,
#if defined(ENABLE_OVERLOADING)
RepositoryResetMethodInfo ,
#endif
repositoryReset ,
#if defined(ENABLE_OVERLOADING)
RepositoryResetDefaultMethodInfo ,
#endif
repositoryResetDefault ,
#if defined(ENABLE_OVERLOADING)
RepositoryRevertMethodInfo ,
#endif
repositoryRevert ,
#if defined(ENABLE_OVERLOADING)
RepositoryRevparseMethodInfo ,
#endif
repositoryRevparse ,
#if defined(ENABLE_OVERLOADING)
RepositorySaveStashMethodInfo ,
#endif
repositorySaveStash ,
#if defined(ENABLE_OVERLOADING)
RepositorySetHeadMethodInfo ,
#endif
repositorySetHead ,
#if defined(ENABLE_OVERLOADING)
RepositorySetRemoteUrlMethodInfo ,
#endif
repositorySetRemoteUrl ,
#if defined(ENABLE_OVERLOADING)
RepositorySetSubmoduleFetchRecurseMethodInfo,
#endif
repositorySetSubmoduleFetchRecurse ,
#if defined(ENABLE_OVERLOADING)
RepositorySetSubmoduleIgnoreMethodInfo ,
#endif
repositorySetSubmoduleIgnore ,
#if defined(ENABLE_OVERLOADING)
RepositorySetSubmoduleUpdateMethodInfo ,
#endif
repositorySetSubmoduleUpdate ,
#if defined(ENABLE_OVERLOADING)
RepositorySetSubmoduleUrlMethodInfo ,
#endif
repositorySetSubmoduleUrl ,
#if defined(ENABLE_OVERLOADING)
RepositorySetWorkdirMethodInfo ,
#endif
repositorySetWorkdir ,
#if defined(ENABLE_OVERLOADING)
RepositoryStashForeachMethodInfo ,
#endif
repositoryStashForeach ,
#if defined(ENABLE_OVERLOADING)
RepositorySubmoduleForeachMethodInfo ,
#endif
repositorySubmoduleForeach ,
#if defined(ENABLE_OVERLOADING)
RepositoryTagForeachMethodInfo ,
#endif
repositoryTagForeach ,
#if defined(ENABLE_OVERLOADING)
RepositoryCloneOptionsPropertyInfo ,
#endif
constructRepositoryCloneOptions ,
getRepositoryCloneOptions ,
#if defined(ENABLE_OVERLOADING)
repositoryCloneOptions ,
#endif
#if defined(ENABLE_OVERLOADING)
RepositoryHeadPropertyInfo ,
#endif
getRepositoryHead ,
#if defined(ENABLE_OVERLOADING)
repositoryHead ,
#endif
#if defined(ENABLE_OVERLOADING)
RepositoryInitPropertyInfo ,
#endif
constructRepositoryInit ,
getRepositoryInit ,
#if defined(ENABLE_OVERLOADING)
repositoryInit ,
#endif
#if defined(ENABLE_OVERLOADING)
RepositoryIsBarePropertyInfo ,
#endif
constructRepositoryIsBare ,
getRepositoryIsBare ,
#if defined(ENABLE_OVERLOADING)
RepositoryLocationPropertyInfo ,
#endif
constructRepositoryLocation ,
getRepositoryLocation ,
#if defined(ENABLE_OVERLOADING)
repositoryLocation ,
#endif
#if defined(ENABLE_OVERLOADING)
RepositoryUrlPropertyInfo ,
#endif
constructRepositoryUrl ,
getRepositoryUrl ,
#if defined(ENABLE_OVERLOADING)
repositoryUrl ,
#endif
#if defined(ENABLE_OVERLOADING)
RepositoryWorkdirPropertyInfo ,
#endif
clearRepositoryWorkdir ,
constructRepositoryWorkdir ,
getRepositoryWorkdir ,
#if defined(ENABLE_OVERLOADING)
repositoryWorkdir ,
#endif
setRepositoryWorkdir ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Ggit.Callbacks as Ggit.Callbacks
import {-# SOURCE #-} qualified GI.Ggit.Enums as Ggit.Enums
import {-# SOURCE #-} qualified GI.Ggit.Flags as Ggit.Flags
import {-# SOURCE #-} qualified GI.Ggit.Objects.Blame as Ggit.Blame
import {-# SOURCE #-} qualified GI.Ggit.Objects.Blob as Ggit.Blob
import {-# SOURCE #-} qualified GI.Ggit.Objects.BlobOutputStream as Ggit.BlobOutputStream
import {-# SOURCE #-} qualified GI.Ggit.Objects.Branch as Ggit.Branch
import {-# SOURCE #-} qualified GI.Ggit.Objects.CheckoutOptions as Ggit.CheckoutOptions
import {-# SOURCE #-} qualified GI.Ggit.Objects.CherryPickOptions as Ggit.CherryPickOptions
import {-# SOURCE #-} qualified GI.Ggit.Objects.CloneOptions as Ggit.CloneOptions
import {-# SOURCE #-} qualified GI.Ggit.Objects.Commit as Ggit.Commit
import {-# SOURCE #-} qualified GI.Ggit.Objects.Config as Ggit.Config
import {-# SOURCE #-} qualified GI.Ggit.Objects.Index as Ggit.Index
import {-# SOURCE #-} qualified GI.Ggit.Objects.Native as Ggit.Native
import {-# SOURCE #-} qualified GI.Ggit.Objects.Object as Ggit.Object
import {-# SOURCE #-} qualified GI.Ggit.Objects.ObjectFactoryBase as Ggit.ObjectFactoryBase
import {-# SOURCE #-} qualified GI.Ggit.Objects.Rebase as Ggit.Rebase
import {-# SOURCE #-} qualified GI.Ggit.Objects.Ref as Ggit.Ref
import {-# SOURCE #-} qualified GI.Ggit.Objects.Remote as Ggit.Remote
import {-# SOURCE #-} qualified GI.Ggit.Objects.Signature as Ggit.Signature
import {-# SOURCE #-} qualified GI.Ggit.Objects.Tag as Ggit.Tag
import {-# SOURCE #-} qualified GI.Ggit.Objects.Tree as Ggit.Tree
import {-# SOURCE #-} qualified GI.Ggit.Objects.TreeBuilder as Ggit.TreeBuilder
import {-# SOURCE #-} qualified GI.Ggit.Structs.AnnotatedCommit as Ggit.AnnotatedCommit
import {-# SOURCE #-} qualified GI.Ggit.Structs.BlameOptions as Ggit.BlameOptions
import {-# SOURCE #-} qualified GI.Ggit.Structs.BranchEnumerator as Ggit.BranchEnumerator
import {-# SOURCE #-} qualified GI.Ggit.Structs.IndexEntry as Ggit.IndexEntry
import {-# SOURCE #-} qualified GI.Ggit.Structs.MergeOptions as Ggit.MergeOptions
import {-# SOURCE #-} qualified GI.Ggit.Structs.Note as Ggit.Note
import {-# SOURCE #-} qualified GI.Ggit.Structs.OId as Ggit.OId
import {-# SOURCE #-} qualified GI.Ggit.Structs.RebaseOptions as Ggit.RebaseOptions
import {-# SOURCE #-} qualified GI.Ggit.Structs.RevertOptions as Ggit.RevertOptions
import {-# SOURCE #-} qualified GI.Ggit.Structs.StatusOptions as Ggit.StatusOptions
import {-# SOURCE #-} qualified GI.Ggit.Structs.Submodule as Ggit.Submodule
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Interfaces.Initable as Gio.Initable
newtype Repository = Repository (SP.ManagedPtr Repository)
deriving (Repository -> Repository -> Bool
(Repository -> Repository -> Bool)
-> (Repository -> Repository -> Bool) -> Eq Repository
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Repository -> Repository -> Bool
$c/= :: Repository -> Repository -> Bool
== :: Repository -> Repository -> Bool
$c== :: Repository -> Repository -> Bool
Eq)
instance SP.ManagedPtrNewtype Repository where
toManagedPtr :: Repository -> ManagedPtr Repository
toManagedPtr (Repository ManagedPtr Repository
p) = ManagedPtr Repository
p
foreign import ccall "ggit_repository_get_type"
c_ggit_repository_get_type :: IO B.Types.GType
instance B.Types.TypedObject Repository where
glibType :: IO GType
glibType = IO GType
c_ggit_repository_get_type
instance B.Types.GObject Repository
instance B.GValue.IsGValue Repository where
toGValue :: Repository -> IO GValue
toGValue Repository
o = do
GType
gtype <- IO GType
c_ggit_repository_get_type
Repository -> (Ptr Repository -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Repository
o (GType
-> (GValue -> Ptr Repository -> IO ())
-> Ptr Repository
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Repository -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Repository
fromGValue GValue
gv = do
Ptr Repository
ptr <- GValue -> IO (Ptr Repository)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Repository)
(ManagedPtr Repository -> Repository)
-> Ptr Repository -> IO Repository
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Repository -> Repository
Repository Ptr Repository
ptr
class (SP.GObject o, O.IsDescendantOf Repository o) => IsRepository o
instance (SP.GObject o, O.IsDescendantOf Repository o) => IsRepository o
instance O.HasParentTypes Repository
type instance O.ParentTypes Repository = '[Ggit.Native.Native, Ggit.ObjectFactoryBase.ObjectFactoryBase, GObject.Object.Object, Gio.Initable.Initable]
toRepository :: (MonadIO m, IsRepository o) => o -> m Repository
toRepository :: o -> m Repository
toRepository = IO Repository -> m Repository
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Repository -> m Repository)
-> (o -> IO Repository) -> o -> m Repository
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Repository -> Repository) -> o -> IO Repository
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Repository -> Repository
Repository
#if defined(ENABLE_OVERLOADING)
type family ResolveRepositoryMethod (t :: Symbol) (o :: *) :: * where
ResolveRepositoryMethod "addRemoteFetch" o = RepositoryAddRemoteFetchMethodInfo
ResolveRepositoryMethod "addRemotePush" o = RepositoryAddRemotePushMethodInfo
ResolveRepositoryMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveRepositoryMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveRepositoryMethod "blameFile" o = RepositoryBlameFileMethodInfo
ResolveRepositoryMethod "checkoutHead" o = RepositoryCheckoutHeadMethodInfo
ResolveRepositoryMethod "checkoutIndex" o = RepositoryCheckoutIndexMethodInfo
ResolveRepositoryMethod "checkoutTree" o = RepositoryCheckoutTreeMethodInfo
ResolveRepositoryMethod "cherryPick" o = RepositoryCherryPickMethodInfo
ResolveRepositoryMethod "cherryPickCommit" o = RepositoryCherryPickCommitMethodInfo
ResolveRepositoryMethod "createBlob" o = RepositoryCreateBlobMethodInfo
ResolveRepositoryMethod "createBlobFromBuffer" o = RepositoryCreateBlobFromBufferMethodInfo
ResolveRepositoryMethod "createBlobFromFile" o = RepositoryCreateBlobFromFileMethodInfo
ResolveRepositoryMethod "createBlobFromPath" o = RepositoryCreateBlobFromPathMethodInfo
ResolveRepositoryMethod "createBranch" o = RepositoryCreateBranchMethodInfo
ResolveRepositoryMethod "createCommit" o = RepositoryCreateCommitMethodInfo
ResolveRepositoryMethod "createCommitFromIds" o = RepositoryCreateCommitFromIdsMethodInfo
ResolveRepositoryMethod "createIndexEntryForFile" o = RepositoryCreateIndexEntryForFileMethodInfo
ResolveRepositoryMethod "createIndexEntryForPath" o = RepositoryCreateIndexEntryForPathMethodInfo
ResolveRepositoryMethod "createNote" o = RepositoryCreateNoteMethodInfo
ResolveRepositoryMethod "createReference" o = RepositoryCreateReferenceMethodInfo
ResolveRepositoryMethod "createRemote" o = RepositoryCreateRemoteMethodInfo
ResolveRepositoryMethod "createSymbolicReference" o = RepositoryCreateSymbolicReferenceMethodInfo
ResolveRepositoryMethod "createTag" o = RepositoryCreateTagMethodInfo
ResolveRepositoryMethod "createTagAnnotation" o = RepositoryCreateTagAnnotationMethodInfo
ResolveRepositoryMethod "createTagFromBuffer" o = RepositoryCreateTagFromBufferMethodInfo
ResolveRepositoryMethod "createTagLightweight" o = RepositoryCreateTagLightweightMethodInfo
ResolveRepositoryMethod "createTreeBuilder" o = RepositoryCreateTreeBuilderMethodInfo
ResolveRepositoryMethod "createTreeBuilderFromTree" o = RepositoryCreateTreeBuilderFromTreeMethodInfo
ResolveRepositoryMethod "deleteTag" o = RepositoryDeleteTagMethodInfo
ResolveRepositoryMethod "dropStash" o = RepositoryDropStashMethodInfo
ResolveRepositoryMethod "enumerateBranches" o = RepositoryEnumerateBranchesMethodInfo
ResolveRepositoryMethod "fileStatus" o = RepositoryFileStatusMethodInfo
ResolveRepositoryMethod "fileStatusForeach" o = RepositoryFileStatusForeachMethodInfo
ResolveRepositoryMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveRepositoryMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveRepositoryMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveRepositoryMethod "init" o = Gio.Initable.InitableInitMethodInfo
ResolveRepositoryMethod "isBare" o = RepositoryIsBareMethodInfo
ResolveRepositoryMethod "isEmpty" o = RepositoryIsEmptyMethodInfo
ResolveRepositoryMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveRepositoryMethod "isHeadDetached" o = RepositoryIsHeadDetachedMethodInfo
ResolveRepositoryMethod "isHeadUnborn" o = RepositoryIsHeadUnbornMethodInfo
ResolveRepositoryMethod "listRemotes" o = RepositoryListRemotesMethodInfo
ResolveRepositoryMethod "listTags" o = RepositoryListTagsMethodInfo
ResolveRepositoryMethod "listTagsMatch" o = RepositoryListTagsMatchMethodInfo
ResolveRepositoryMethod "lookup" o = RepositoryLookupMethodInfo
ResolveRepositoryMethod "lookupBlob" o = RepositoryLookupBlobMethodInfo
ResolveRepositoryMethod "lookupBranch" o = RepositoryLookupBranchMethodInfo
ResolveRepositoryMethod "lookupCommit" o = RepositoryLookupCommitMethodInfo
ResolveRepositoryMethod "lookupReference" o = RepositoryLookupReferenceMethodInfo
ResolveRepositoryMethod "lookupReferenceDwim" o = RepositoryLookupReferenceDwimMethodInfo
ResolveRepositoryMethod "lookupRemote" o = RepositoryLookupRemoteMethodInfo
ResolveRepositoryMethod "lookupSubmodule" o = RepositoryLookupSubmoduleMethodInfo
ResolveRepositoryMethod "lookupTag" o = RepositoryLookupTagMethodInfo
ResolveRepositoryMethod "lookupTree" o = RepositoryLookupTreeMethodInfo
ResolveRepositoryMethod "merge" o = RepositoryMergeMethodInfo
ResolveRepositoryMethod "mergeBase" o = RepositoryMergeBaseMethodInfo
ResolveRepositoryMethod "mergeCommits" o = RepositoryMergeCommitsMethodInfo
ResolveRepositoryMethod "mergeTrees" o = RepositoryMergeTreesMethodInfo
ResolveRepositoryMethod "noteForeach" o = RepositoryNoteForeachMethodInfo
ResolveRepositoryMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveRepositoryMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveRepositoryMethod "pathIsIgnored" o = RepositoryPathIsIgnoredMethodInfo
ResolveRepositoryMethod "readNote" o = RepositoryReadNoteMethodInfo
ResolveRepositoryMethod "rebaseInit" o = RepositoryRebaseInitMethodInfo
ResolveRepositoryMethod "rebaseOpen" o = RepositoryRebaseOpenMethodInfo
ResolveRepositoryMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveRepositoryMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveRepositoryMethod "referencesForeach" o = RepositoryReferencesForeachMethodInfo
ResolveRepositoryMethod "referencesForeachName" o = RepositoryReferencesForeachNameMethodInfo
ResolveRepositoryMethod "removeNote" o = RepositoryRemoveNoteMethodInfo
ResolveRepositoryMethod "removeRemote" o = RepositoryRemoveRemoteMethodInfo
ResolveRepositoryMethod "renameRemote" o = RepositoryRenameRemoteMethodInfo
ResolveRepositoryMethod "reset" o = RepositoryResetMethodInfo
ResolveRepositoryMethod "resetDefault" o = RepositoryResetDefaultMethodInfo
ResolveRepositoryMethod "revert" o = RepositoryRevertMethodInfo
ResolveRepositoryMethod "revparse" o = RepositoryRevparseMethodInfo
ResolveRepositoryMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveRepositoryMethod "saveStash" o = RepositorySaveStashMethodInfo
ResolveRepositoryMethod "stashForeach" o = RepositoryStashForeachMethodInfo
ResolveRepositoryMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveRepositoryMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveRepositoryMethod "submoduleForeach" o = RepositorySubmoduleForeachMethodInfo
ResolveRepositoryMethod "tagForeach" o = RepositoryTagForeachMethodInfo
ResolveRepositoryMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveRepositoryMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveRepositoryMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveRepositoryMethod "getAheadBehind" o = RepositoryGetAheadBehindMethodInfo
ResolveRepositoryMethod "getAttribute" o = RepositoryGetAttributeMethodInfo
ResolveRepositoryMethod "getConfig" o = RepositoryGetConfigMethodInfo
ResolveRepositoryMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveRepositoryMethod "getDefaultNotesRef" o = RepositoryGetDefaultNotesRefMethodInfo
ResolveRepositoryMethod "getDescendantOf" o = RepositoryGetDescendantOfMethodInfo
ResolveRepositoryMethod "getHead" o = RepositoryGetHeadMethodInfo
ResolveRepositoryMethod "getIndex" o = RepositoryGetIndexMethodInfo
ResolveRepositoryMethod "getLocation" o = RepositoryGetLocationMethodInfo
ResolveRepositoryMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveRepositoryMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveRepositoryMethod "getSubmoduleStatus" o = RepositoryGetSubmoduleStatusMethodInfo
ResolveRepositoryMethod "getWorkdir" o = RepositoryGetWorkdirMethodInfo
ResolveRepositoryMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveRepositoryMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveRepositoryMethod "setHead" o = RepositorySetHeadMethodInfo
ResolveRepositoryMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveRepositoryMethod "setRemoteUrl" o = RepositorySetRemoteUrlMethodInfo
ResolveRepositoryMethod "setSubmoduleFetchRecurse" o = RepositorySetSubmoduleFetchRecurseMethodInfo
ResolveRepositoryMethod "setSubmoduleIgnore" o = RepositorySetSubmoduleIgnoreMethodInfo
ResolveRepositoryMethod "setSubmoduleUpdate" o = RepositorySetSubmoduleUpdateMethodInfo
ResolveRepositoryMethod "setSubmoduleUrl" o = RepositorySetSubmoduleUrlMethodInfo
ResolveRepositoryMethod "setWorkdir" o = RepositorySetWorkdirMethodInfo
ResolveRepositoryMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveRepositoryMethod t Repository, O.MethodInfo info Repository p) => OL.IsLabel t (Repository -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
getRepositoryCloneOptions :: (MonadIO m, IsRepository o) => o -> m (Maybe Ggit.CloneOptions.CloneOptions)
getRepositoryCloneOptions :: o -> m (Maybe CloneOptions)
getRepositoryCloneOptions o
obj = IO (Maybe CloneOptions) -> m (Maybe CloneOptions)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe CloneOptions) -> m (Maybe CloneOptions))
-> IO (Maybe CloneOptions) -> m (Maybe CloneOptions)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr CloneOptions -> CloneOptions)
-> IO (Maybe CloneOptions)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"clone-options" ManagedPtr CloneOptions -> CloneOptions
Ggit.CloneOptions.CloneOptions
constructRepositoryCloneOptions :: (IsRepository o, MIO.MonadIO m, Ggit.CloneOptions.IsCloneOptions a) => a -> m (GValueConstruct o)
constructRepositoryCloneOptions :: a -> m (GValueConstruct o)
constructRepositoryCloneOptions a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"clone-options" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data RepositoryCloneOptionsPropertyInfo
instance AttrInfo RepositoryCloneOptionsPropertyInfo where
type AttrAllowedOps RepositoryCloneOptionsPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint RepositoryCloneOptionsPropertyInfo = IsRepository
type AttrSetTypeConstraint RepositoryCloneOptionsPropertyInfo = Ggit.CloneOptions.IsCloneOptions
type AttrTransferTypeConstraint RepositoryCloneOptionsPropertyInfo = Ggit.CloneOptions.IsCloneOptions
type AttrTransferType RepositoryCloneOptionsPropertyInfo = Ggit.CloneOptions.CloneOptions
type AttrGetType RepositoryCloneOptionsPropertyInfo = (Maybe Ggit.CloneOptions.CloneOptions)
type AttrLabel RepositoryCloneOptionsPropertyInfo = "clone-options"
type AttrOrigin RepositoryCloneOptionsPropertyInfo = Repository
attrGet = getRepositoryCloneOptions
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Ggit.CloneOptions.CloneOptions v
attrConstruct = constructRepositoryCloneOptions
attrClear = undefined
#endif
getRepositoryHead :: (MonadIO m, IsRepository o) => o -> m (Maybe Ggit.Ref.Ref)
getRepositoryHead :: o -> m (Maybe Ref)
getRepositoryHead o
obj = IO (Maybe Ref) -> m (Maybe Ref)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Ref) -> m (Maybe Ref))
-> IO (Maybe Ref) -> m (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Ref -> Ref) -> IO (Maybe Ref)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"head" ManagedPtr Ref -> Ref
Ggit.Ref.Ref
#if defined(ENABLE_OVERLOADING)
data RepositoryHeadPropertyInfo
instance AttrInfo RepositoryHeadPropertyInfo where
type AttrAllowedOps RepositoryHeadPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint RepositoryHeadPropertyInfo = IsRepository
type AttrSetTypeConstraint RepositoryHeadPropertyInfo = (~) ()
type AttrTransferTypeConstraint RepositoryHeadPropertyInfo = (~) ()
type AttrTransferType RepositoryHeadPropertyInfo = ()
type AttrGetType RepositoryHeadPropertyInfo = (Maybe Ggit.Ref.Ref)
type AttrLabel RepositoryHeadPropertyInfo = "head"
type AttrOrigin RepositoryHeadPropertyInfo = Repository
attrGet = getRepositoryHead
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getRepositoryInit :: (MonadIO m, IsRepository o) => o -> m Bool
getRepositoryInit :: o -> m Bool
getRepositoryInit o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"init"
constructRepositoryInit :: (IsRepository o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructRepositoryInit :: Bool -> m (GValueConstruct o)
constructRepositoryInit Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"init" Bool
val
#if defined(ENABLE_OVERLOADING)
data RepositoryInitPropertyInfo
instance AttrInfo RepositoryInitPropertyInfo where
type AttrAllowedOps RepositoryInitPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint RepositoryInitPropertyInfo = IsRepository
type AttrSetTypeConstraint RepositoryInitPropertyInfo = (~) Bool
type AttrTransferTypeConstraint RepositoryInitPropertyInfo = (~) Bool
type AttrTransferType RepositoryInitPropertyInfo = Bool
type AttrGetType RepositoryInitPropertyInfo = Bool
type AttrLabel RepositoryInitPropertyInfo = "init"
type AttrOrigin RepositoryInitPropertyInfo = Repository
attrGet = getRepositoryInit
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructRepositoryInit
attrClear = undefined
#endif
getRepositoryIsBare :: (MonadIO m, IsRepository o) => o -> m Bool
getRepositoryIsBare :: o -> m Bool
getRepositoryIsBare o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"is-bare"
constructRepositoryIsBare :: (IsRepository o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructRepositoryIsBare :: Bool -> m (GValueConstruct o)
constructRepositoryIsBare Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"is-bare" Bool
val
#if defined(ENABLE_OVERLOADING)
data RepositoryIsBarePropertyInfo
instance AttrInfo RepositoryIsBarePropertyInfo where
type AttrAllowedOps RepositoryIsBarePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint RepositoryIsBarePropertyInfo = IsRepository
type AttrSetTypeConstraint RepositoryIsBarePropertyInfo = (~) Bool
type AttrTransferTypeConstraint RepositoryIsBarePropertyInfo = (~) Bool
type AttrTransferType RepositoryIsBarePropertyInfo = Bool
type AttrGetType RepositoryIsBarePropertyInfo = Bool
type AttrLabel RepositoryIsBarePropertyInfo = "is-bare"
type AttrOrigin RepositoryIsBarePropertyInfo = Repository
attrGet = getRepositoryIsBare
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructRepositoryIsBare
attrClear = undefined
#endif
getRepositoryLocation :: (MonadIO m, IsRepository o) => o -> m (Maybe Gio.File.File)
getRepositoryLocation :: o -> m (Maybe File)
getRepositoryLocation o
obj = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr File -> File) -> IO (Maybe File)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"location" ManagedPtr File -> File
Gio.File.File
constructRepositoryLocation :: (IsRepository o, MIO.MonadIO m, Gio.File.IsFile a) => a -> m (GValueConstruct o)
constructRepositoryLocation :: a -> m (GValueConstruct o)
constructRepositoryLocation a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"location" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data RepositoryLocationPropertyInfo
instance AttrInfo RepositoryLocationPropertyInfo where
type AttrAllowedOps RepositoryLocationPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint RepositoryLocationPropertyInfo = IsRepository
type AttrSetTypeConstraint RepositoryLocationPropertyInfo = Gio.File.IsFile
type AttrTransferTypeConstraint RepositoryLocationPropertyInfo = Gio.File.IsFile
type AttrTransferType RepositoryLocationPropertyInfo = Gio.File.File
type AttrGetType RepositoryLocationPropertyInfo = (Maybe Gio.File.File)
type AttrLabel RepositoryLocationPropertyInfo = "location"
type AttrOrigin RepositoryLocationPropertyInfo = Repository
attrGet = getRepositoryLocation
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Gio.File.File v
attrConstruct = constructRepositoryLocation
attrClear = undefined
#endif
getRepositoryUrl :: (MonadIO m, IsRepository o) => o -> m (Maybe T.Text)
getRepositoryUrl :: o -> m (Maybe Text)
getRepositoryUrl o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"url"
constructRepositoryUrl :: (IsRepository o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructRepositoryUrl :: Text -> m (GValueConstruct o)
constructRepositoryUrl Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"url" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data RepositoryUrlPropertyInfo
instance AttrInfo RepositoryUrlPropertyInfo where
type AttrAllowedOps RepositoryUrlPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint RepositoryUrlPropertyInfo = IsRepository
type AttrSetTypeConstraint RepositoryUrlPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint RepositoryUrlPropertyInfo = (~) T.Text
type AttrTransferType RepositoryUrlPropertyInfo = T.Text
type AttrGetType RepositoryUrlPropertyInfo = (Maybe T.Text)
type AttrLabel RepositoryUrlPropertyInfo = "url"
type AttrOrigin RepositoryUrlPropertyInfo = Repository
attrGet = getRepositoryUrl
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructRepositoryUrl
attrClear = undefined
#endif
getRepositoryWorkdir :: (MonadIO m, IsRepository o) => o -> m (Maybe Gio.File.File)
getRepositoryWorkdir :: o -> m (Maybe File)
getRepositoryWorkdir o
obj = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr File -> File) -> IO (Maybe File)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"workdir" ManagedPtr File -> File
Gio.File.File
setRepositoryWorkdir :: (MonadIO m, IsRepository o, Gio.File.IsFile a) => o -> a -> m ()
setRepositoryWorkdir :: o -> a -> m ()
setRepositoryWorkdir o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"workdir" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructRepositoryWorkdir :: (IsRepository o, MIO.MonadIO m, Gio.File.IsFile a) => a -> m (GValueConstruct o)
constructRepositoryWorkdir :: a -> m (GValueConstruct o)
constructRepositoryWorkdir a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"workdir" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearRepositoryWorkdir :: (MonadIO m, IsRepository o) => o -> m ()
clearRepositoryWorkdir :: o -> m ()
clearRepositoryWorkdir o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe File -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"workdir" (Maybe File
forall a. Maybe a
Nothing :: Maybe Gio.File.File)
#if defined(ENABLE_OVERLOADING)
data RepositoryWorkdirPropertyInfo
instance AttrInfo RepositoryWorkdirPropertyInfo where
type AttrAllowedOps RepositoryWorkdirPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint RepositoryWorkdirPropertyInfo = IsRepository
type AttrSetTypeConstraint RepositoryWorkdirPropertyInfo = Gio.File.IsFile
type AttrTransferTypeConstraint RepositoryWorkdirPropertyInfo = Gio.File.IsFile
type AttrTransferType RepositoryWorkdirPropertyInfo = Gio.File.File
type AttrGetType RepositoryWorkdirPropertyInfo = (Maybe Gio.File.File)
type AttrLabel RepositoryWorkdirPropertyInfo = "workdir"
type AttrOrigin RepositoryWorkdirPropertyInfo = Repository
attrGet = getRepositoryWorkdir
attrSet = setRepositoryWorkdir
attrTransfer _ v = do
unsafeCastTo Gio.File.File v
attrConstruct = constructRepositoryWorkdir
attrClear = clearRepositoryWorkdir
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Repository
type instance O.AttributeList Repository = RepositoryAttributeList
type RepositoryAttributeList = ('[ '("cloneOptions", RepositoryCloneOptionsPropertyInfo), '("head", RepositoryHeadPropertyInfo), '("init", RepositoryInitPropertyInfo), '("isBare", RepositoryIsBarePropertyInfo), '("location", RepositoryLocationPropertyInfo), '("native", Ggit.Native.NativeNativePropertyInfo), '("url", RepositoryUrlPropertyInfo), '("workdir", RepositoryWorkdirPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
repositoryCloneOptions :: AttrLabelProxy "cloneOptions"
repositoryCloneOptions = AttrLabelProxy
repositoryHead :: AttrLabelProxy "head"
repositoryHead = AttrLabelProxy
repositoryInit :: AttrLabelProxy "init"
repositoryInit = AttrLabelProxy
repositoryLocation :: AttrLabelProxy "location"
repositoryLocation = AttrLabelProxy
repositoryUrl :: AttrLabelProxy "url"
repositoryUrl = AttrLabelProxy
repositoryWorkdir :: AttrLabelProxy "workdir"
repositoryWorkdir = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Repository = RepositorySignalList
type RepositorySignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "ggit_repository_add_remote_fetch" ggit_repository_add_remote_fetch ::
Ptr Repository ->
Ptr Ggit.Remote.Remote ->
CString ->
Ptr (Ptr GError) ->
IO ()
repositoryAddRemoteFetch ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Remote.IsRemote b) =>
a
-> b
-> T.Text
-> m ()
repositoryAddRemoteFetch :: a -> b -> Text -> m ()
repositoryAddRemoteFetch a
repository b
remote Text
refspec = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Remote
remote' <- b -> IO (Ptr Remote)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
remote
CString
refspec' <- Text -> IO CString
textToCString Text
refspec
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Remote -> CString -> Ptr (Ptr GError) -> IO ()
ggit_repository_add_remote_fetch Ptr Repository
repository' Ptr Remote
remote' CString
refspec'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
remote
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refspec'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refspec'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryAddRemoteFetchMethodInfo
instance (signature ~ (b -> T.Text -> m ()), MonadIO m, IsRepository a, Ggit.Remote.IsRemote b) => O.MethodInfo RepositoryAddRemoteFetchMethodInfo a signature where
overloadedMethod = repositoryAddRemoteFetch
#endif
foreign import ccall "ggit_repository_add_remote_push" ggit_repository_add_remote_push ::
Ptr Repository ->
Ptr Ggit.Remote.Remote ->
CString ->
Ptr (Ptr GError) ->
IO ()
repositoryAddRemotePush ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Remote.IsRemote b) =>
a
-> b
-> T.Text
-> m ()
repositoryAddRemotePush :: a -> b -> Text -> m ()
repositoryAddRemotePush a
repository b
remote Text
refspec = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Remote
remote' <- b -> IO (Ptr Remote)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
remote
CString
refspec' <- Text -> IO CString
textToCString Text
refspec
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Remote -> CString -> Ptr (Ptr GError) -> IO ()
ggit_repository_add_remote_push Ptr Repository
repository' Ptr Remote
remote' CString
refspec'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
remote
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refspec'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refspec'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryAddRemotePushMethodInfo
instance (signature ~ (b -> T.Text -> m ()), MonadIO m, IsRepository a, Ggit.Remote.IsRemote b) => O.MethodInfo RepositoryAddRemotePushMethodInfo a signature where
overloadedMethod = repositoryAddRemotePush
#endif
foreign import ccall "ggit_repository_blame_file" ggit_repository_blame_file ::
Ptr Repository ->
Ptr Gio.File.File ->
Ptr Ggit.BlameOptions.BlameOptions ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Blame.Blame)
repositoryBlameFile ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Gio.File.IsFile b) =>
a
-> b
-> Maybe (Ggit.BlameOptions.BlameOptions)
-> m (Maybe Ggit.Blame.Blame)
repositoryBlameFile :: a -> b -> Maybe BlameOptions -> m (Maybe Blame)
repositoryBlameFile a
repository b
file Maybe BlameOptions
blameOptions = IO (Maybe Blame) -> m (Maybe Blame)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Blame) -> m (Maybe Blame))
-> IO (Maybe Blame) -> m (Maybe Blame)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr File
file' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
file
Ptr BlameOptions
maybeBlameOptions <- case Maybe BlameOptions
blameOptions of
Maybe BlameOptions
Nothing -> Ptr BlameOptions -> IO (Ptr BlameOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr BlameOptions
forall a. Ptr a
nullPtr
Just BlameOptions
jBlameOptions -> do
Ptr BlameOptions
jBlameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
jBlameOptions
Ptr BlameOptions -> IO (Ptr BlameOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr BlameOptions
jBlameOptions'
IO (Maybe Blame) -> IO () -> IO (Maybe Blame)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Blame
result <- (Ptr (Ptr GError) -> IO (Ptr Blame)) -> IO (Ptr Blame)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Blame)) -> IO (Ptr Blame))
-> (Ptr (Ptr GError) -> IO (Ptr Blame)) -> IO (Ptr Blame)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr File
-> Ptr BlameOptions
-> Ptr (Ptr GError)
-> IO (Ptr Blame)
ggit_repository_blame_file Ptr Repository
repository' Ptr File
file' Ptr BlameOptions
maybeBlameOptions
Maybe Blame
maybeResult <- Ptr Blame -> (Ptr Blame -> IO Blame) -> IO (Maybe Blame)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Blame
result ((Ptr Blame -> IO Blame) -> IO (Maybe Blame))
-> (Ptr Blame -> IO Blame) -> IO (Maybe Blame)
forall a b. (a -> b) -> a -> b
$ \Ptr Blame
result' -> do
Blame
result'' <- ((ManagedPtr Blame -> Blame) -> Ptr Blame -> IO Blame
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Blame -> Blame
Ggit.Blame.Blame) Ptr Blame
result'
Blame -> IO Blame
forall (m :: * -> *) a. Monad m => a -> m a
return Blame
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
file
Maybe BlameOptions -> (BlameOptions -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe BlameOptions
blameOptions BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe Blame -> IO (Maybe Blame)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Blame
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryBlameFileMethodInfo
instance (signature ~ (b -> Maybe (Ggit.BlameOptions.BlameOptions) -> m (Maybe Ggit.Blame.Blame)), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.MethodInfo RepositoryBlameFileMethodInfo a signature where
overloadedMethod = repositoryBlameFile
#endif
foreign import ccall "ggit_repository_checkout_head" ggit_repository_checkout_head ::
Ptr Repository ->
Ptr Ggit.CheckoutOptions.CheckoutOptions ->
Ptr (Ptr GError) ->
IO CInt
repositoryCheckoutHead ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.CheckoutOptions.IsCheckoutOptions b) =>
a
-> Maybe (b)
-> m ()
repositoryCheckoutHead :: a -> Maybe b -> m ()
repositoryCheckoutHead a
repository Maybe b
options = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr CheckoutOptions
maybeOptions <- case Maybe b
options of
Maybe b
Nothing -> Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
forall a. Ptr a
nullPtr
Just b
jOptions -> do
Ptr CheckoutOptions
jOptions' <- b -> IO (Ptr CheckoutOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jOptions
Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
jOptions'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr CheckoutOptions -> Ptr (Ptr GError) -> IO CInt
ggit_repository_checkout_head Ptr Repository
repository' Ptr CheckoutOptions
maybeOptions
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
options b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCheckoutHeadMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsRepository a, Ggit.CheckoutOptions.IsCheckoutOptions b) => O.MethodInfo RepositoryCheckoutHeadMethodInfo a signature where
overloadedMethod = repositoryCheckoutHead
#endif
foreign import ccall "ggit_repository_checkout_index" ggit_repository_checkout_index ::
Ptr Repository ->
Ptr Ggit.Index.Index ->
Ptr Ggit.CheckoutOptions.CheckoutOptions ->
Ptr (Ptr GError) ->
IO CInt
repositoryCheckoutIndex ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Index.IsIndex b, Ggit.CheckoutOptions.IsCheckoutOptions c) =>
a
-> Maybe (b)
-> Maybe (c)
-> m ()
repositoryCheckoutIndex :: a -> Maybe b -> Maybe c -> m ()
repositoryCheckoutIndex a
repository Maybe b
index Maybe c
options = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Index
maybeIndex <- case Maybe b
index of
Maybe b
Nothing -> Ptr Index -> IO (Ptr Index)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Index
forall a. Ptr a
nullPtr
Just b
jIndex -> do
Ptr Index
jIndex' <- b -> IO (Ptr Index)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jIndex
Ptr Index -> IO (Ptr Index)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Index
jIndex'
Ptr CheckoutOptions
maybeOptions <- case Maybe c
options of
Maybe c
Nothing -> Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
forall a. Ptr a
nullPtr
Just c
jOptions -> do
Ptr CheckoutOptions
jOptions' <- c -> IO (Ptr CheckoutOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jOptions
Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
jOptions'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Index -> Ptr CheckoutOptions -> Ptr (Ptr GError) -> IO CInt
ggit_repository_checkout_index Ptr Repository
repository' Ptr Index
maybeIndex Ptr CheckoutOptions
maybeOptions
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
index b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
options c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCheckoutIndexMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (c) -> m ()), MonadIO m, IsRepository a, Ggit.Index.IsIndex b, Ggit.CheckoutOptions.IsCheckoutOptions c) => O.MethodInfo RepositoryCheckoutIndexMethodInfo a signature where
overloadedMethod = repositoryCheckoutIndex
#endif
foreign import ccall "ggit_repository_checkout_tree" ggit_repository_checkout_tree ::
Ptr Repository ->
Ptr Ggit.Object.Object ->
Ptr Ggit.CheckoutOptions.CheckoutOptions ->
Ptr (Ptr GError) ->
IO CInt
repositoryCheckoutTree ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.CheckoutOptions.IsCheckoutOptions c) =>
a
-> Maybe (b)
-> Maybe (c)
-> m ()
repositoryCheckoutTree :: a -> Maybe b -> Maybe c -> m ()
repositoryCheckoutTree a
repository Maybe b
tree Maybe c
options = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Object
maybeTree <- case Maybe b
tree of
Maybe b
Nothing -> Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
forall a. Ptr a
nullPtr
Just b
jTree -> do
Ptr Object
jTree' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jTree
Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jTree'
Ptr CheckoutOptions
maybeOptions <- case Maybe c
options of
Maybe c
Nothing -> Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
forall a. Ptr a
nullPtr
Just c
jOptions -> do
Ptr CheckoutOptions
jOptions' <- c -> IO (Ptr CheckoutOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jOptions
Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
jOptions'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Object -> Ptr CheckoutOptions -> Ptr (Ptr GError) -> IO CInt
ggit_repository_checkout_tree Ptr Repository
repository' Ptr Object
maybeTree Ptr CheckoutOptions
maybeOptions
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
tree b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
options c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCheckoutTreeMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (c) -> m ()), MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.CheckoutOptions.IsCheckoutOptions c) => O.MethodInfo RepositoryCheckoutTreeMethodInfo a signature where
overloadedMethod = repositoryCheckoutTree
#endif
foreign import ccall "ggit_repository_cherry_pick" ggit_repository_cherry_pick ::
Ptr Repository ->
Ptr Ggit.Commit.Commit ->
Ptr Ggit.CherryPickOptions.CherryPickOptions ->
Ptr (Ptr GError) ->
IO CInt
repositoryCherryPick ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.CherryPickOptions.IsCherryPickOptions c) =>
a
-> b
-> c
-> m ()
repositoryCherryPick :: a -> b -> c -> m ()
repositoryCherryPick a
repository b
commit c
options = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Commit
commit' <- b -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
commit
Ptr CherryPickOptions
options' <- c -> IO (Ptr CherryPickOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
options
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Commit
-> Ptr CherryPickOptions
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_cherry_pick Ptr Repository
repository' Ptr Commit
commit' Ptr CherryPickOptions
options'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
commit
c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
options
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCherryPickMethodInfo
instance (signature ~ (b -> c -> m ()), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.CherryPickOptions.IsCherryPickOptions c) => O.MethodInfo RepositoryCherryPickMethodInfo a signature where
overloadedMethod = repositoryCherryPick
#endif
foreign import ccall "ggit_repository_cherry_pick_commit" ggit_repository_cherry_pick_commit ::
Ptr Repository ->
Ptr Ggit.Commit.Commit ->
Ptr Ggit.Commit.Commit ->
Word32 ->
Ptr Ggit.MergeOptions.MergeOptions ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Index.Index)
repositoryCherryPickCommit ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.Commit.IsCommit c) =>
a
-> b
-> c
-> Word32
-> Maybe (Ggit.MergeOptions.MergeOptions)
-> m (Maybe Ggit.Index.Index)
repositoryCherryPickCommit :: a -> b -> c -> Word32 -> Maybe MergeOptions -> m (Maybe Index)
repositoryCherryPickCommit a
repository b
commit c
ourCommit Word32
mainline Maybe MergeOptions
mergeOptions = IO (Maybe Index) -> m (Maybe Index)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Index) -> m (Maybe Index))
-> IO (Maybe Index) -> m (Maybe Index)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Commit
commit' <- b -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
commit
Ptr Commit
ourCommit' <- c -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
ourCommit
Ptr MergeOptions
maybeMergeOptions <- case Maybe MergeOptions
mergeOptions of
Maybe MergeOptions
Nothing -> Ptr MergeOptions -> IO (Ptr MergeOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr MergeOptions
forall a. Ptr a
nullPtr
Just MergeOptions
jMergeOptions -> do
Ptr MergeOptions
jMergeOptions' <- MergeOptions -> IO (Ptr MergeOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MergeOptions
jMergeOptions
Ptr MergeOptions -> IO (Ptr MergeOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr MergeOptions
jMergeOptions'
IO (Maybe Index) -> IO () -> IO (Maybe Index)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Index
result <- (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index))
-> (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Commit
-> Ptr Commit
-> Word32
-> Ptr MergeOptions
-> Ptr (Ptr GError)
-> IO (Ptr Index)
ggit_repository_cherry_pick_commit Ptr Repository
repository' Ptr Commit
commit' Ptr Commit
ourCommit' Word32
mainline Ptr MergeOptions
maybeMergeOptions
Maybe Index
maybeResult <- Ptr Index -> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Index
result ((Ptr Index -> IO Index) -> IO (Maybe Index))
-> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. (a -> b) -> a -> b
$ \Ptr Index
result' -> do
Index
result'' <- ((ManagedPtr Index -> Index) -> Ptr Index -> IO Index
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Index -> Index
Ggit.Index.Index) Ptr Index
result'
Index -> IO Index
forall (m :: * -> *) a. Monad m => a -> m a
return Index
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
commit
c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
ourCommit
Maybe MergeOptions -> (MergeOptions -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe MergeOptions
mergeOptions MergeOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe Index -> IO (Maybe Index)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Index
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCherryPickCommitMethodInfo
instance (signature ~ (b -> c -> Word32 -> Maybe (Ggit.MergeOptions.MergeOptions) -> m (Maybe Ggit.Index.Index)), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.Commit.IsCommit c) => O.MethodInfo RepositoryCherryPickCommitMethodInfo a signature where
overloadedMethod = repositoryCherryPickCommit
#endif
foreign import ccall "ggit_repository_create_blob" ggit_repository_create_blob ::
Ptr Repository ->
IO (Ptr Ggit.BlobOutputStream.BlobOutputStream)
repositoryCreateBlob ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m (Maybe Ggit.BlobOutputStream.BlobOutputStream)
repositoryCreateBlob :: a -> m (Maybe BlobOutputStream)
repositoryCreateBlob a
repository = IO (Maybe BlobOutputStream) -> m (Maybe BlobOutputStream)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BlobOutputStream) -> m (Maybe BlobOutputStream))
-> IO (Maybe BlobOutputStream) -> m (Maybe BlobOutputStream)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr BlobOutputStream
result <- Ptr Repository -> IO (Ptr BlobOutputStream)
ggit_repository_create_blob Ptr Repository
repository'
Maybe BlobOutputStream
maybeResult <- Ptr BlobOutputStream
-> (Ptr BlobOutputStream -> IO BlobOutputStream)
-> IO (Maybe BlobOutputStream)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr BlobOutputStream
result ((Ptr BlobOutputStream -> IO BlobOutputStream)
-> IO (Maybe BlobOutputStream))
-> (Ptr BlobOutputStream -> IO BlobOutputStream)
-> IO (Maybe BlobOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr BlobOutputStream
result' -> do
BlobOutputStream
result'' <- ((ManagedPtr BlobOutputStream -> BlobOutputStream)
-> Ptr BlobOutputStream -> IO BlobOutputStream
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr BlobOutputStream -> BlobOutputStream
Ggit.BlobOutputStream.BlobOutputStream) Ptr BlobOutputStream
result'
BlobOutputStream -> IO BlobOutputStream
forall (m :: * -> *) a. Monad m => a -> m a
return BlobOutputStream
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe BlobOutputStream -> IO (Maybe BlobOutputStream)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BlobOutputStream
maybeResult
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateBlobMethodInfo
instance (signature ~ (m (Maybe Ggit.BlobOutputStream.BlobOutputStream)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateBlobMethodInfo a signature where
overloadedMethod = repositoryCreateBlob
#endif
foreign import ccall "ggit_repository_create_blob_from_buffer" ggit_repository_create_blob_from_buffer ::
Ptr Repository ->
Ptr Word8 ->
Word64 ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.OId.OId)
repositoryCreateBlobFromBuffer ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> ByteString
-> m (Maybe Ggit.OId.OId)
repositoryCreateBlobFromBuffer :: a -> ByteString -> m (Maybe OId)
repositoryCreateBlobFromBuffer a
repository ByteString
buffer = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
let size :: Word64
size = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
buffer
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Word8
buffer' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
buffer
IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Word8 -> Word64 -> Ptr (Ptr GError) -> IO (Ptr OId)
ggit_repository_create_blob_from_buffer Ptr Repository
repository' Ptr Word8
buffer' Word64
size
Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
buffer'
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
) (do
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
buffer'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateBlobFromBufferMethodInfo
instance (signature ~ (ByteString -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateBlobFromBufferMethodInfo a signature where
overloadedMethod = repositoryCreateBlobFromBuffer
#endif
foreign import ccall "ggit_repository_create_blob_from_file" ggit_repository_create_blob_from_file ::
Ptr Repository ->
Ptr Gio.File.File ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.OId.OId)
repositoryCreateBlobFromFile ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Gio.File.IsFile b) =>
a
-> b
-> m Ggit.OId.OId
repositoryCreateBlobFromFile :: a -> b -> m OId
repositoryCreateBlobFromFile a
repository b
file = IO OId -> m OId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO OId -> m OId) -> IO OId -> m OId
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr File
file' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
file
IO OId -> IO () -> IO OId
forall a b. IO a -> IO b -> IO a
onException (do
Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr File -> Ptr (Ptr GError) -> IO (Ptr OId)
ggit_repository_create_blob_from_file Ptr Repository
repository' Ptr File
file'
Text -> Ptr OId -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repositoryCreateBlobFromFile" Ptr OId
result
OId
result' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
file
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result'
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateBlobFromFileMethodInfo
instance (signature ~ (b -> m Ggit.OId.OId), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.MethodInfo RepositoryCreateBlobFromFileMethodInfo a signature where
overloadedMethod = repositoryCreateBlobFromFile
#endif
foreign import ccall "ggit_repository_create_blob_from_path" ggit_repository_create_blob_from_path ::
Ptr Repository ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.OId.OId)
repositoryCreateBlobFromPath ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m (Maybe Ggit.OId.OId)
repositoryCreateBlobFromPath :: a -> Text -> m (Maybe OId)
repositoryCreateBlobFromPath a
repository Text
path = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
path' <- Text -> IO CString
textToCString Text
path
IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr OId)
ggit_repository_create_blob_from_path Ptr Repository
repository' CString
path'
Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateBlobFromPathMethodInfo
instance (signature ~ (T.Text -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateBlobFromPathMethodInfo a signature where
overloadedMethod = repositoryCreateBlobFromPath
#endif
foreign import ccall "ggit_repository_create_branch" ggit_repository_create_branch ::
Ptr Repository ->
CString ->
Ptr Ggit.Object.Object ->
CUInt ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Branch.Branch)
repositoryCreateBranch ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b) =>
a
-> T.Text
-> b
-> [Ggit.Flags.CreateFlags]
-> m (Maybe Ggit.Branch.Branch)
repositoryCreateBranch :: a -> Text -> b -> [CreateFlags] -> m (Maybe Branch)
repositoryCreateBranch a
repository Text
branchName b
target [CreateFlags]
flags = IO (Maybe Branch) -> m (Maybe Branch)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Branch) -> m (Maybe Branch))
-> IO (Maybe Branch) -> m (Maybe Branch)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
branchName' <- Text -> IO CString
textToCString Text
branchName
Ptr Object
target' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
let flags' :: CUInt
flags' = [CreateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [CreateFlags]
flags
IO (Maybe Branch) -> IO () -> IO (Maybe Branch)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Branch
result <- (Ptr (Ptr GError) -> IO (Ptr Branch)) -> IO (Ptr Branch)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Branch)) -> IO (Ptr Branch))
-> (Ptr (Ptr GError) -> IO (Ptr Branch)) -> IO (Ptr Branch)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Object
-> CUInt
-> Ptr (Ptr GError)
-> IO (Ptr Branch)
ggit_repository_create_branch Ptr Repository
repository' CString
branchName' Ptr Object
target' CUInt
flags'
Maybe Branch
maybeResult <- Ptr Branch -> (Ptr Branch -> IO Branch) -> IO (Maybe Branch)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Branch
result ((Ptr Branch -> IO Branch) -> IO (Maybe Branch))
-> (Ptr Branch -> IO Branch) -> IO (Maybe Branch)
forall a b. (a -> b) -> a -> b
$ \Ptr Branch
result' -> do
Branch
result'' <- ((ManagedPtr Branch -> Branch) -> Ptr Branch -> IO Branch
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Branch -> Branch
Ggit.Branch.Branch) Ptr Branch
result'
Branch -> IO Branch
forall (m :: * -> *) a. Monad m => a -> m a
return Branch
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
branchName'
Maybe Branch -> IO (Maybe Branch)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Branch
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
branchName'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateBranchMethodInfo
instance (signature ~ (T.Text -> b -> [Ggit.Flags.CreateFlags] -> m (Maybe Ggit.Branch.Branch)), MonadIO m, IsRepository a, Ggit.Object.IsObject b) => O.MethodInfo RepositoryCreateBranchMethodInfo a signature where
overloadedMethod = repositoryCreateBranch
#endif
foreign import ccall "ggit_repository_create_commit" ggit_repository_create_commit ::
Ptr Repository ->
CString ->
Ptr Ggit.Signature.Signature ->
Ptr Ggit.Signature.Signature ->
CString ->
CString ->
Ptr Ggit.Tree.Tree ->
Ptr (Ptr Ggit.Commit.Commit) ->
Int32 ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.OId.OId)
repositoryCreateCommit ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c, Ggit.Tree.IsTree d) =>
a
-> Maybe (T.Text)
-> b
-> c
-> Maybe (T.Text)
-> T.Text
-> d
-> [Ggit.Commit.Commit]
-> m (Maybe Ggit.OId.OId)
repositoryCreateCommit :: a
-> Maybe Text
-> b
-> c
-> Maybe Text
-> Text
-> d
-> [Commit]
-> m (Maybe OId)
repositoryCreateCommit a
repository Maybe Text
updateRef b
author c
committer Maybe Text
messageEncoding Text
message d
tree [Commit]
parents = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
let parentCount :: Int32
parentCount = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Commit] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Commit]
parents
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
maybeUpdateRef <- case Maybe Text
updateRef of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jUpdateRef -> do
CString
jUpdateRef' <- Text -> IO CString
textToCString Text
jUpdateRef
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jUpdateRef'
Ptr Signature
author' <- b -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
author
Ptr Signature
committer' <- c -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
committer
CString
maybeMessageEncoding <- case Maybe Text
messageEncoding of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jMessageEncoding -> do
CString
jMessageEncoding' <- Text -> IO CString
textToCString Text
jMessageEncoding
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jMessageEncoding'
CString
message' <- Text -> IO CString
textToCString Text
message
Ptr Tree
tree' <- d -> IO (Ptr Tree)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
tree
[Ptr Commit]
parents' <- (Commit -> IO (Ptr Commit)) -> [Commit] -> IO [Ptr Commit]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM Commit -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [Commit]
parents
Ptr (Ptr Commit)
parents'' <- [Ptr Commit] -> IO (Ptr (Ptr Commit))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packPtrArray [Ptr Commit]
parents'
IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Signature
-> Ptr Signature
-> CString
-> CString
-> Ptr Tree
-> Ptr (Ptr Commit)
-> Int32
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_create_commit Ptr Repository
repository' CString
maybeUpdateRef Ptr Signature
author' Ptr Signature
committer' CString
maybeMessageEncoding CString
message' Ptr Tree
tree' Ptr (Ptr Commit)
parents'' Int32
parentCount
Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
author
c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
committer
d -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr d
tree
(Commit -> IO ()) -> [Commit] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Commit -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [Commit]
parents
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeUpdateRef
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeMessageEncoding
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
Ptr (Ptr Commit) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Commit)
parents''
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeUpdateRef
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeMessageEncoding
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
Ptr (Ptr Commit) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Commit)
parents''
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateCommitMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> c -> Maybe (T.Text) -> T.Text -> d -> [Ggit.Commit.Commit] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c, Ggit.Tree.IsTree d) => O.MethodInfo RepositoryCreateCommitMethodInfo a signature where
overloadedMethod = repositoryCreateCommit
#endif
foreign import ccall "ggit_repository_create_commit_from_ids" ggit_repository_create_commit_from_ids ::
Ptr Repository ->
CString ->
Ptr Ggit.Signature.Signature ->
Ptr Ggit.Signature.Signature ->
CString ->
CString ->
Ptr Ggit.OId.OId ->
Ptr (Ptr Ggit.OId.OId) ->
Int32 ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.OId.OId)
repositoryCreateCommitFromIds ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) =>
a
-> Maybe (T.Text)
-> b
-> c
-> Maybe (T.Text)
-> T.Text
-> Ggit.OId.OId
-> [Ggit.OId.OId]
-> m (Maybe Ggit.OId.OId)
repositoryCreateCommitFromIds :: a
-> Maybe Text
-> b
-> c
-> Maybe Text
-> Text
-> OId
-> [OId]
-> m (Maybe OId)
repositoryCreateCommitFromIds a
repository Maybe Text
updateRef b
author c
committer Maybe Text
messageEncoding Text
message OId
tree [OId]
parents = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
let parentCount :: Int32
parentCount = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [OId] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [OId]
parents
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
maybeUpdateRef <- case Maybe Text
updateRef of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jUpdateRef -> do
CString
jUpdateRef' <- Text -> IO CString
textToCString Text
jUpdateRef
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jUpdateRef'
Ptr Signature
author' <- b -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
author
Ptr Signature
committer' <- c -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
committer
CString
maybeMessageEncoding <- case Maybe Text
messageEncoding of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jMessageEncoding -> do
CString
jMessageEncoding' <- Text -> IO CString
textToCString Text
jMessageEncoding
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jMessageEncoding'
CString
message' <- Text -> IO CString
textToCString Text
message
Ptr OId
tree' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
tree
[Ptr OId]
parents' <- (OId -> IO (Ptr OId)) -> [OId] -> IO [Ptr OId]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [OId]
parents
Ptr (Ptr OId)
parents'' <- [Ptr OId] -> IO (Ptr (Ptr OId))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packPtrArray [Ptr OId]
parents'
IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Signature
-> Ptr Signature
-> CString
-> CString
-> Ptr OId
-> Ptr (Ptr OId)
-> Int32
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_create_commit_from_ids Ptr Repository
repository' CString
maybeUpdateRef Ptr Signature
author' Ptr Signature
committer' CString
maybeMessageEncoding CString
message' Ptr OId
tree' Ptr (Ptr OId)
parents'' Int32
parentCount
Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
author
c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
committer
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
tree
(OId -> IO ()) -> [OId] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [OId]
parents
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeUpdateRef
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeMessageEncoding
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
Ptr (Ptr OId) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr OId)
parents''
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeUpdateRef
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeMessageEncoding
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
Ptr (Ptr OId) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr OId)
parents''
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateCommitFromIdsMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> c -> Maybe (T.Text) -> T.Text -> Ggit.OId.OId -> [Ggit.OId.OId] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => O.MethodInfo RepositoryCreateCommitFromIdsMethodInfo a signature where
overloadedMethod = repositoryCreateCommitFromIds
#endif
foreign import ccall "ggit_repository_create_index_entry_for_file" ggit_repository_create_index_entry_for_file ::
Ptr Repository ->
Ptr Gio.File.File ->
Ptr Ggit.OId.OId ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.IndexEntry.IndexEntry)
repositoryCreateIndexEntryForFile ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Gio.File.IsFile b) =>
a
-> Maybe (b)
-> Maybe (Ggit.OId.OId)
-> m (Maybe Ggit.IndexEntry.IndexEntry)
repositoryCreateIndexEntryForFile :: a -> Maybe b -> Maybe OId -> m (Maybe IndexEntry)
repositoryCreateIndexEntryForFile a
repository Maybe b
file Maybe OId
id = IO (Maybe IndexEntry) -> m (Maybe IndexEntry)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe IndexEntry) -> m (Maybe IndexEntry))
-> IO (Maybe IndexEntry) -> m (Maybe IndexEntry)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr File
maybeFile <- case Maybe b
file of
Maybe b
Nothing -> Ptr File -> IO (Ptr File)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
forall a. Ptr a
nullPtr
Just b
jFile -> do
Ptr File
jFile' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jFile
Ptr File -> IO (Ptr File)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jFile'
Ptr OId
maybeId <- case Maybe OId
id of
Maybe OId
Nothing -> Ptr OId -> IO (Ptr OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OId
forall a. Ptr a
nullPtr
Just OId
jId -> do
Ptr OId
jId' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
jId
Ptr OId -> IO (Ptr OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OId
jId'
IO (Maybe IndexEntry) -> IO () -> IO (Maybe IndexEntry)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr IndexEntry
result <- (Ptr (Ptr GError) -> IO (Ptr IndexEntry)) -> IO (Ptr IndexEntry)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr IndexEntry)) -> IO (Ptr IndexEntry))
-> (Ptr (Ptr GError) -> IO (Ptr IndexEntry)) -> IO (Ptr IndexEntry)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr File -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr IndexEntry)
ggit_repository_create_index_entry_for_file Ptr Repository
repository' Ptr File
maybeFile Ptr OId
maybeId
Maybe IndexEntry
maybeResult <- Ptr IndexEntry
-> (Ptr IndexEntry -> IO IndexEntry) -> IO (Maybe IndexEntry)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr IndexEntry
result ((Ptr IndexEntry -> IO IndexEntry) -> IO (Maybe IndexEntry))
-> (Ptr IndexEntry -> IO IndexEntry) -> IO (Maybe IndexEntry)
forall a b. (a -> b) -> a -> b
$ \Ptr IndexEntry
result' -> do
IndexEntry
result'' <- ((ManagedPtr IndexEntry -> IndexEntry)
-> Ptr IndexEntry -> IO IndexEntry
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr IndexEntry -> IndexEntry
Ggit.IndexEntry.IndexEntry) Ptr IndexEntry
result'
IndexEntry -> IO IndexEntry
forall (m :: * -> *) a. Monad m => a -> m a
return IndexEntry
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
file b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe OId -> (OId -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe OId
id OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe IndexEntry -> IO (Maybe IndexEntry)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe IndexEntry
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateIndexEntryForFileMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (Ggit.OId.OId) -> m (Maybe Ggit.IndexEntry.IndexEntry)), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.MethodInfo RepositoryCreateIndexEntryForFileMethodInfo a signature where
overloadedMethod = repositoryCreateIndexEntryForFile
#endif
foreign import ccall "ggit_repository_create_index_entry_for_path" ggit_repository_create_index_entry_for_path ::
Ptr Repository ->
CString ->
Ptr Ggit.OId.OId ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.IndexEntry.IndexEntry)
repositoryCreateIndexEntryForPath ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Maybe (T.Text)
-> Maybe (Ggit.OId.OId)
-> m (Maybe Ggit.IndexEntry.IndexEntry)
repositoryCreateIndexEntryForPath :: a -> Maybe Text -> Maybe OId -> m (Maybe IndexEntry)
repositoryCreateIndexEntryForPath a
repository Maybe Text
path Maybe OId
id = IO (Maybe IndexEntry) -> m (Maybe IndexEntry)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe IndexEntry) -> m (Maybe IndexEntry))
-> IO (Maybe IndexEntry) -> m (Maybe IndexEntry)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
maybePath <- case Maybe Text
path of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jPath -> do
CString
jPath' <- Text -> IO CString
textToCString Text
jPath
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jPath'
Ptr OId
maybeId <- case Maybe OId
id of
Maybe OId
Nothing -> Ptr OId -> IO (Ptr OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OId
forall a. Ptr a
nullPtr
Just OId
jId -> do
Ptr OId
jId' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
jId
Ptr OId -> IO (Ptr OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OId
jId'
IO (Maybe IndexEntry) -> IO () -> IO (Maybe IndexEntry)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr IndexEntry
result <- (Ptr (Ptr GError) -> IO (Ptr IndexEntry)) -> IO (Ptr IndexEntry)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr IndexEntry)) -> IO (Ptr IndexEntry))
-> (Ptr (Ptr GError) -> IO (Ptr IndexEntry)) -> IO (Ptr IndexEntry)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr IndexEntry)
ggit_repository_create_index_entry_for_path Ptr Repository
repository' CString
maybePath Ptr OId
maybeId
Maybe IndexEntry
maybeResult <- Ptr IndexEntry
-> (Ptr IndexEntry -> IO IndexEntry) -> IO (Maybe IndexEntry)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr IndexEntry
result ((Ptr IndexEntry -> IO IndexEntry) -> IO (Maybe IndexEntry))
-> (Ptr IndexEntry -> IO IndexEntry) -> IO (Maybe IndexEntry)
forall a b. (a -> b) -> a -> b
$ \Ptr IndexEntry
result' -> do
IndexEntry
result'' <- ((ManagedPtr IndexEntry -> IndexEntry)
-> Ptr IndexEntry -> IO IndexEntry
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr IndexEntry -> IndexEntry
Ggit.IndexEntry.IndexEntry) Ptr IndexEntry
result'
IndexEntry -> IO IndexEntry
forall (m :: * -> *) a. Monad m => a -> m a
return IndexEntry
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe OId -> (OId -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe OId
id OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePath
Maybe IndexEntry -> IO (Maybe IndexEntry)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe IndexEntry
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePath
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateIndexEntryForPathMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (Ggit.OId.OId) -> m (Maybe Ggit.IndexEntry.IndexEntry)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateIndexEntryForPathMethodInfo a signature where
overloadedMethod = repositoryCreateIndexEntryForPath
#endif
foreign import ccall "ggit_repository_create_note" ggit_repository_create_note ::
Ptr Repository ->
CString ->
Ptr Ggit.Signature.Signature ->
Ptr Ggit.Signature.Signature ->
Ptr Ggit.OId.OId ->
CString ->
CInt ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.OId.OId)
repositoryCreateNote ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) =>
a
-> Maybe (T.Text)
-> b
-> c
-> Ggit.OId.OId
-> T.Text
-> Bool
-> m (Maybe Ggit.OId.OId)
repositoryCreateNote :: a -> Maybe Text -> b -> c -> OId -> Text -> Bool -> m (Maybe OId)
repositoryCreateNote a
repository Maybe Text
notesRef b
author c
committer OId
id Text
note Bool
force = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
maybeNotesRef <- case Maybe Text
notesRef of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jNotesRef -> do
CString
jNotesRef' <- Text -> IO CString
textToCString Text
jNotesRef
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jNotesRef'
Ptr Signature
author' <- b -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
author
Ptr Signature
committer' <- c -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
committer
Ptr OId
id' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
id
CString
note' <- Text -> IO CString
textToCString Text
note
let force' :: CInt
force' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
force
IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Signature
-> Ptr Signature
-> Ptr OId
-> CString
-> CInt
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_create_note Ptr Repository
repository' CString
maybeNotesRef Ptr Signature
author' Ptr Signature
committer' Ptr OId
id' CString
note' CInt
force'
Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
author
c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
committer
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
id
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
note'
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
note'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateNoteMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> c -> Ggit.OId.OId -> T.Text -> Bool -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => O.MethodInfo RepositoryCreateNoteMethodInfo a signature where
overloadedMethod = repositoryCreateNote
#endif
foreign import ccall "ggit_repository_create_reference" ggit_repository_create_reference ::
Ptr Repository ->
CString ->
Ptr Ggit.OId.OId ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Ref.Ref)
repositoryCreateReference ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> Ggit.OId.OId
-> T.Text
-> m (Maybe Ggit.Ref.Ref)
repositoryCreateReference :: a -> Text -> OId -> Text -> m (Maybe Ref)
repositoryCreateReference a
repository Text
name OId
oid Text
logMessage = IO (Maybe Ref) -> m (Maybe Ref)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Ref) -> m (Maybe Ref))
-> IO (Maybe Ref) -> m (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr OId
oid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oid
CString
logMessage' <- Text -> IO CString
textToCString Text
logMessage
IO (Maybe Ref) -> IO () -> IO (Maybe Ref)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Ref
result <- (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref))
-> (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr OId
-> CString
-> Ptr (Ptr GError)
-> IO (Ptr Ref)
ggit_repository_create_reference Ptr Repository
repository' CString
name' Ptr OId
oid' CString
logMessage'
Maybe Ref
maybeResult <- Ptr Ref -> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Ref
result ((Ptr Ref -> IO Ref) -> IO (Maybe Ref))
-> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ \Ptr Ref
result' -> do
Ref
result'' <- ((ManagedPtr Ref -> Ref) -> Ptr Ref -> IO Ref
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Ref -> Ref
Ggit.Ref.Ref) Ptr Ref
result'
Ref -> IO Ref
forall (m :: * -> *) a. Monad m => a -> m a
return Ref
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oid
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
logMessage'
Maybe Ref -> IO (Maybe Ref)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Ref
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
logMessage'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateReferenceMethodInfo
instance (signature ~ (T.Text -> Ggit.OId.OId -> T.Text -> m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateReferenceMethodInfo a signature where
overloadedMethod = repositoryCreateReference
#endif
foreign import ccall "ggit_repository_create_remote" ggit_repository_create_remote ::
Ptr Repository ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Remote.Remote)
repositoryCreateRemote ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> T.Text
-> m (Maybe Ggit.Remote.Remote)
repositoryCreateRemote :: a -> Text -> Text -> m (Maybe Remote)
repositoryCreateRemote a
repository Text
name Text
url = IO (Maybe Remote) -> m (Maybe Remote)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Remote) -> m (Maybe Remote))
-> IO (Maybe Remote) -> m (Maybe Remote)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
CString
url' <- Text -> IO CString
textToCString Text
url
IO (Maybe Remote) -> IO () -> IO (Maybe Remote)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Remote
result <- (Ptr (Ptr GError) -> IO (Ptr Remote)) -> IO (Ptr Remote)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Remote)) -> IO (Ptr Remote))
-> (Ptr (Ptr GError) -> IO (Ptr Remote)) -> IO (Ptr Remote)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> CString -> Ptr (Ptr GError) -> IO (Ptr Remote)
ggit_repository_create_remote Ptr Repository
repository' CString
name' CString
url'
Maybe Remote
maybeResult <- Ptr Remote -> (Ptr Remote -> IO Remote) -> IO (Maybe Remote)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Remote
result ((Ptr Remote -> IO Remote) -> IO (Maybe Remote))
-> (Ptr Remote -> IO Remote) -> IO (Maybe Remote)
forall a b. (a -> b) -> a -> b
$ \Ptr Remote
result' -> do
Remote
result'' <- ((ManagedPtr Remote -> Remote) -> Ptr Remote -> IO Remote
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Remote -> Remote
Ggit.Remote.Remote) Ptr Remote
result'
Remote -> IO Remote
forall (m :: * -> *) a. Monad m => a -> m a
return Remote
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
Maybe Remote -> IO (Maybe Remote)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Remote
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateRemoteMethodInfo
instance (signature ~ (T.Text -> T.Text -> m (Maybe Ggit.Remote.Remote)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateRemoteMethodInfo a signature where
overloadedMethod = repositoryCreateRemote
#endif
foreign import ccall "ggit_repository_create_symbolic_reference" ggit_repository_create_symbolic_reference ::
Ptr Repository ->
CString ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Ref.Ref)
repositoryCreateSymbolicReference ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> T.Text
-> T.Text
-> m (Maybe Ggit.Ref.Ref)
repositoryCreateSymbolicReference :: a -> Text -> Text -> Text -> m (Maybe Ref)
repositoryCreateSymbolicReference a
repository Text
name Text
target Text
logMessage = IO (Maybe Ref) -> m (Maybe Ref)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Ref) -> m (Maybe Ref))
-> IO (Maybe Ref) -> m (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
CString
target' <- Text -> IO CString
textToCString Text
target
CString
logMessage' <- Text -> IO CString
textToCString Text
logMessage
IO (Maybe Ref) -> IO () -> IO (Maybe Ref)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Ref
result <- (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref))
-> (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> CString
-> CString
-> Ptr (Ptr GError)
-> IO (Ptr Ref)
ggit_repository_create_symbolic_reference Ptr Repository
repository' CString
name' CString
target' CString
logMessage'
Maybe Ref
maybeResult <- Ptr Ref -> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Ref
result ((Ptr Ref -> IO Ref) -> IO (Maybe Ref))
-> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ \Ptr Ref
result' -> do
Ref
result'' <- ((ManagedPtr Ref -> Ref) -> Ptr Ref -> IO Ref
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Ref -> Ref
Ggit.Ref.Ref) Ptr Ref
result'
Ref -> IO Ref
forall (m :: * -> *) a. Monad m => a -> m a
return Ref
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
target'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
logMessage'
Maybe Ref -> IO (Maybe Ref)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Ref
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
target'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
logMessage'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateSymbolicReferenceMethodInfo
instance (signature ~ (T.Text -> T.Text -> T.Text -> m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateSymbolicReferenceMethodInfo a signature where
overloadedMethod = repositoryCreateSymbolicReference
#endif
foreign import ccall "ggit_repository_create_tag" ggit_repository_create_tag ::
Ptr Repository ->
CString ->
Ptr Ggit.Object.Object ->
Ptr Ggit.Signature.Signature ->
CString ->
CUInt ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.OId.OId)
repositoryCreateTag ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.Signature.IsSignature c) =>
a
-> T.Text
-> b
-> c
-> T.Text
-> [Ggit.Flags.CreateFlags]
-> m (Maybe Ggit.OId.OId)
repositoryCreateTag :: a -> Text -> b -> c -> Text -> [CreateFlags] -> m (Maybe OId)
repositoryCreateTag a
repository Text
tagName b
target c
tagger Text
message [CreateFlags]
flags = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
tagName' <- Text -> IO CString
textToCString Text
tagName
Ptr Object
target' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
Ptr Signature
tagger' <- c -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
tagger
CString
message' <- Text -> IO CString
textToCString Text
message
let flags' :: CUInt
flags' = [CreateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [CreateFlags]
flags
IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Object
-> Ptr Signature
-> CString
-> CUInt
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_create_tag Ptr Repository
repository' CString
tagName' Ptr Object
target' Ptr Signature
tagger' CString
message' CUInt
flags'
Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
tagger
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tagName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tagName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateTagMethodInfo
instance (signature ~ (T.Text -> b -> c -> T.Text -> [Ggit.Flags.CreateFlags] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.Signature.IsSignature c) => O.MethodInfo RepositoryCreateTagMethodInfo a signature where
overloadedMethod = repositoryCreateTag
#endif
foreign import ccall "ggit_repository_create_tag_annotation" ggit_repository_create_tag_annotation ::
Ptr Repository ->
CString ->
Ptr Ggit.Object.Object ->
Ptr Ggit.Signature.Signature ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.OId.OId)
repositoryCreateTagAnnotation ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.Signature.IsSignature c) =>
a
-> T.Text
-> b
-> c
-> T.Text
-> m (Maybe Ggit.OId.OId)
repositoryCreateTagAnnotation :: a -> Text -> b -> c -> Text -> m (Maybe OId)
repositoryCreateTagAnnotation a
repository Text
tagName b
target c
signature Text
message = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
tagName' <- Text -> IO CString
textToCString Text
tagName
Ptr Object
target' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
Ptr Signature
signature' <- c -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
signature
CString
message' <- Text -> IO CString
textToCString Text
message
IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Object
-> Ptr Signature
-> CString
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_create_tag_annotation Ptr Repository
repository' CString
tagName' Ptr Object
target' Ptr Signature
signature' CString
message'
Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
signature
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tagName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tagName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateTagAnnotationMethodInfo
instance (signature ~ (T.Text -> b -> c -> T.Text -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.Signature.IsSignature c) => O.MethodInfo RepositoryCreateTagAnnotationMethodInfo a signature where
overloadedMethod = repositoryCreateTagAnnotation
#endif
foreign import ccall "ggit_repository_create_tag_from_buffer" ggit_repository_create_tag_from_buffer ::
Ptr Repository ->
CString ->
CUInt ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.OId.OId)
repositoryCreateTagFromBuffer ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> [Ggit.Flags.CreateFlags]
-> m (Maybe Ggit.OId.OId)
repositoryCreateTagFromBuffer :: a -> Text -> [CreateFlags] -> m (Maybe OId)
repositoryCreateTagFromBuffer a
repository Text
tag [CreateFlags]
flags = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
tag' <- Text -> IO CString
textToCString Text
tag
let flags' :: CUInt
flags' = [CreateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [CreateFlags]
flags
IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> CUInt -> Ptr (Ptr GError) -> IO (Ptr OId)
ggit_repository_create_tag_from_buffer Ptr Repository
repository' CString
tag' CUInt
flags'
Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tag'
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tag'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateTagFromBufferMethodInfo
instance (signature ~ (T.Text -> [Ggit.Flags.CreateFlags] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateTagFromBufferMethodInfo a signature where
overloadedMethod = repositoryCreateTagFromBuffer
#endif
foreign import ccall "ggit_repository_create_tag_lightweight" ggit_repository_create_tag_lightweight ::
Ptr Repository ->
CString ->
Ptr Ggit.Object.Object ->
CUInt ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.OId.OId)
repositoryCreateTagLightweight ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b) =>
a
-> T.Text
-> b
-> [Ggit.Flags.CreateFlags]
-> m (Maybe Ggit.OId.OId)
repositoryCreateTagLightweight :: a -> Text -> b -> [CreateFlags] -> m (Maybe OId)
repositoryCreateTagLightweight a
repository Text
tagName b
target [CreateFlags]
flags = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
tagName' <- Text -> IO CString
textToCString Text
tagName
Ptr Object
target' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
let flags' :: CUInt
flags' = [CreateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [CreateFlags]
flags
IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Object
-> CUInt
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_create_tag_lightweight Ptr Repository
repository' CString
tagName' Ptr Object
target' CUInt
flags'
Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tagName'
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tagName'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateTagLightweightMethodInfo
instance (signature ~ (T.Text -> b -> [Ggit.Flags.CreateFlags] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Object.IsObject b) => O.MethodInfo RepositoryCreateTagLightweightMethodInfo a signature where
overloadedMethod = repositoryCreateTagLightweight
#endif
foreign import ccall "ggit_repository_create_tree_builder" ggit_repository_create_tree_builder ::
Ptr Repository ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.TreeBuilder.TreeBuilder)
repositoryCreateTreeBuilder ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m (Maybe Ggit.TreeBuilder.TreeBuilder)
repositoryCreateTreeBuilder :: a -> m (Maybe TreeBuilder)
repositoryCreateTreeBuilder a
repository = IO (Maybe TreeBuilder) -> m (Maybe TreeBuilder)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TreeBuilder) -> m (Maybe TreeBuilder))
-> IO (Maybe TreeBuilder) -> m (Maybe TreeBuilder)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
IO (Maybe TreeBuilder) -> IO () -> IO (Maybe TreeBuilder)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr TreeBuilder
result <- (Ptr (Ptr GError) -> IO (Ptr TreeBuilder)) -> IO (Ptr TreeBuilder)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr TreeBuilder))
-> IO (Ptr TreeBuilder))
-> (Ptr (Ptr GError) -> IO (Ptr TreeBuilder))
-> IO (Ptr TreeBuilder)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO (Ptr TreeBuilder)
ggit_repository_create_tree_builder Ptr Repository
repository'
Maybe TreeBuilder
maybeResult <- Ptr TreeBuilder
-> (Ptr TreeBuilder -> IO TreeBuilder) -> IO (Maybe TreeBuilder)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr TreeBuilder
result ((Ptr TreeBuilder -> IO TreeBuilder) -> IO (Maybe TreeBuilder))
-> (Ptr TreeBuilder -> IO TreeBuilder) -> IO (Maybe TreeBuilder)
forall a b. (a -> b) -> a -> b
$ \Ptr TreeBuilder
result' -> do
TreeBuilder
result'' <- ((ManagedPtr TreeBuilder -> TreeBuilder)
-> Ptr TreeBuilder -> IO TreeBuilder
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr TreeBuilder -> TreeBuilder
Ggit.TreeBuilder.TreeBuilder) Ptr TreeBuilder
result'
TreeBuilder -> IO TreeBuilder
forall (m :: * -> *) a. Monad m => a -> m a
return TreeBuilder
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe TreeBuilder -> IO (Maybe TreeBuilder)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TreeBuilder
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateTreeBuilderMethodInfo
instance (signature ~ (m (Maybe Ggit.TreeBuilder.TreeBuilder)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateTreeBuilderMethodInfo a signature where
overloadedMethod = repositoryCreateTreeBuilder
#endif
foreign import ccall "ggit_repository_create_tree_builder_from_tree" ggit_repository_create_tree_builder_from_tree ::
Ptr Repository ->
Ptr Ggit.Tree.Tree ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.TreeBuilder.TreeBuilder)
repositoryCreateTreeBuilderFromTree ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Tree.IsTree b) =>
a
-> b
-> m (Maybe Ggit.TreeBuilder.TreeBuilder)
repositoryCreateTreeBuilderFromTree :: a -> b -> m (Maybe TreeBuilder)
repositoryCreateTreeBuilderFromTree a
repository b
tree = IO (Maybe TreeBuilder) -> m (Maybe TreeBuilder)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TreeBuilder) -> m (Maybe TreeBuilder))
-> IO (Maybe TreeBuilder) -> m (Maybe TreeBuilder)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Tree
tree' <- b -> IO (Ptr Tree)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
tree
IO (Maybe TreeBuilder) -> IO () -> IO (Maybe TreeBuilder)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr TreeBuilder
result <- (Ptr (Ptr GError) -> IO (Ptr TreeBuilder)) -> IO (Ptr TreeBuilder)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr TreeBuilder))
-> IO (Ptr TreeBuilder))
-> (Ptr (Ptr GError) -> IO (Ptr TreeBuilder))
-> IO (Ptr TreeBuilder)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Tree -> Ptr (Ptr GError) -> IO (Ptr TreeBuilder)
ggit_repository_create_tree_builder_from_tree Ptr Repository
repository' Ptr Tree
tree'
Maybe TreeBuilder
maybeResult <- Ptr TreeBuilder
-> (Ptr TreeBuilder -> IO TreeBuilder) -> IO (Maybe TreeBuilder)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr TreeBuilder
result ((Ptr TreeBuilder -> IO TreeBuilder) -> IO (Maybe TreeBuilder))
-> (Ptr TreeBuilder -> IO TreeBuilder) -> IO (Maybe TreeBuilder)
forall a b. (a -> b) -> a -> b
$ \Ptr TreeBuilder
result' -> do
TreeBuilder
result'' <- ((ManagedPtr TreeBuilder -> TreeBuilder)
-> Ptr TreeBuilder -> IO TreeBuilder
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr TreeBuilder -> TreeBuilder
Ggit.TreeBuilder.TreeBuilder) Ptr TreeBuilder
result'
TreeBuilder -> IO TreeBuilder
forall (m :: * -> *) a. Monad m => a -> m a
return TreeBuilder
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
tree
Maybe TreeBuilder -> IO (Maybe TreeBuilder)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TreeBuilder
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryCreateTreeBuilderFromTreeMethodInfo
instance (signature ~ (b -> m (Maybe Ggit.TreeBuilder.TreeBuilder)), MonadIO m, IsRepository a, Ggit.Tree.IsTree b) => O.MethodInfo RepositoryCreateTreeBuilderFromTreeMethodInfo a signature where
overloadedMethod = repositoryCreateTreeBuilderFromTree
#endif
foreign import ccall "ggit_repository_delete_tag" ggit_repository_delete_tag ::
Ptr Repository ->
CString ->
Ptr (Ptr GError) ->
IO CInt
repositoryDeleteTag ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m ()
repositoryDeleteTag :: a -> Text -> m ()
repositoryDeleteTag a
repository Text
name = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO CInt
ggit_repository_delete_tag Ptr Repository
repository' CString
name'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryDeleteTagMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryDeleteTagMethodInfo a signature where
overloadedMethod = repositoryDeleteTag
#endif
foreign import ccall "ggit_repository_drop_stash" ggit_repository_drop_stash ::
Ptr Repository ->
Word64 ->
Ptr (Ptr GError) ->
IO ()
repositoryDropStash ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Word64
-> m ()
repositoryDropStash :: a -> Word64 -> m ()
repositoryDropStash a
repository Word64
index = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Word64 -> Ptr (Ptr GError) -> IO ()
ggit_repository_drop_stash Ptr Repository
repository' Word64
index
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryDropStashMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryDropStashMethodInfo a signature where
overloadedMethod = repositoryDropStash
#endif
foreign import ccall "ggit_repository_enumerate_branches" ggit_repository_enumerate_branches ::
Ptr Repository ->
CUInt ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.BranchEnumerator.BranchEnumerator)
repositoryEnumerateBranches ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.Enums.BranchType
-> m (Maybe Ggit.BranchEnumerator.BranchEnumerator)
repositoryEnumerateBranches :: a -> BranchType -> m (Maybe BranchEnumerator)
repositoryEnumerateBranches a
repository BranchType
listType = IO (Maybe BranchEnumerator) -> m (Maybe BranchEnumerator)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BranchEnumerator) -> m (Maybe BranchEnumerator))
-> IO (Maybe BranchEnumerator) -> m (Maybe BranchEnumerator)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
let listType' :: CUInt
listType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (BranchType -> Int) -> BranchType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BranchType -> Int
forall a. Enum a => a -> Int
fromEnum) BranchType
listType
IO (Maybe BranchEnumerator) -> IO () -> IO (Maybe BranchEnumerator)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr BranchEnumerator
result <- (Ptr (Ptr GError) -> IO (Ptr BranchEnumerator))
-> IO (Ptr BranchEnumerator)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr BranchEnumerator))
-> IO (Ptr BranchEnumerator))
-> (Ptr (Ptr GError) -> IO (Ptr BranchEnumerator))
-> IO (Ptr BranchEnumerator)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CUInt -> Ptr (Ptr GError) -> IO (Ptr BranchEnumerator)
ggit_repository_enumerate_branches Ptr Repository
repository' CUInt
listType'
Maybe BranchEnumerator
maybeResult <- Ptr BranchEnumerator
-> (Ptr BranchEnumerator -> IO BranchEnumerator)
-> IO (Maybe BranchEnumerator)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr BranchEnumerator
result ((Ptr BranchEnumerator -> IO BranchEnumerator)
-> IO (Maybe BranchEnumerator))
-> (Ptr BranchEnumerator -> IO BranchEnumerator)
-> IO (Maybe BranchEnumerator)
forall a b. (a -> b) -> a -> b
$ \Ptr BranchEnumerator
result' -> do
BranchEnumerator
result'' <- ((ManagedPtr BranchEnumerator -> BranchEnumerator)
-> Ptr BranchEnumerator -> IO BranchEnumerator
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BranchEnumerator -> BranchEnumerator
Ggit.BranchEnumerator.BranchEnumerator) Ptr BranchEnumerator
result'
BranchEnumerator -> IO BranchEnumerator
forall (m :: * -> *) a. Monad m => a -> m a
return BranchEnumerator
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe BranchEnumerator -> IO (Maybe BranchEnumerator)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BranchEnumerator
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryEnumerateBranchesMethodInfo
instance (signature ~ (Ggit.Enums.BranchType -> m (Maybe Ggit.BranchEnumerator.BranchEnumerator)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryEnumerateBranchesMethodInfo a signature where
overloadedMethod = repositoryEnumerateBranches
#endif
foreign import ccall "ggit_repository_file_status" ggit_repository_file_status ::
Ptr Repository ->
Ptr Gio.File.File ->
Ptr (Ptr GError) ->
IO CUInt
repositoryFileStatus ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Gio.File.IsFile b) =>
a
-> b
-> m [Ggit.Flags.StatusFlags]
repositoryFileStatus :: a -> b -> m [StatusFlags]
repositoryFileStatus a
repository b
location = IO [StatusFlags] -> m [StatusFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [StatusFlags] -> m [StatusFlags])
-> IO [StatusFlags] -> m [StatusFlags]
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr File
location' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
location
IO [StatusFlags] -> IO () -> IO [StatusFlags]
forall a b. IO a -> IO b -> IO a
onException (do
CUInt
result <- (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CUInt) -> IO CUInt)
-> (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr File -> Ptr (Ptr GError) -> IO CUInt
ggit_repository_file_status Ptr Repository
repository' Ptr File
location'
let result' :: [StatusFlags]
result' = CUInt -> [StatusFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
location
[StatusFlags] -> IO [StatusFlags]
forall (m :: * -> *) a. Monad m => a -> m a
return [StatusFlags]
result'
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryFileStatusMethodInfo
instance (signature ~ (b -> m [Ggit.Flags.StatusFlags]), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.MethodInfo RepositoryFileStatusMethodInfo a signature where
overloadedMethod = repositoryFileStatus
#endif
foreign import ccall "ggit_repository_file_status_foreach" ggit_repository_file_status_foreach ::
Ptr Repository ->
Ptr Ggit.StatusOptions.StatusOptions ->
FunPtr Ggit.Callbacks.C_StatusCallback ->
Ptr () ->
Ptr (Ptr GError) ->
IO CInt
repositoryFileStatusForeach ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Maybe (Ggit.StatusOptions.StatusOptions)
-> Ggit.Callbacks.StatusCallback
-> m ()
repositoryFileStatusForeach :: a -> Maybe StatusOptions -> StatusCallback -> m ()
repositoryFileStatusForeach a
repository Maybe StatusOptions
options StatusCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr StatusOptions
maybeOptions <- case Maybe StatusOptions
options of
Maybe StatusOptions
Nothing -> Ptr StatusOptions -> IO (Ptr StatusOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr StatusOptions
forall a. Ptr a
nullPtr
Just StatusOptions
jOptions -> do
Ptr StatusOptions
jOptions' <- StatusOptions -> IO (Ptr StatusOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr StatusOptions
jOptions
Ptr StatusOptions -> IO (Ptr StatusOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr StatusOptions
jOptions'
FunPtr C_StatusCallback
callback' <- C_StatusCallback -> IO (FunPtr C_StatusCallback)
Ggit.Callbacks.mk_StatusCallback (Maybe (Ptr (FunPtr C_StatusCallback))
-> StatusCallback_WithClosures -> C_StatusCallback
Ggit.Callbacks.wrap_StatusCallback Maybe (Ptr (FunPtr C_StatusCallback))
forall a. Maybe a
Nothing (StatusCallback -> StatusCallback_WithClosures
Ggit.Callbacks.drop_closures_StatusCallback StatusCallback
callback))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr StatusOptions
-> FunPtr C_StatusCallback
-> Ptr ()
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_file_status_foreach Ptr Repository
repository' Ptr StatusOptions
maybeOptions FunPtr C_StatusCallback
callback' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_StatusCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_StatusCallback
callback'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe StatusOptions -> (StatusOptions -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe StatusOptions
options StatusOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_StatusCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_StatusCallback
callback'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryFileStatusForeachMethodInfo
instance (signature ~ (Maybe (Ggit.StatusOptions.StatusOptions) -> Ggit.Callbacks.StatusCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryFileStatusForeachMethodInfo a signature where
overloadedMethod = repositoryFileStatusForeach
#endif
foreign import ccall "ggit_repository_get_ahead_behind" ggit_repository_get_ahead_behind ::
Ptr Repository ->
Ptr Ggit.OId.OId ->
Ptr Ggit.OId.OId ->
Ptr Word64 ->
Ptr Word64 ->
Ptr (Ptr GError) ->
IO ()
repositoryGetAheadBehind ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.OId.OId
-> Ggit.OId.OId
-> m ((Word64, Word64))
repositoryGetAheadBehind :: a -> OId -> OId -> m (Word64, Word64)
repositoryGetAheadBehind a
repository OId
local OId
upstream = IO (Word64, Word64) -> m (Word64, Word64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word64, Word64) -> m (Word64, Word64))
-> IO (Word64, Word64) -> m (Word64, Word64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr OId
local' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
local
Ptr OId
upstream' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
upstream
Ptr Word64
ahead <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr Word64
behind <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
IO (Word64, Word64) -> IO () -> IO (Word64, Word64)
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr OId
-> Ptr OId
-> Ptr Word64
-> Ptr Word64
-> Ptr (Ptr GError)
-> IO ()
ggit_repository_get_ahead_behind Ptr Repository
repository' Ptr OId
local' Ptr OId
upstream' Ptr Word64
ahead Ptr Word64
behind
Word64
ahead' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
ahead
Word64
behind' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
behind
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
local
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
upstream
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
ahead
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
behind
(Word64, Word64) -> IO (Word64, Word64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Word64
ahead', Word64
behind')
) (do
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
ahead
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
behind
)
#if defined(ENABLE_OVERLOADING)
data RepositoryGetAheadBehindMethodInfo
instance (signature ~ (Ggit.OId.OId -> Ggit.OId.OId -> m ((Word64, Word64))), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetAheadBehindMethodInfo a signature where
overloadedMethod = repositoryGetAheadBehind
#endif
foreign import ccall "ggit_repository_get_attribute" ggit_repository_get_attribute ::
Ptr Repository ->
CString ->
CString ->
CUInt ->
Ptr (Ptr GError) ->
IO CString
repositoryGetAttribute ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> T.Text
-> [Ggit.Flags.AttributeCheckFlags]
-> m (Maybe T.Text)
repositoryGetAttribute :: a -> Text -> Text -> [AttributeCheckFlags] -> m (Maybe Text)
repositoryGetAttribute a
repository Text
path Text
name [AttributeCheckFlags]
flags = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
path' <- Text -> IO CString
textToCString Text
path
CString
name' <- Text -> IO CString
textToCString Text
name
let flags' :: CUInt
flags' = [AttributeCheckFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [AttributeCheckFlags]
flags
IO (Maybe Text) -> IO () -> IO (Maybe Text)
forall a b. IO a -> IO b -> IO a
onException (do
CString
result <- (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CString) -> IO CString)
-> (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> CString -> CUInt -> Ptr (Ptr GError) -> IO CString
ggit_repository_get_attribute Ptr Repository
repository' CString
path' CString
name' CUInt
flags'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryGetAttributeMethodInfo
instance (signature ~ (T.Text -> T.Text -> [Ggit.Flags.AttributeCheckFlags] -> m (Maybe T.Text)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetAttributeMethodInfo a signature where
overloadedMethod = repositoryGetAttribute
#endif
foreign import ccall "ggit_repository_get_config" ggit_repository_get_config ::
Ptr Repository ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Config.Config)
repositoryGetConfig ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m (Maybe Ggit.Config.Config)
repositoryGetConfig :: a -> m (Maybe Config)
repositoryGetConfig a
repository = IO (Maybe Config) -> m (Maybe Config)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Config) -> m (Maybe Config))
-> IO (Maybe Config) -> m (Maybe Config)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
IO (Maybe Config) -> IO () -> IO (Maybe Config)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Config
result <- (Ptr (Ptr GError) -> IO (Ptr Config)) -> IO (Ptr Config)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Config)) -> IO (Ptr Config))
-> (Ptr (Ptr GError) -> IO (Ptr Config)) -> IO (Ptr Config)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO (Ptr Config)
ggit_repository_get_config Ptr Repository
repository'
Maybe Config
maybeResult <- Ptr Config -> (Ptr Config -> IO Config) -> IO (Maybe Config)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Config
result ((Ptr Config -> IO Config) -> IO (Maybe Config))
-> (Ptr Config -> IO Config) -> IO (Maybe Config)
forall a b. (a -> b) -> a -> b
$ \Ptr Config
result' -> do
Config
result'' <- ((ManagedPtr Config -> Config) -> Ptr Config -> IO Config
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Config -> Config
Ggit.Config.Config) Ptr Config
result'
Config -> IO Config
forall (m :: * -> *) a. Monad m => a -> m a
return Config
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe Config -> IO (Maybe Config)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Config
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryGetConfigMethodInfo
instance (signature ~ (m (Maybe Ggit.Config.Config)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetConfigMethodInfo a signature where
overloadedMethod = repositoryGetConfig
#endif
foreign import ccall "ggit_repository_get_default_notes_ref" ggit_repository_get_default_notes_ref ::
Ptr Repository ->
Ptr (Ptr GError) ->
IO CString
repositoryGetDefaultNotesRef ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m (Maybe T.Text)
repositoryGetDefaultNotesRef :: a -> m (Maybe Text)
repositoryGetDefaultNotesRef a
repository = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
IO (Maybe Text) -> IO () -> IO (Maybe Text)
forall a b. IO a -> IO b -> IO a
onException (do
CString
result <- (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CString) -> IO CString)
-> (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO CString
ggit_repository_get_default_notes_ref Ptr Repository
repository'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryGetDefaultNotesRefMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetDefaultNotesRefMethodInfo a signature where
overloadedMethod = repositoryGetDefaultNotesRef
#endif
foreign import ccall "ggit_repository_get_descendant_of" ggit_repository_get_descendant_of ::
Ptr Repository ->
Ptr Ggit.OId.OId ->
Ptr Ggit.OId.OId ->
Ptr (Ptr GError) ->
IO CInt
repositoryGetDescendantOf ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.OId.OId
-> Ggit.OId.OId
-> m ()
repositoryGetDescendantOf :: a -> OId -> OId -> m ()
repositoryGetDescendantOf a
repository OId
commit OId
ancestor = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr OId
commit' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
commit
Ptr OId
ancestor' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
ancestor
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr OId -> Ptr OId -> Ptr (Ptr GError) -> IO CInt
ggit_repository_get_descendant_of Ptr Repository
repository' Ptr OId
commit' Ptr OId
ancestor'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
commit
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
ancestor
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryGetDescendantOfMethodInfo
instance (signature ~ (Ggit.OId.OId -> Ggit.OId.OId -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetDescendantOfMethodInfo a signature where
overloadedMethod = repositoryGetDescendantOf
#endif
foreign import ccall "ggit_repository_get_head" ggit_repository_get_head ::
Ptr Repository ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Ref.Ref)
repositoryGetHead ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m (Maybe Ggit.Ref.Ref)
repositoryGetHead :: a -> m (Maybe Ref)
repositoryGetHead a
repository = IO (Maybe Ref) -> m (Maybe Ref)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Ref) -> m (Maybe Ref))
-> IO (Maybe Ref) -> m (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
IO (Maybe Ref) -> IO () -> IO (Maybe Ref)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Ref
result <- (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref))
-> (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO (Ptr Ref)
ggit_repository_get_head Ptr Repository
repository'
Maybe Ref
maybeResult <- Ptr Ref -> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Ref
result ((Ptr Ref -> IO Ref) -> IO (Maybe Ref))
-> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ \Ptr Ref
result' -> do
Ref
result'' <- ((ManagedPtr Ref -> Ref) -> Ptr Ref -> IO Ref
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Ref -> Ref
Ggit.Ref.Ref) Ptr Ref
result'
Ref -> IO Ref
forall (m :: * -> *) a. Monad m => a -> m a
return Ref
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe Ref -> IO (Maybe Ref)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Ref
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryGetHeadMethodInfo
instance (signature ~ (m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetHeadMethodInfo a signature where
overloadedMethod = repositoryGetHead
#endif
foreign import ccall "ggit_repository_get_index" ggit_repository_get_index ::
Ptr Repository ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Index.Index)
repositoryGetIndex ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m (Maybe Ggit.Index.Index)
repositoryGetIndex :: a -> m (Maybe Index)
repositoryGetIndex a
repository = IO (Maybe Index) -> m (Maybe Index)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Index) -> m (Maybe Index))
-> IO (Maybe Index) -> m (Maybe Index)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
IO (Maybe Index) -> IO () -> IO (Maybe Index)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Index
result <- (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index))
-> (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO (Ptr Index)
ggit_repository_get_index Ptr Repository
repository'
Maybe Index
maybeResult <- Ptr Index -> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Index
result ((Ptr Index -> IO Index) -> IO (Maybe Index))
-> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. (a -> b) -> a -> b
$ \Ptr Index
result' -> do
Index
result'' <- ((ManagedPtr Index -> Index) -> Ptr Index -> IO Index
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Index -> Index
Ggit.Index.Index) Ptr Index
result'
Index -> IO Index
forall (m :: * -> *) a. Monad m => a -> m a
return Index
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe Index -> IO (Maybe Index)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Index
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryGetIndexMethodInfo
instance (signature ~ (m (Maybe Ggit.Index.Index)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetIndexMethodInfo a signature where
overloadedMethod = repositoryGetIndex
#endif
foreign import ccall "ggit_repository_get_location" ggit_repository_get_location ::
Ptr Repository ->
IO (Ptr Gio.File.File)
repositoryGetLocation ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m (Maybe Gio.File.File)
repositoryGetLocation :: a -> m (Maybe File)
repositoryGetLocation a
repository = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr File
result <- Ptr Repository -> IO (Ptr File)
ggit_repository_get_location Ptr Repository
repository'
Maybe File
maybeResult <- Ptr File -> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr File
result ((Ptr File -> IO File) -> IO (Maybe File))
-> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
result' -> do
File
result'' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result'
File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe File -> IO (Maybe File)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
maybeResult
#if defined(ENABLE_OVERLOADING)
data RepositoryGetLocationMethodInfo
instance (signature ~ (m (Maybe Gio.File.File)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetLocationMethodInfo a signature where
overloadedMethod = repositoryGetLocation
#endif
foreign import ccall "ggit_repository_get_submodule_status" ggit_repository_get_submodule_status ::
Ptr Repository ->
CString ->
CInt ->
Ptr (Ptr GError) ->
IO CUInt
repositoryGetSubmoduleStatus ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> Ggit.Enums.SubmoduleIgnore
-> m [Ggit.Flags.SubmoduleStatus]
repositoryGetSubmoduleStatus :: a -> Text -> SubmoduleIgnore -> m [SubmoduleStatus]
repositoryGetSubmoduleStatus a
repository Text
name SubmoduleIgnore
ignore = IO [SubmoduleStatus] -> m [SubmoduleStatus]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [SubmoduleStatus] -> m [SubmoduleStatus])
-> IO [SubmoduleStatus] -> m [SubmoduleStatus]
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
let ignore' :: CInt
ignore' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> (SubmoduleIgnore -> Int) -> SubmoduleIgnore -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SubmoduleIgnore -> Int
forall a. Enum a => a -> Int
fromEnum) SubmoduleIgnore
ignore
IO [SubmoduleStatus] -> IO () -> IO [SubmoduleStatus]
forall a b. IO a -> IO b -> IO a
onException (do
CUInt
result <- (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CUInt) -> IO CUInt)
-> (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> CInt -> Ptr (Ptr GError) -> IO CUInt
ggit_repository_get_submodule_status Ptr Repository
repository' CString
name' CInt
ignore'
let result' :: [SubmoduleStatus]
result' = CUInt -> [SubmoduleStatus]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
[SubmoduleStatus] -> IO [SubmoduleStatus]
forall (m :: * -> *) a. Monad m => a -> m a
return [SubmoduleStatus]
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryGetSubmoduleStatusMethodInfo
instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleIgnore -> m [Ggit.Flags.SubmoduleStatus]), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetSubmoduleStatusMethodInfo a signature where
overloadedMethod = repositoryGetSubmoduleStatus
#endif
foreign import ccall "ggit_repository_get_workdir" ggit_repository_get_workdir ::
Ptr Repository ->
IO (Ptr Gio.File.File)
repositoryGetWorkdir ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m (Maybe Gio.File.File)
repositoryGetWorkdir :: a -> m (Maybe File)
repositoryGetWorkdir a
repository = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr File
result <- Ptr Repository -> IO (Ptr File)
ggit_repository_get_workdir Ptr Repository
repository'
Maybe File
maybeResult <- Ptr File -> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr File
result ((Ptr File -> IO File) -> IO (Maybe File))
-> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
result' -> do
File
result'' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result'
File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe File -> IO (Maybe File)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
maybeResult
#if defined(ENABLE_OVERLOADING)
data RepositoryGetWorkdirMethodInfo
instance (signature ~ (m (Maybe Gio.File.File)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetWorkdirMethodInfo a signature where
overloadedMethod = repositoryGetWorkdir
#endif
foreign import ccall "ggit_repository_is_bare" ggit_repository_is_bare ::
Ptr Repository ->
IO CInt
repositoryIsBare ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m Bool
repositoryIsBare :: a -> m Bool
repositoryIsBare a
repository = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CInt
result <- Ptr Repository -> IO CInt
ggit_repository_is_bare Ptr Repository
repository'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data RepositoryIsBareMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsRepository a) => O.MethodInfo RepositoryIsBareMethodInfo a signature where
overloadedMethod = repositoryIsBare
#endif
foreign import ccall "ggit_repository_is_empty" ggit_repository_is_empty ::
Ptr Repository ->
Ptr (Ptr GError) ->
IO CInt
repositoryIsEmpty ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m ()
repositoryIsEmpty :: a -> m ()
repositoryIsEmpty a
repository = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO CInt
ggit_repository_is_empty Ptr Repository
repository'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryIsEmptyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryIsEmptyMethodInfo a signature where
overloadedMethod = repositoryIsEmpty
#endif
foreign import ccall "ggit_repository_is_head_detached" ggit_repository_is_head_detached ::
Ptr Repository ->
Ptr (Ptr GError) ->
IO CInt
repositoryIsHeadDetached ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m ()
repositoryIsHeadDetached :: a -> m ()
repositoryIsHeadDetached a
repository = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO CInt
ggit_repository_is_head_detached Ptr Repository
repository'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryIsHeadDetachedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryIsHeadDetachedMethodInfo a signature where
overloadedMethod = repositoryIsHeadDetached
#endif
foreign import ccall "ggit_repository_is_head_unborn" ggit_repository_is_head_unborn ::
Ptr Repository ->
Ptr (Ptr GError) ->
IO CInt
repositoryIsHeadUnborn ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m ()
repositoryIsHeadUnborn :: a -> m ()
repositoryIsHeadUnborn a
repository = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO CInt
ggit_repository_is_head_unborn Ptr Repository
repository'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryIsHeadUnbornMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryIsHeadUnbornMethodInfo a signature where
overloadedMethod = repositoryIsHeadUnborn
#endif
foreign import ccall "ggit_repository_list_remotes" ggit_repository_list_remotes ::
Ptr Repository ->
Ptr (Ptr GError) ->
IO (Ptr CString)
repositoryListRemotes ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m (Maybe [T.Text])
repositoryListRemotes :: a -> m (Maybe [Text])
repositoryListRemotes a
repository = IO (Maybe [Text]) -> m (Maybe [Text])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Text]) -> m (Maybe [Text]))
-> IO (Maybe [Text]) -> m (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
IO (Maybe [Text]) -> IO () -> IO (Maybe [Text])
forall a b. IO a -> IO b -> IO a
onException (do
Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO (Ptr CString)
ggit_repository_list_remotes Ptr Repository
repository'
Maybe [Text]
maybeResult <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CString
result ((Ptr CString -> IO [Text]) -> IO (Maybe [Text]))
-> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr CString
result' -> do
[Text]
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe [Text] -> IO (Maybe [Text])
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Text]
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryListRemotesMethodInfo
instance (signature ~ (m (Maybe [T.Text])), MonadIO m, IsRepository a) => O.MethodInfo RepositoryListRemotesMethodInfo a signature where
overloadedMethod = repositoryListRemotes
#endif
foreign import ccall "ggit_repository_list_tags" ggit_repository_list_tags ::
Ptr Repository ->
Ptr (Ptr GError) ->
IO (Ptr CString)
repositoryListTags ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m (Maybe [T.Text])
repositoryListTags :: a -> m (Maybe [Text])
repositoryListTags a
repository = IO (Maybe [Text]) -> m (Maybe [Text])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Text]) -> m (Maybe [Text]))
-> IO (Maybe [Text]) -> m (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
IO (Maybe [Text]) -> IO () -> IO (Maybe [Text])
forall a b. IO a -> IO b -> IO a
onException (do
Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO (Ptr CString)
ggit_repository_list_tags Ptr Repository
repository'
Maybe [Text]
maybeResult <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CString
result ((Ptr CString -> IO [Text]) -> IO (Maybe [Text]))
-> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr CString
result' -> do
[Text]
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe [Text] -> IO (Maybe [Text])
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Text]
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryListTagsMethodInfo
instance (signature ~ (m (Maybe [T.Text])), MonadIO m, IsRepository a) => O.MethodInfo RepositoryListTagsMethodInfo a signature where
overloadedMethod = repositoryListTags
#endif
foreign import ccall "ggit_repository_list_tags_match" ggit_repository_list_tags_match ::
Ptr Repository ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr CString)
repositoryListTagsMatch ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Maybe (T.Text)
-> m (Maybe [T.Text])
repositoryListTagsMatch :: a -> Maybe Text -> m (Maybe [Text])
repositoryListTagsMatch a
repository Maybe Text
pattern = IO (Maybe [Text]) -> m (Maybe [Text])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Text]) -> m (Maybe [Text]))
-> IO (Maybe [Text]) -> m (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
maybePattern <- case Maybe Text
pattern of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jPattern -> do
CString
jPattern' <- Text -> IO CString
textToCString Text
jPattern
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jPattern'
IO (Maybe [Text]) -> IO () -> IO (Maybe [Text])
forall a b. IO a -> IO b -> IO a
onException (do
Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr CString)
ggit_repository_list_tags_match Ptr Repository
repository' CString
maybePattern
Maybe [Text]
maybeResult <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CString
result ((Ptr CString -> IO [Text]) -> IO (Maybe [Text]))
-> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr CString
result' -> do
[Text]
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePattern
Maybe [Text] -> IO (Maybe [Text])
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Text]
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePattern
)
#if defined(ENABLE_OVERLOADING)
data RepositoryListTagsMatchMethodInfo
instance (signature ~ (Maybe (T.Text) -> m (Maybe [T.Text])), MonadIO m, IsRepository a) => O.MethodInfo RepositoryListTagsMatchMethodInfo a signature where
overloadedMethod = repositoryListTagsMatch
#endif
foreign import ccall "ggit_repository_lookup" ggit_repository_lookup ::
Ptr Repository ->
Ptr Ggit.OId.OId ->
CGType ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Object.Object)
repositoryLookup ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.OId.OId
-> GType
-> m (Maybe Ggit.Object.Object)
repositoryLookup :: a -> OId -> GType -> m (Maybe Object)
repositoryLookup a
repository OId
oid GType
gtype = IO (Maybe Object) -> m (Maybe Object)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Object) -> m (Maybe Object))
-> IO (Maybe Object) -> m (Maybe Object)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr OId
oid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oid
let gtype' :: Word64
gtype' = GType -> Word64
gtypeToCGType GType
gtype
IO (Maybe Object) -> IO () -> IO (Maybe Object)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Object
result <- (Ptr (Ptr GError) -> IO (Ptr Object)) -> IO (Ptr Object)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Object)) -> IO (Ptr Object))
-> (Ptr (Ptr GError) -> IO (Ptr Object)) -> IO (Ptr Object)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr OId -> Word64 -> Ptr (Ptr GError) -> IO (Ptr Object)
ggit_repository_lookup Ptr Repository
repository' Ptr OId
oid' Word64
gtype'
Maybe Object
maybeResult <- Ptr Object -> (Ptr Object -> IO Object) -> IO (Maybe Object)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Object
result ((Ptr Object -> IO Object) -> IO (Maybe Object))
-> (Ptr Object -> IO Object) -> IO (Maybe Object)
forall a b. (a -> b) -> a -> b
$ \Ptr Object
result' -> do
Object
result'' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Object -> Object
Ggit.Object.Object) Ptr Object
result'
Object -> IO Object
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oid
Maybe Object -> IO (Maybe Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Object
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryLookupMethodInfo
instance (signature ~ (Ggit.OId.OId -> GType -> m (Maybe Ggit.Object.Object)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupMethodInfo a signature where
overloadedMethod = repositoryLookup
#endif
foreign import ccall "ggit_repository_lookup_blob" ggit_repository_lookup_blob ::
Ptr Repository ->
Ptr Ggit.OId.OId ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Blob.Blob)
repositoryLookupBlob ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.OId.OId
-> m (Maybe Ggit.Blob.Blob)
repositoryLookupBlob :: a -> OId -> m (Maybe Blob)
repositoryLookupBlob a
repository OId
oid = IO (Maybe Blob) -> m (Maybe Blob)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Blob) -> m (Maybe Blob))
-> IO (Maybe Blob) -> m (Maybe Blob)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr OId
oid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oid
IO (Maybe Blob) -> IO () -> IO (Maybe Blob)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Blob
result <- (Ptr (Ptr GError) -> IO (Ptr Blob)) -> IO (Ptr Blob)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Blob)) -> IO (Ptr Blob))
-> (Ptr (Ptr GError) -> IO (Ptr Blob)) -> IO (Ptr Blob)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr Blob)
ggit_repository_lookup_blob Ptr Repository
repository' Ptr OId
oid'
Maybe Blob
maybeResult <- Ptr Blob -> (Ptr Blob -> IO Blob) -> IO (Maybe Blob)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Blob
result ((Ptr Blob -> IO Blob) -> IO (Maybe Blob))
-> (Ptr Blob -> IO Blob) -> IO (Maybe Blob)
forall a b. (a -> b) -> a -> b
$ \Ptr Blob
result' -> do
Blob
result'' <- ((ManagedPtr Blob -> Blob) -> Ptr Blob -> IO Blob
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Blob -> Blob
Ggit.Blob.Blob) Ptr Blob
result'
Blob -> IO Blob
forall (m :: * -> *) a. Monad m => a -> m a
return Blob
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oid
Maybe Blob -> IO (Maybe Blob)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Blob
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryLookupBlobMethodInfo
instance (signature ~ (Ggit.OId.OId -> m (Maybe Ggit.Blob.Blob)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupBlobMethodInfo a signature where
overloadedMethod = repositoryLookupBlob
#endif
foreign import ccall "ggit_repository_lookup_branch" ggit_repository_lookup_branch ::
Ptr Repository ->
CString ->
CUInt ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Branch.Branch)
repositoryLookupBranch ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> Ggit.Enums.BranchType
-> m (Maybe Ggit.Branch.Branch)
repositoryLookupBranch :: a -> Text -> BranchType -> m (Maybe Branch)
repositoryLookupBranch a
repository Text
branchName BranchType
branchType = IO (Maybe Branch) -> m (Maybe Branch)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Branch) -> m (Maybe Branch))
-> IO (Maybe Branch) -> m (Maybe Branch)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
branchName' <- Text -> IO CString
textToCString Text
branchName
let branchType' :: CUInt
branchType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (BranchType -> Int) -> BranchType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BranchType -> Int
forall a. Enum a => a -> Int
fromEnum) BranchType
branchType
IO (Maybe Branch) -> IO () -> IO (Maybe Branch)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Branch
result <- (Ptr (Ptr GError) -> IO (Ptr Branch)) -> IO (Ptr Branch)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Branch)) -> IO (Ptr Branch))
-> (Ptr (Ptr GError) -> IO (Ptr Branch)) -> IO (Ptr Branch)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> CUInt -> Ptr (Ptr GError) -> IO (Ptr Branch)
ggit_repository_lookup_branch Ptr Repository
repository' CString
branchName' CUInt
branchType'
Maybe Branch
maybeResult <- Ptr Branch -> (Ptr Branch -> IO Branch) -> IO (Maybe Branch)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Branch
result ((Ptr Branch -> IO Branch) -> IO (Maybe Branch))
-> (Ptr Branch -> IO Branch) -> IO (Maybe Branch)
forall a b. (a -> b) -> a -> b
$ \Ptr Branch
result' -> do
Branch
result'' <- ((ManagedPtr Branch -> Branch) -> Ptr Branch -> IO Branch
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Branch -> Branch
Ggit.Branch.Branch) Ptr Branch
result'
Branch -> IO Branch
forall (m :: * -> *) a. Monad m => a -> m a
return Branch
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
branchName'
Maybe Branch -> IO (Maybe Branch)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Branch
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
branchName'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryLookupBranchMethodInfo
instance (signature ~ (T.Text -> Ggit.Enums.BranchType -> m (Maybe Ggit.Branch.Branch)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupBranchMethodInfo a signature where
overloadedMethod = repositoryLookupBranch
#endif
foreign import ccall "ggit_repository_lookup_commit" ggit_repository_lookup_commit ::
Ptr Repository ->
Ptr Ggit.OId.OId ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Commit.Commit)
repositoryLookupCommit ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.OId.OId
-> m (Maybe Ggit.Commit.Commit)
repositoryLookupCommit :: a -> OId -> m (Maybe Commit)
repositoryLookupCommit a
repository OId
oid = IO (Maybe Commit) -> m (Maybe Commit)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Commit) -> m (Maybe Commit))
-> IO (Maybe Commit) -> m (Maybe Commit)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr OId
oid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oid
IO (Maybe Commit) -> IO () -> IO (Maybe Commit)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Commit
result <- (Ptr (Ptr GError) -> IO (Ptr Commit)) -> IO (Ptr Commit)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Commit)) -> IO (Ptr Commit))
-> (Ptr (Ptr GError) -> IO (Ptr Commit)) -> IO (Ptr Commit)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr Commit)
ggit_repository_lookup_commit Ptr Repository
repository' Ptr OId
oid'
Maybe Commit
maybeResult <- Ptr Commit -> (Ptr Commit -> IO Commit) -> IO (Maybe Commit)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Commit
result ((Ptr Commit -> IO Commit) -> IO (Maybe Commit))
-> (Ptr Commit -> IO Commit) -> IO (Maybe Commit)
forall a b. (a -> b) -> a -> b
$ \Ptr Commit
result' -> do
Commit
result'' <- ((ManagedPtr Commit -> Commit) -> Ptr Commit -> IO Commit
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Commit -> Commit
Ggit.Commit.Commit) Ptr Commit
result'
Commit -> IO Commit
forall (m :: * -> *) a. Monad m => a -> m a
return Commit
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oid
Maybe Commit -> IO (Maybe Commit)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Commit
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryLookupCommitMethodInfo
instance (signature ~ (Ggit.OId.OId -> m (Maybe Ggit.Commit.Commit)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupCommitMethodInfo a signature where
overloadedMethod = repositoryLookupCommit
#endif
foreign import ccall "ggit_repository_lookup_reference" ggit_repository_lookup_reference ::
Ptr Repository ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Ref.Ref)
repositoryLookupReference ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m (Maybe Ggit.Ref.Ref)
repositoryLookupReference :: a -> Text -> m (Maybe Ref)
repositoryLookupReference a
repository Text
name = IO (Maybe Ref) -> m (Maybe Ref)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Ref) -> m (Maybe Ref))
-> IO (Maybe Ref) -> m (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
IO (Maybe Ref) -> IO () -> IO (Maybe Ref)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Ref
result <- (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref))
-> (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr Ref)
ggit_repository_lookup_reference Ptr Repository
repository' CString
name'
Maybe Ref
maybeResult <- Ptr Ref -> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Ref
result ((Ptr Ref -> IO Ref) -> IO (Maybe Ref))
-> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ \Ptr Ref
result' -> do
Ref
result'' <- ((ManagedPtr Ref -> Ref) -> Ptr Ref -> IO Ref
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Ref -> Ref
Ggit.Ref.Ref) Ptr Ref
result'
Ref -> IO Ref
forall (m :: * -> *) a. Monad m => a -> m a
return Ref
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Maybe Ref -> IO (Maybe Ref)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Ref
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryLookupReferenceMethodInfo
instance (signature ~ (T.Text -> m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupReferenceMethodInfo a signature where
overloadedMethod = repositoryLookupReference
#endif
foreign import ccall "ggit_repository_lookup_reference_dwim" ggit_repository_lookup_reference_dwim ::
Ptr Repository ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Ref.Ref)
repositoryLookupReferenceDwim ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m (Maybe Ggit.Ref.Ref)
repositoryLookupReferenceDwim :: a -> Text -> m (Maybe Ref)
repositoryLookupReferenceDwim a
repository Text
shortName = IO (Maybe Ref) -> m (Maybe Ref)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Ref) -> m (Maybe Ref))
-> IO (Maybe Ref) -> m (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
shortName' <- Text -> IO CString
textToCString Text
shortName
IO (Maybe Ref) -> IO () -> IO (Maybe Ref)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Ref
result <- (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref))
-> (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr Ref)
ggit_repository_lookup_reference_dwim Ptr Repository
repository' CString
shortName'
Maybe Ref
maybeResult <- Ptr Ref -> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Ref
result ((Ptr Ref -> IO Ref) -> IO (Maybe Ref))
-> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ \Ptr Ref
result' -> do
Ref
result'' <- ((ManagedPtr Ref -> Ref) -> Ptr Ref -> IO Ref
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Ref -> Ref
Ggit.Ref.Ref) Ptr Ref
result'
Ref -> IO Ref
forall (m :: * -> *) a. Monad m => a -> m a
return Ref
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
shortName'
Maybe Ref -> IO (Maybe Ref)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Ref
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
shortName'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryLookupReferenceDwimMethodInfo
instance (signature ~ (T.Text -> m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupReferenceDwimMethodInfo a signature where
overloadedMethod = repositoryLookupReferenceDwim
#endif
foreign import ccall "ggit_repository_lookup_remote" ggit_repository_lookup_remote ::
Ptr Repository ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Remote.Remote)
repositoryLookupRemote ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m (Maybe Ggit.Remote.Remote)
repositoryLookupRemote :: a -> Text -> m (Maybe Remote)
repositoryLookupRemote a
repository Text
name = IO (Maybe Remote) -> m (Maybe Remote)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Remote) -> m (Maybe Remote))
-> IO (Maybe Remote) -> m (Maybe Remote)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
IO (Maybe Remote) -> IO () -> IO (Maybe Remote)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Remote
result <- (Ptr (Ptr GError) -> IO (Ptr Remote)) -> IO (Ptr Remote)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Remote)) -> IO (Ptr Remote))
-> (Ptr (Ptr GError) -> IO (Ptr Remote)) -> IO (Ptr Remote)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr Remote)
ggit_repository_lookup_remote Ptr Repository
repository' CString
name'
Maybe Remote
maybeResult <- Ptr Remote -> (Ptr Remote -> IO Remote) -> IO (Maybe Remote)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Remote
result ((Ptr Remote -> IO Remote) -> IO (Maybe Remote))
-> (Ptr Remote -> IO Remote) -> IO (Maybe Remote)
forall a b. (a -> b) -> a -> b
$ \Ptr Remote
result' -> do
Remote
result'' <- ((ManagedPtr Remote -> Remote) -> Ptr Remote -> IO Remote
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Remote -> Remote
Ggit.Remote.Remote) Ptr Remote
result'
Remote -> IO Remote
forall (m :: * -> *) a. Monad m => a -> m a
return Remote
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Maybe Remote -> IO (Maybe Remote)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Remote
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryLookupRemoteMethodInfo
instance (signature ~ (T.Text -> m (Maybe Ggit.Remote.Remote)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupRemoteMethodInfo a signature where
overloadedMethod = repositoryLookupRemote
#endif
foreign import ccall "ggit_repository_lookup_submodule" ggit_repository_lookup_submodule ::
Ptr Repository ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Submodule.Submodule)
repositoryLookupSubmodule ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m (Maybe Ggit.Submodule.Submodule)
repositoryLookupSubmodule :: a -> Text -> m (Maybe Submodule)
repositoryLookupSubmodule a
repository Text
name = IO (Maybe Submodule) -> m (Maybe Submodule)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Submodule) -> m (Maybe Submodule))
-> IO (Maybe Submodule) -> m (Maybe Submodule)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
IO (Maybe Submodule) -> IO () -> IO (Maybe Submodule)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Submodule
result <- (Ptr (Ptr GError) -> IO (Ptr Submodule)) -> IO (Ptr Submodule)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Submodule)) -> IO (Ptr Submodule))
-> (Ptr (Ptr GError) -> IO (Ptr Submodule)) -> IO (Ptr Submodule)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr Submodule)
ggit_repository_lookup_submodule Ptr Repository
repository' CString
name'
Maybe Submodule
maybeResult <- Ptr Submodule
-> (Ptr Submodule -> IO Submodule) -> IO (Maybe Submodule)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Submodule
result ((Ptr Submodule -> IO Submodule) -> IO (Maybe Submodule))
-> (Ptr Submodule -> IO Submodule) -> IO (Maybe Submodule)
forall a b. (a -> b) -> a -> b
$ \Ptr Submodule
result' -> do
Submodule
result'' <- ((ManagedPtr Submodule -> Submodule)
-> Ptr Submodule -> IO Submodule
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Submodule -> Submodule
Ggit.Submodule.Submodule) Ptr Submodule
result'
Submodule -> IO Submodule
forall (m :: * -> *) a. Monad m => a -> m a
return Submodule
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Maybe Submodule -> IO (Maybe Submodule)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Submodule
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryLookupSubmoduleMethodInfo
instance (signature ~ (T.Text -> m (Maybe Ggit.Submodule.Submodule)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupSubmoduleMethodInfo a signature where
overloadedMethod = repositoryLookupSubmodule
#endif
foreign import ccall "ggit_repository_lookup_tag" ggit_repository_lookup_tag ::
Ptr Repository ->
Ptr Ggit.OId.OId ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Tag.Tag)
repositoryLookupTag ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.OId.OId
-> m (Maybe Ggit.Tag.Tag)
repositoryLookupTag :: a -> OId -> m (Maybe Tag)
repositoryLookupTag a
repository OId
oid = IO (Maybe Tag) -> m (Maybe Tag)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Tag) -> m (Maybe Tag))
-> IO (Maybe Tag) -> m (Maybe Tag)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr OId
oid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oid
IO (Maybe Tag) -> IO () -> IO (Maybe Tag)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Tag
result <- (Ptr (Ptr GError) -> IO (Ptr Tag)) -> IO (Ptr Tag)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Tag)) -> IO (Ptr Tag))
-> (Ptr (Ptr GError) -> IO (Ptr Tag)) -> IO (Ptr Tag)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr Tag)
ggit_repository_lookup_tag Ptr Repository
repository' Ptr OId
oid'
Maybe Tag
maybeResult <- Ptr Tag -> (Ptr Tag -> IO Tag) -> IO (Maybe Tag)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Tag
result ((Ptr Tag -> IO Tag) -> IO (Maybe Tag))
-> (Ptr Tag -> IO Tag) -> IO (Maybe Tag)
forall a b. (a -> b) -> a -> b
$ \Ptr Tag
result' -> do
Tag
result'' <- ((ManagedPtr Tag -> Tag) -> Ptr Tag -> IO Tag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Tag -> Tag
Ggit.Tag.Tag) Ptr Tag
result'
Tag -> IO Tag
forall (m :: * -> *) a. Monad m => a -> m a
return Tag
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oid
Maybe Tag -> IO (Maybe Tag)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Tag
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryLookupTagMethodInfo
instance (signature ~ (Ggit.OId.OId -> m (Maybe Ggit.Tag.Tag)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupTagMethodInfo a signature where
overloadedMethod = repositoryLookupTag
#endif
foreign import ccall "ggit_repository_lookup_tree" ggit_repository_lookup_tree ::
Ptr Repository ->
Ptr Ggit.OId.OId ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Tree.Tree)
repositoryLookupTree ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.OId.OId
-> m (Maybe Ggit.Tree.Tree)
repositoryLookupTree :: a -> OId -> m (Maybe Tree)
repositoryLookupTree a
repository OId
oid = IO (Maybe Tree) -> m (Maybe Tree)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Tree) -> m (Maybe Tree))
-> IO (Maybe Tree) -> m (Maybe Tree)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr OId
oid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oid
IO (Maybe Tree) -> IO () -> IO (Maybe Tree)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Tree
result <- (Ptr (Ptr GError) -> IO (Ptr Tree)) -> IO (Ptr Tree)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Tree)) -> IO (Ptr Tree))
-> (Ptr (Ptr GError) -> IO (Ptr Tree)) -> IO (Ptr Tree)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr Tree)
ggit_repository_lookup_tree Ptr Repository
repository' Ptr OId
oid'
Maybe Tree
maybeResult <- Ptr Tree -> (Ptr Tree -> IO Tree) -> IO (Maybe Tree)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Tree
result ((Ptr Tree -> IO Tree) -> IO (Maybe Tree))
-> (Ptr Tree -> IO Tree) -> IO (Maybe Tree)
forall a b. (a -> b) -> a -> b
$ \Ptr Tree
result' -> do
Tree
result'' <- ((ManagedPtr Tree -> Tree) -> Ptr Tree -> IO Tree
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Tree -> Tree
Ggit.Tree.Tree) Ptr Tree
result'
Tree -> IO Tree
forall (m :: * -> *) a. Monad m => a -> m a
return Tree
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oid
Maybe Tree -> IO (Maybe Tree)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Tree
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryLookupTreeMethodInfo
instance (signature ~ (Ggit.OId.OId -> m (Maybe Ggit.Tree.Tree)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupTreeMethodInfo a signature where
overloadedMethod = repositoryLookupTree
#endif
foreign import ccall "ggit_repository_merge" ggit_repository_merge ::
Ptr Repository ->
Ptr (Ptr Ggit.AnnotatedCommit.AnnotatedCommit) ->
Word64 ->
Ptr Ggit.MergeOptions.MergeOptions ->
Ptr Ggit.CheckoutOptions.CheckoutOptions ->
Ptr (Ptr GError) ->
IO ()
repositoryMerge ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.CheckoutOptions.IsCheckoutOptions b) =>
a
-> [Ggit.AnnotatedCommit.AnnotatedCommit]
-> Ggit.MergeOptions.MergeOptions
-> b
-> m ()
repositoryMerge :: a -> [AnnotatedCommit] -> MergeOptions -> b -> m ()
repositoryMerge a
repository [AnnotatedCommit]
theirHeads MergeOptions
mergeOpts b
checkoutOpts = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
let theirHeadsLength :: Word64
theirHeadsLength = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ [AnnotatedCommit] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [AnnotatedCommit]
theirHeads
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
[Ptr AnnotatedCommit]
theirHeads' <- (AnnotatedCommit -> IO (Ptr AnnotatedCommit))
-> [AnnotatedCommit] -> IO [Ptr AnnotatedCommit]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [AnnotatedCommit]
theirHeads
Ptr (Ptr AnnotatedCommit)
theirHeads'' <- [Ptr AnnotatedCommit] -> IO (Ptr (Ptr AnnotatedCommit))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packPtrArray [Ptr AnnotatedCommit]
theirHeads'
Ptr MergeOptions
mergeOpts' <- MergeOptions -> IO (Ptr MergeOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MergeOptions
mergeOpts
Ptr CheckoutOptions
checkoutOpts' <- b -> IO (Ptr CheckoutOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
checkoutOpts
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr (Ptr AnnotatedCommit)
-> Word64
-> Ptr MergeOptions
-> Ptr CheckoutOptions
-> Ptr (Ptr GError)
-> IO ()
ggit_repository_merge Ptr Repository
repository' Ptr (Ptr AnnotatedCommit)
theirHeads'' Word64
theirHeadsLength Ptr MergeOptions
mergeOpts' Ptr CheckoutOptions
checkoutOpts'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
(AnnotatedCommit -> IO ()) -> [AnnotatedCommit] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ AnnotatedCommit -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [AnnotatedCommit]
theirHeads
MergeOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MergeOptions
mergeOpts
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
checkoutOpts
Ptr (Ptr AnnotatedCommit) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr AnnotatedCommit)
theirHeads''
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
Ptr (Ptr AnnotatedCommit) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr AnnotatedCommit)
theirHeads''
)
#if defined(ENABLE_OVERLOADING)
data RepositoryMergeMethodInfo
instance (signature ~ ([Ggit.AnnotatedCommit.AnnotatedCommit] -> Ggit.MergeOptions.MergeOptions -> b -> m ()), MonadIO m, IsRepository a, Ggit.CheckoutOptions.IsCheckoutOptions b) => O.MethodInfo RepositoryMergeMethodInfo a signature where
overloadedMethod = repositoryMerge
#endif
foreign import ccall "ggit_repository_merge_base" ggit_repository_merge_base ::
Ptr Repository ->
Ptr Ggit.OId.OId ->
Ptr Ggit.OId.OId ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.OId.OId)
repositoryMergeBase ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.OId.OId
-> Ggit.OId.OId
-> m (Maybe Ggit.OId.OId)
repositoryMergeBase :: a -> OId -> OId -> m (Maybe OId)
repositoryMergeBase a
repository OId
oidOne OId
oidTwo = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr OId
oidOne' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oidOne
Ptr OId
oidTwo' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oidTwo
IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr OId -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr OId)
ggit_repository_merge_base Ptr Repository
repository' Ptr OId
oidOne' Ptr OId
oidTwo'
Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oidOne
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oidTwo
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryMergeBaseMethodInfo
instance (signature ~ (Ggit.OId.OId -> Ggit.OId.OId -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryMergeBaseMethodInfo a signature where
overloadedMethod = repositoryMergeBase
#endif
foreign import ccall "ggit_repository_merge_commits" ggit_repository_merge_commits ::
Ptr Repository ->
Ptr Ggit.Commit.Commit ->
Ptr Ggit.Commit.Commit ->
Ptr Ggit.MergeOptions.MergeOptions ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Index.Index)
repositoryMergeCommits ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.Commit.IsCommit c) =>
a
-> b
-> c
-> Ggit.MergeOptions.MergeOptions
-> m (Maybe Ggit.Index.Index)
repositoryMergeCommits :: a -> b -> c -> MergeOptions -> m (Maybe Index)
repositoryMergeCommits a
repository b
ourCommit c
theirCommit MergeOptions
mergeOptions = IO (Maybe Index) -> m (Maybe Index)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Index) -> m (Maybe Index))
-> IO (Maybe Index) -> m (Maybe Index)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Commit
ourCommit' <- b -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
ourCommit
Ptr Commit
theirCommit' <- c -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
theirCommit
Ptr MergeOptions
mergeOptions' <- MergeOptions -> IO (Ptr MergeOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MergeOptions
mergeOptions
IO (Maybe Index) -> IO () -> IO (Maybe Index)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Index
result <- (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index))
-> (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Commit
-> Ptr Commit
-> Ptr MergeOptions
-> Ptr (Ptr GError)
-> IO (Ptr Index)
ggit_repository_merge_commits Ptr Repository
repository' Ptr Commit
ourCommit' Ptr Commit
theirCommit' Ptr MergeOptions
mergeOptions'
Maybe Index
maybeResult <- Ptr Index -> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Index
result ((Ptr Index -> IO Index) -> IO (Maybe Index))
-> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. (a -> b) -> a -> b
$ \Ptr Index
result' -> do
Index
result'' <- ((ManagedPtr Index -> Index) -> Ptr Index -> IO Index
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Index -> Index
Ggit.Index.Index) Ptr Index
result'
Index -> IO Index
forall (m :: * -> *) a. Monad m => a -> m a
return Index
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
ourCommit
c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
theirCommit
MergeOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MergeOptions
mergeOptions
Maybe Index -> IO (Maybe Index)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Index
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryMergeCommitsMethodInfo
instance (signature ~ (b -> c -> Ggit.MergeOptions.MergeOptions -> m (Maybe Ggit.Index.Index)), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.Commit.IsCommit c) => O.MethodInfo RepositoryMergeCommitsMethodInfo a signature where
overloadedMethod = repositoryMergeCommits
#endif
foreign import ccall "ggit_repository_merge_trees" ggit_repository_merge_trees ::
Ptr Repository ->
Ptr Ggit.Tree.Tree ->
Ptr Ggit.Tree.Tree ->
Ptr Ggit.Tree.Tree ->
Ptr Ggit.MergeOptions.MergeOptions ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Index.Index)
repositoryMergeTrees ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Tree.IsTree b, Ggit.Tree.IsTree c, Ggit.Tree.IsTree d) =>
a
-> b
-> c
-> d
-> Ggit.MergeOptions.MergeOptions
-> m (Maybe Ggit.Index.Index)
repositoryMergeTrees :: a -> b -> c -> d -> MergeOptions -> m (Maybe Index)
repositoryMergeTrees a
repository b
ancestorTree c
ourTree d
theirTree MergeOptions
mergeOptions = IO (Maybe Index) -> m (Maybe Index)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Index) -> m (Maybe Index))
-> IO (Maybe Index) -> m (Maybe Index)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Tree
ancestorTree' <- b -> IO (Ptr Tree)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
ancestorTree
Ptr Tree
ourTree' <- c -> IO (Ptr Tree)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
ourTree
Ptr Tree
theirTree' <- d -> IO (Ptr Tree)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
theirTree
Ptr MergeOptions
mergeOptions' <- MergeOptions -> IO (Ptr MergeOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MergeOptions
mergeOptions
IO (Maybe Index) -> IO () -> IO (Maybe Index)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Index
result <- (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index))
-> (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Tree
-> Ptr Tree
-> Ptr Tree
-> Ptr MergeOptions
-> Ptr (Ptr GError)
-> IO (Ptr Index)
ggit_repository_merge_trees Ptr Repository
repository' Ptr Tree
ancestorTree' Ptr Tree
ourTree' Ptr Tree
theirTree' Ptr MergeOptions
mergeOptions'
Maybe Index
maybeResult <- Ptr Index -> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Index
result ((Ptr Index -> IO Index) -> IO (Maybe Index))
-> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. (a -> b) -> a -> b
$ \Ptr Index
result' -> do
Index
result'' <- ((ManagedPtr Index -> Index) -> Ptr Index -> IO Index
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Index -> Index
Ggit.Index.Index) Ptr Index
result'
Index -> IO Index
forall (m :: * -> *) a. Monad m => a -> m a
return Index
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
ancestorTree
c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
ourTree
d -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr d
theirTree
MergeOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MergeOptions
mergeOptions
Maybe Index -> IO (Maybe Index)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Index
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryMergeTreesMethodInfo
instance (signature ~ (b -> c -> d -> Ggit.MergeOptions.MergeOptions -> m (Maybe Ggit.Index.Index)), MonadIO m, IsRepository a, Ggit.Tree.IsTree b, Ggit.Tree.IsTree c, Ggit.Tree.IsTree d) => O.MethodInfo RepositoryMergeTreesMethodInfo a signature where
overloadedMethod = repositoryMergeTrees
#endif
foreign import ccall "ggit_repository_note_foreach" ggit_repository_note_foreach ::
Ptr Repository ->
CString ->
FunPtr Ggit.Callbacks.C_NoteCallback ->
Ptr () ->
Ptr (Ptr GError) ->
IO CInt
repositoryNoteForeach ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Maybe (T.Text)
-> Ggit.Callbacks.NoteCallback
-> m ()
repositoryNoteForeach :: a -> Maybe Text -> NoteCallback -> m ()
repositoryNoteForeach a
repository Maybe Text
notesRef NoteCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
maybeNotesRef <- case Maybe Text
notesRef of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jNotesRef -> do
CString
jNotesRef' <- Text -> IO CString
textToCString Text
jNotesRef
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jNotesRef'
FunPtr C_NoteCallback
callback' <- C_NoteCallback -> IO (FunPtr C_NoteCallback)
Ggit.Callbacks.mk_NoteCallback (Maybe (Ptr (FunPtr C_NoteCallback))
-> NoteCallback_WithClosures -> C_NoteCallback
Ggit.Callbacks.wrap_NoteCallback Maybe (Ptr (FunPtr C_NoteCallback))
forall a. Maybe a
Nothing (NoteCallback -> NoteCallback_WithClosures
Ggit.Callbacks.drop_closures_NoteCallback NoteCallback
callback))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> FunPtr C_NoteCallback
-> Ptr ()
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_note_foreach Ptr Repository
repository' CString
maybeNotesRef FunPtr C_NoteCallback
callback' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_NoteCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_NoteCallback
callback'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_NoteCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_NoteCallback
callback'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
)
#if defined(ENABLE_OVERLOADING)
data RepositoryNoteForeachMethodInfo
instance (signature ~ (Maybe (T.Text) -> Ggit.Callbacks.NoteCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryNoteForeachMethodInfo a signature where
overloadedMethod = repositoryNoteForeach
#endif
foreign import ccall "ggit_repository_path_is_ignored" ggit_repository_path_is_ignored ::
Ptr Repository ->
CString ->
Ptr (Ptr GError) ->
IO CInt
repositoryPathIsIgnored ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m ()
repositoryPathIsIgnored :: a -> Text -> m ()
repositoryPathIsIgnored a
repository Text
path = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
path' <- Text -> IO CString
textToCString Text
path
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO CInt
ggit_repository_path_is_ignored Ptr Repository
repository' CString
path'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryPathIsIgnoredMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryPathIsIgnoredMethodInfo a signature where
overloadedMethod = repositoryPathIsIgnored
#endif
foreign import ccall "ggit_repository_read_note" ggit_repository_read_note ::
Ptr Repository ->
CString ->
Ptr Ggit.OId.OId ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Note.Note)
repositoryReadNote ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Maybe (T.Text)
-> Ggit.OId.OId
-> m (Maybe Ggit.Note.Note)
repositoryReadNote :: a -> Maybe Text -> OId -> m (Maybe Note)
repositoryReadNote a
repository Maybe Text
notesRef OId
id = IO (Maybe Note) -> m (Maybe Note)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Note) -> m (Maybe Note))
-> IO (Maybe Note) -> m (Maybe Note)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
maybeNotesRef <- case Maybe Text
notesRef of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jNotesRef -> do
CString
jNotesRef' <- Text -> IO CString
textToCString Text
jNotesRef
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jNotesRef'
Ptr OId
id' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
id
IO (Maybe Note) -> IO () -> IO (Maybe Note)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Note
result <- (Ptr (Ptr GError) -> IO (Ptr Note)) -> IO (Ptr Note)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Note)) -> IO (Ptr Note))
-> (Ptr (Ptr GError) -> IO (Ptr Note)) -> IO (Ptr Note)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr Note)
ggit_repository_read_note Ptr Repository
repository' CString
maybeNotesRef Ptr OId
id'
Maybe Note
maybeResult <- Ptr Note -> (Ptr Note -> IO Note) -> IO (Maybe Note)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Note
result ((Ptr Note -> IO Note) -> IO (Maybe Note))
-> (Ptr Note -> IO Note) -> IO (Maybe Note)
forall a b. (a -> b) -> a -> b
$ \Ptr Note
result' -> do
Note
result'' <- ((ManagedPtr Note -> Note) -> Ptr Note -> IO Note
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Note -> Note
Ggit.Note.Note) Ptr Note
result'
Note -> IO Note
forall (m :: * -> *) a. Monad m => a -> m a
return Note
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
id
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
Maybe Note -> IO (Maybe Note)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Note
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
)
#if defined(ENABLE_OVERLOADING)
data RepositoryReadNoteMethodInfo
instance (signature ~ (Maybe (T.Text) -> Ggit.OId.OId -> m (Maybe Ggit.Note.Note)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryReadNoteMethodInfo a signature where
overloadedMethod = repositoryReadNote
#endif
foreign import ccall "ggit_repository_rebase_init" ggit_repository_rebase_init ::
Ptr Repository ->
Ptr Ggit.AnnotatedCommit.AnnotatedCommit ->
Ptr Ggit.AnnotatedCommit.AnnotatedCommit ->
Ptr Ggit.AnnotatedCommit.AnnotatedCommit ->
Ptr Ggit.RebaseOptions.RebaseOptions ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Rebase.Rebase)
repositoryRebaseInit ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit)
-> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit)
-> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit)
-> Ggit.RebaseOptions.RebaseOptions
-> m (Maybe Ggit.Rebase.Rebase)
repositoryRebaseInit :: a
-> Maybe AnnotatedCommit
-> Maybe AnnotatedCommit
-> Maybe AnnotatedCommit
-> RebaseOptions
-> m (Maybe Rebase)
repositoryRebaseInit a
repository Maybe AnnotatedCommit
branch Maybe AnnotatedCommit
upstream Maybe AnnotatedCommit
onto RebaseOptions
options = IO (Maybe Rebase) -> m (Maybe Rebase)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Rebase) -> m (Maybe Rebase))
-> IO (Maybe Rebase) -> m (Maybe Rebase)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr AnnotatedCommit
maybeBranch <- case Maybe AnnotatedCommit
branch of
Maybe AnnotatedCommit
Nothing -> Ptr AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AnnotatedCommit
forall a. Ptr a
nullPtr
Just AnnotatedCommit
jBranch -> do
Ptr AnnotatedCommit
jBranch' <- AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr AnnotatedCommit
jBranch
Ptr AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AnnotatedCommit
jBranch'
Ptr AnnotatedCommit
maybeUpstream <- case Maybe AnnotatedCommit
upstream of
Maybe AnnotatedCommit
Nothing -> Ptr AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AnnotatedCommit
forall a. Ptr a
nullPtr
Just AnnotatedCommit
jUpstream -> do
Ptr AnnotatedCommit
jUpstream' <- AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr AnnotatedCommit
jUpstream
Ptr AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AnnotatedCommit
jUpstream'
Ptr AnnotatedCommit
maybeOnto <- case Maybe AnnotatedCommit
onto of
Maybe AnnotatedCommit
Nothing -> Ptr AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AnnotatedCommit
forall a. Ptr a
nullPtr
Just AnnotatedCommit
jOnto -> do
Ptr AnnotatedCommit
jOnto' <- AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr AnnotatedCommit
jOnto
Ptr AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AnnotatedCommit
jOnto'
Ptr RebaseOptions
options' <- RebaseOptions -> IO (Ptr RebaseOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RebaseOptions
options
IO (Maybe Rebase) -> IO () -> IO (Maybe Rebase)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Rebase
result <- (Ptr (Ptr GError) -> IO (Ptr Rebase)) -> IO (Ptr Rebase)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Rebase)) -> IO (Ptr Rebase))
-> (Ptr (Ptr GError) -> IO (Ptr Rebase)) -> IO (Ptr Rebase)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr AnnotatedCommit
-> Ptr AnnotatedCommit
-> Ptr AnnotatedCommit
-> Ptr RebaseOptions
-> Ptr (Ptr GError)
-> IO (Ptr Rebase)
ggit_repository_rebase_init Ptr Repository
repository' Ptr AnnotatedCommit
maybeBranch Ptr AnnotatedCommit
maybeUpstream Ptr AnnotatedCommit
maybeOnto Ptr RebaseOptions
options'
Maybe Rebase
maybeResult <- Ptr Rebase -> (Ptr Rebase -> IO Rebase) -> IO (Maybe Rebase)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Rebase
result ((Ptr Rebase -> IO Rebase) -> IO (Maybe Rebase))
-> (Ptr Rebase -> IO Rebase) -> IO (Maybe Rebase)
forall a b. (a -> b) -> a -> b
$ \Ptr Rebase
result' -> do
Rebase
result'' <- ((ManagedPtr Rebase -> Rebase) -> Ptr Rebase -> IO Rebase
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Rebase -> Rebase
Ggit.Rebase.Rebase) Ptr Rebase
result'
Rebase -> IO Rebase
forall (m :: * -> *) a. Monad m => a -> m a
return Rebase
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe AnnotatedCommit -> (AnnotatedCommit -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe AnnotatedCommit
branch AnnotatedCommit -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe AnnotatedCommit -> (AnnotatedCommit -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe AnnotatedCommit
upstream AnnotatedCommit -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe AnnotatedCommit -> (AnnotatedCommit -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe AnnotatedCommit
onto AnnotatedCommit -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
RebaseOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RebaseOptions
options
Maybe Rebase -> IO (Maybe Rebase)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Rebase
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryRebaseInitMethodInfo
instance (signature ~ (Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) -> Ggit.RebaseOptions.RebaseOptions -> m (Maybe Ggit.Rebase.Rebase)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRebaseInitMethodInfo a signature where
overloadedMethod = repositoryRebaseInit
#endif
foreign import ccall "ggit_repository_rebase_open" ggit_repository_rebase_open ::
Ptr Repository ->
Ptr Ggit.RebaseOptions.RebaseOptions ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Rebase.Rebase)
repositoryRebaseOpen ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.RebaseOptions.RebaseOptions
-> m (Maybe Ggit.Rebase.Rebase)
repositoryRebaseOpen :: a -> RebaseOptions -> m (Maybe Rebase)
repositoryRebaseOpen a
repository RebaseOptions
options = IO (Maybe Rebase) -> m (Maybe Rebase)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Rebase) -> m (Maybe Rebase))
-> IO (Maybe Rebase) -> m (Maybe Rebase)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr RebaseOptions
options' <- RebaseOptions -> IO (Ptr RebaseOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RebaseOptions
options
IO (Maybe Rebase) -> IO () -> IO (Maybe Rebase)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Rebase
result <- (Ptr (Ptr GError) -> IO (Ptr Rebase)) -> IO (Ptr Rebase)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Rebase)) -> IO (Ptr Rebase))
-> (Ptr (Ptr GError) -> IO (Ptr Rebase)) -> IO (Ptr Rebase)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr RebaseOptions -> Ptr (Ptr GError) -> IO (Ptr Rebase)
ggit_repository_rebase_open Ptr Repository
repository' Ptr RebaseOptions
options'
Maybe Rebase
maybeResult <- Ptr Rebase -> (Ptr Rebase -> IO Rebase) -> IO (Maybe Rebase)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Rebase
result ((Ptr Rebase -> IO Rebase) -> IO (Maybe Rebase))
-> (Ptr Rebase -> IO Rebase) -> IO (Maybe Rebase)
forall a b. (a -> b) -> a -> b
$ \Ptr Rebase
result' -> do
Rebase
result'' <- ((ManagedPtr Rebase -> Rebase) -> Ptr Rebase -> IO Rebase
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Rebase -> Rebase
Ggit.Rebase.Rebase) Ptr Rebase
result'
Rebase -> IO Rebase
forall (m :: * -> *) a. Monad m => a -> m a
return Rebase
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
RebaseOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RebaseOptions
options
Maybe Rebase -> IO (Maybe Rebase)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Rebase
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryRebaseOpenMethodInfo
instance (signature ~ (Ggit.RebaseOptions.RebaseOptions -> m (Maybe Ggit.Rebase.Rebase)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRebaseOpenMethodInfo a signature where
overloadedMethod = repositoryRebaseOpen
#endif
foreign import ccall "ggit_repository_references_foreach" ggit_repository_references_foreach ::
Ptr Repository ->
FunPtr Ggit.Callbacks.C_ReferencesCallback ->
Ptr () ->
Ptr (Ptr GError) ->
IO CInt
repositoryReferencesForeach ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.Callbacks.ReferencesCallback
-> m ()
repositoryReferencesForeach :: a -> ReferencesCallback -> m ()
repositoryReferencesForeach a
repository ReferencesCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
FunPtr C_ReferencesCallback
callback' <- C_ReferencesCallback -> IO (FunPtr C_ReferencesCallback)
Ggit.Callbacks.mk_ReferencesCallback (Maybe (Ptr (FunPtr C_ReferencesCallback))
-> ReferencesCallback_WithClosures -> C_ReferencesCallback
Ggit.Callbacks.wrap_ReferencesCallback Maybe (Ptr (FunPtr C_ReferencesCallback))
forall a. Maybe a
Nothing (ReferencesCallback -> ReferencesCallback_WithClosures
Ggit.Callbacks.drop_closures_ReferencesCallback ReferencesCallback
callback))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> FunPtr C_ReferencesCallback
-> Ptr ()
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_references_foreach Ptr Repository
repository' FunPtr C_ReferencesCallback
callback' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_ReferencesCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ReferencesCallback
callback'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_ReferencesCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ReferencesCallback
callback'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryReferencesForeachMethodInfo
instance (signature ~ (Ggit.Callbacks.ReferencesCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryReferencesForeachMethodInfo a signature where
overloadedMethod = repositoryReferencesForeach
#endif
foreign import ccall "ggit_repository_references_foreach_name" ggit_repository_references_foreach_name ::
Ptr Repository ->
FunPtr Ggit.Callbacks.C_ReferencesNameCallback ->
Ptr () ->
Ptr (Ptr GError) ->
IO CInt
repositoryReferencesForeachName ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.Callbacks.ReferencesNameCallback
-> m ()
repositoryReferencesForeachName :: a -> ReferencesNameCallback -> m ()
repositoryReferencesForeachName a
repository ReferencesNameCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
FunPtr C_ReferencesNameCallback
callback' <- C_ReferencesNameCallback -> IO (FunPtr C_ReferencesNameCallback)
Ggit.Callbacks.mk_ReferencesNameCallback (Maybe (Ptr (FunPtr C_ReferencesNameCallback))
-> ReferencesNameCallback_WithClosures -> C_ReferencesNameCallback
Ggit.Callbacks.wrap_ReferencesNameCallback Maybe (Ptr (FunPtr C_ReferencesNameCallback))
forall a. Maybe a
Nothing (ReferencesNameCallback -> ReferencesNameCallback_WithClosures
Ggit.Callbacks.drop_closures_ReferencesNameCallback ReferencesNameCallback
callback))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> FunPtr C_ReferencesNameCallback
-> Ptr ()
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_references_foreach_name Ptr Repository
repository' FunPtr C_ReferencesNameCallback
callback' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_ReferencesNameCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ReferencesNameCallback
callback'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_ReferencesNameCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ReferencesNameCallback
callback'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryReferencesForeachNameMethodInfo
instance (signature ~ (Ggit.Callbacks.ReferencesNameCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryReferencesForeachNameMethodInfo a signature where
overloadedMethod = repositoryReferencesForeachName
#endif
foreign import ccall "ggit_repository_remove_note" ggit_repository_remove_note ::
Ptr Repository ->
CString ->
Ptr Ggit.Signature.Signature ->
Ptr Ggit.Signature.Signature ->
Ptr Ggit.OId.OId ->
Ptr (Ptr GError) ->
IO CInt
repositoryRemoveNote ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) =>
a
-> Maybe (T.Text)
-> b
-> c
-> Ggit.OId.OId
-> m ()
repositoryRemoveNote :: a -> Maybe Text -> b -> c -> OId -> m ()
repositoryRemoveNote a
repository Maybe Text
notesRef b
author c
committer OId
id = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
maybeNotesRef <- case Maybe Text
notesRef of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jNotesRef -> do
CString
jNotesRef' <- Text -> IO CString
textToCString Text
jNotesRef
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jNotesRef'
Ptr Signature
author' <- b -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
author
Ptr Signature
committer' <- c -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
committer
Ptr OId
id' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
id
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Signature
-> Ptr Signature
-> Ptr OId
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_remove_note Ptr Repository
repository' CString
maybeNotesRef Ptr Signature
author' Ptr Signature
committer' Ptr OId
id'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
author
c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
committer
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
id
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
)
#if defined(ENABLE_OVERLOADING)
data RepositoryRemoveNoteMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> c -> Ggit.OId.OId -> m ()), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => O.MethodInfo RepositoryRemoveNoteMethodInfo a signature where
overloadedMethod = repositoryRemoveNote
#endif
foreign import ccall "ggit_repository_remove_remote" ggit_repository_remove_remote ::
Ptr Repository ->
CString ->
Ptr (Ptr GError) ->
IO CInt
repositoryRemoveRemote ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m ()
repositoryRemoveRemote :: a -> Text -> m ()
repositoryRemoveRemote a
repository Text
name = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO CInt
ggit_repository_remove_remote Ptr Repository
repository' CString
name'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryRemoveRemoteMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRemoveRemoteMethodInfo a signature where
overloadedMethod = repositoryRemoveRemote
#endif
foreign import ccall "ggit_repository_rename_remote" ggit_repository_rename_remote ::
Ptr Repository ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr CString)
repositoryRenameRemote ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> T.Text
-> m (Maybe [T.Text])
repositoryRenameRemote :: a -> Text -> Text -> m (Maybe [Text])
repositoryRenameRemote a
repository Text
name Text
newName = IO (Maybe [Text]) -> m (Maybe [Text])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Text]) -> m (Maybe [Text]))
-> IO (Maybe [Text]) -> m (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
CString
newName' <- Text -> IO CString
textToCString Text
newName
IO (Maybe [Text]) -> IO () -> IO (Maybe [Text])
forall a b. IO a -> IO b -> IO a
onException (do
Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> CString -> Ptr (Ptr GError) -> IO (Ptr CString)
ggit_repository_rename_remote Ptr Repository
repository' CString
name' CString
newName'
Maybe [Text]
maybeResult <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CString
result ((Ptr CString -> IO [Text]) -> IO (Maybe [Text]))
-> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr CString
result' -> do
[Text]
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
newName'
Maybe [Text] -> IO (Maybe [Text])
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Text]
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
newName'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryRenameRemoteMethodInfo
instance (signature ~ (T.Text -> T.Text -> m (Maybe [T.Text])), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRenameRemoteMethodInfo a signature where
overloadedMethod = repositoryRenameRemote
#endif
foreign import ccall "ggit_repository_reset" ggit_repository_reset ::
Ptr Repository ->
Ptr Ggit.Object.Object ->
CUInt ->
Ptr Ggit.CheckoutOptions.CheckoutOptions ->
Ptr (Ptr GError) ->
IO ()
repositoryReset ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.CheckoutOptions.IsCheckoutOptions c) =>
a
-> b
-> Ggit.Enums.ResetType
-> c
-> m ()
repositoryReset :: a -> b -> ResetType -> c -> m ()
repositoryReset a
repository b
target ResetType
resetType c
checkoutOptions = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Object
target' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
let resetType' :: CUInt
resetType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (ResetType -> Int) -> ResetType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ResetType -> Int
forall a. Enum a => a -> Int
fromEnum) ResetType
resetType
Ptr CheckoutOptions
checkoutOptions' <- c -> IO (Ptr CheckoutOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
checkoutOptions
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Object
-> CUInt
-> Ptr CheckoutOptions
-> Ptr (Ptr GError)
-> IO ()
ggit_repository_reset Ptr Repository
repository' Ptr Object
target' CUInt
resetType' Ptr CheckoutOptions
checkoutOptions'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
checkoutOptions
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryResetMethodInfo
instance (signature ~ (b -> Ggit.Enums.ResetType -> c -> m ()), MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.CheckoutOptions.IsCheckoutOptions c) => O.MethodInfo RepositoryResetMethodInfo a signature where
overloadedMethod = repositoryReset
#endif
foreign import ccall "ggit_repository_reset_default" ggit_repository_reset_default ::
Ptr Repository ->
Ptr Ggit.Object.Object ->
Ptr CString ->
Ptr (Ptr GError) ->
IO ()
repositoryResetDefault ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b) =>
a
-> Maybe (b)
-> [T.Text]
-> m ()
repositoryResetDefault :: a -> Maybe b -> [Text] -> m ()
repositoryResetDefault a
repository Maybe b
target [Text]
pathspecs = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Object
maybeTarget <- case Maybe b
target of
Maybe b
Nothing -> Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
forall a. Ptr a
nullPtr
Just b
jTarget -> do
Ptr Object
jTarget' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jTarget
Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jTarget'
Ptr CString
pathspecs' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
pathspecs
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Object -> Ptr CString -> Ptr (Ptr GError) -> IO ()
ggit_repository_reset_default Ptr Repository
repository' Ptr Object
maybeTarget Ptr CString
pathspecs'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
target b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
pathspecs'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
pathspecs'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
pathspecs'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
pathspecs'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryResetDefaultMethodInfo
instance (signature ~ (Maybe (b) -> [T.Text] -> m ()), MonadIO m, IsRepository a, Ggit.Object.IsObject b) => O.MethodInfo RepositoryResetDefaultMethodInfo a signature where
overloadedMethod = repositoryResetDefault
#endif
foreign import ccall "ggit_repository_revert" ggit_repository_revert ::
Ptr Repository ->
Ptr Ggit.Commit.Commit ->
Ptr Ggit.RevertOptions.RevertOptions ->
Ptr (Ptr GError) ->
IO CInt
repositoryRevert ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Commit.IsCommit b) =>
a
-> b
-> Ggit.RevertOptions.RevertOptions
-> m ()
repositoryRevert :: a -> b -> RevertOptions -> m ()
repositoryRevert a
repository b
commit RevertOptions
options = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Commit
commit' <- b -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
commit
Ptr RevertOptions
options' <- RevertOptions -> IO (Ptr RevertOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RevertOptions
options
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Commit -> Ptr RevertOptions -> Ptr (Ptr GError) -> IO CInt
ggit_repository_revert Ptr Repository
repository' Ptr Commit
commit' Ptr RevertOptions
options'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
commit
RevertOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RevertOptions
options
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryRevertMethodInfo
instance (signature ~ (b -> Ggit.RevertOptions.RevertOptions -> m ()), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b) => O.MethodInfo RepositoryRevertMethodInfo a signature where
overloadedMethod = repositoryRevert
#endif
foreign import ccall "ggit_repository_revparse" ggit_repository_revparse ::
Ptr Repository ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.Object.Object)
repositoryRevparse ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m (Maybe Ggit.Object.Object)
repositoryRevparse :: a -> Text -> m (Maybe Object)
repositoryRevparse a
repository Text
spec = IO (Maybe Object) -> m (Maybe Object)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Object) -> m (Maybe Object))
-> IO (Maybe Object) -> m (Maybe Object)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
spec' <- Text -> IO CString
textToCString Text
spec
IO (Maybe Object) -> IO () -> IO (Maybe Object)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Object
result <- (Ptr (Ptr GError) -> IO (Ptr Object)) -> IO (Ptr Object)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Object)) -> IO (Ptr Object))
-> (Ptr (Ptr GError) -> IO (Ptr Object)) -> IO (Ptr Object)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr Object)
ggit_repository_revparse Ptr Repository
repository' CString
spec'
Maybe Object
maybeResult <- Ptr Object -> (Ptr Object -> IO Object) -> IO (Maybe Object)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Object
result ((Ptr Object -> IO Object) -> IO (Maybe Object))
-> (Ptr Object -> IO Object) -> IO (Maybe Object)
forall a b. (a -> b) -> a -> b
$ \Ptr Object
result' -> do
Object
result'' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Object -> Object
Ggit.Object.Object) Ptr Object
result'
Object -> IO Object
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
spec'
Maybe Object -> IO (Maybe Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Object
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
spec'
)
#if defined(ENABLE_OVERLOADING)
data RepositoryRevparseMethodInfo
instance (signature ~ (T.Text -> m (Maybe Ggit.Object.Object)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRevparseMethodInfo a signature where
overloadedMethod = repositoryRevparse
#endif
foreign import ccall "ggit_repository_save_stash" ggit_repository_save_stash ::
Ptr Repository ->
Ptr Ggit.Signature.Signature ->
CString ->
CUInt ->
Ptr (Ptr GError) ->
IO (Ptr Ggit.OId.OId)
repositorySaveStash ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Signature.IsSignature b) =>
a
-> b
-> T.Text
-> [Ggit.Flags.StashFlags]
-> m (Maybe Ggit.OId.OId)
repositorySaveStash :: a -> b -> Text -> [StashFlags] -> m (Maybe OId)
repositorySaveStash a
repository b
stasher Text
message [StashFlags]
flags = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Signature
stasher' <- b -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
stasher
CString
message' <- Text -> IO CString
textToCString Text
message
let flags' :: CUInt
flags' = [StashFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StashFlags]
flags
IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Signature
-> CString
-> CUInt
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_save_stash Ptr Repository
repository' Ptr Signature
stasher' CString
message' CUInt
flags'
Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
stasher
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
)
#if defined(ENABLE_OVERLOADING)
data RepositorySaveStashMethodInfo
instance (signature ~ (b -> T.Text -> [Ggit.Flags.StashFlags] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b) => O.MethodInfo RepositorySaveStashMethodInfo a signature where
overloadedMethod = repositorySaveStash
#endif
foreign import ccall "ggit_repository_set_head" ggit_repository_set_head ::
Ptr Repository ->
CString ->
Ptr (Ptr GError) ->
IO CInt
repositorySetHead ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m ()
repositorySetHead :: a -> Text -> m ()
repositorySetHead a
repository Text
refName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
refName' <- Text -> IO CString
textToCString Text
refName
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO CInt
ggit_repository_set_head Ptr Repository
repository' CString
refName'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refName'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refName'
)
#if defined(ENABLE_OVERLOADING)
data RepositorySetHeadMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetHeadMethodInfo a signature where
overloadedMethod = repositorySetHead
#endif
foreign import ccall "ggit_repository_set_remote_url" ggit_repository_set_remote_url ::
Ptr Repository ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CInt
repositorySetRemoteUrl ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> T.Text
-> m ()
repositorySetRemoteUrl :: a -> Text -> Text -> m ()
repositorySetRemoteUrl a
repository Text
remote Text
url = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
remote' <- Text -> IO CString
textToCString Text
remote
CString
url' <- Text -> IO CString
textToCString Text
url
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> CString -> Ptr (Ptr GError) -> IO CInt
ggit_repository_set_remote_url Ptr Repository
repository' CString
remote' CString
url'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
remote'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
remote'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
)
#if defined(ENABLE_OVERLOADING)
data RepositorySetRemoteUrlMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetRemoteUrlMethodInfo a signature where
overloadedMethod = repositorySetRemoteUrl
#endif
foreign import ccall "ggit_repository_set_submodule_fetch_recurse" ggit_repository_set_submodule_fetch_recurse ::
Ptr Repository ->
CString ->
CUInt ->
Ptr (Ptr GError) ->
IO ()
repositorySetSubmoduleFetchRecurse ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> Ggit.Enums.SubmoduleRecurse
-> m ()
repositorySetSubmoduleFetchRecurse :: a -> Text -> SubmoduleRecurse -> m ()
repositorySetSubmoduleFetchRecurse a
repository Text
name SubmoduleRecurse
fetchRecurseSubmodules = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
let fetchRecurseSubmodules' :: CUInt
fetchRecurseSubmodules' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (SubmoduleRecurse -> Int) -> SubmoduleRecurse -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SubmoduleRecurse -> Int
forall a. Enum a => a -> Int
fromEnum) SubmoduleRecurse
fetchRecurseSubmodules
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> CUInt -> Ptr (Ptr GError) -> IO ()
ggit_repository_set_submodule_fetch_recurse Ptr Repository
repository' CString
name' CUInt
fetchRecurseSubmodules'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
)
#if defined(ENABLE_OVERLOADING)
data RepositorySetSubmoduleFetchRecurseMethodInfo
instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleRecurse -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetSubmoduleFetchRecurseMethodInfo a signature where
overloadedMethod = repositorySetSubmoduleFetchRecurse
#endif
foreign import ccall "ggit_repository_set_submodule_ignore" ggit_repository_set_submodule_ignore ::
Ptr Repository ->
CString ->
CInt ->
Ptr (Ptr GError) ->
IO ()
repositorySetSubmoduleIgnore ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> Ggit.Enums.SubmoduleIgnore
-> m ()
repositorySetSubmoduleIgnore :: a -> Text -> SubmoduleIgnore -> m ()
repositorySetSubmoduleIgnore a
repository Text
name SubmoduleIgnore
ignore = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
let ignore' :: CInt
ignore' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> (SubmoduleIgnore -> Int) -> SubmoduleIgnore -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SubmoduleIgnore -> Int
forall a. Enum a => a -> Int
fromEnum) SubmoduleIgnore
ignore
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> CInt -> Ptr (Ptr GError) -> IO ()
ggit_repository_set_submodule_ignore Ptr Repository
repository' CString
name' CInt
ignore'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
)
#if defined(ENABLE_OVERLOADING)
data RepositorySetSubmoduleIgnoreMethodInfo
instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleIgnore -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetSubmoduleIgnoreMethodInfo a signature where
overloadedMethod = repositorySetSubmoduleIgnore
#endif
foreign import ccall "ggit_repository_set_submodule_update" ggit_repository_set_submodule_update ::
Ptr Repository ->
CString ->
CUInt ->
Ptr (Ptr GError) ->
IO ()
repositorySetSubmoduleUpdate ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> Ggit.Enums.SubmoduleUpdate
-> m ()
repositorySetSubmoduleUpdate :: a -> Text -> SubmoduleUpdate -> m ()
repositorySetSubmoduleUpdate a
repository Text
name SubmoduleUpdate
update = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
let update' :: CUInt
update' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (SubmoduleUpdate -> Int) -> SubmoduleUpdate -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SubmoduleUpdate -> Int
forall a. Enum a => a -> Int
fromEnum) SubmoduleUpdate
update
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> CUInt -> Ptr (Ptr GError) -> IO ()
ggit_repository_set_submodule_update Ptr Repository
repository' CString
name' CUInt
update'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
)
#if defined(ENABLE_OVERLOADING)
data RepositorySetSubmoduleUpdateMethodInfo
instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleUpdate -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetSubmoduleUpdateMethodInfo a signature where
overloadedMethod = repositorySetSubmoduleUpdate
#endif
foreign import ccall "ggit_repository_set_submodule_url" ggit_repository_set_submodule_url ::
Ptr Repository ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO ()
repositorySetSubmoduleUrl ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> T.Text
-> m ()
repositorySetSubmoduleUrl :: a -> Text -> Text -> m ()
repositorySetSubmoduleUrl a
repository Text
name Text
url = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
name' <- Text -> IO CString
textToCString Text
name
CString
url' <- Text -> IO CString
textToCString Text
url
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> CString -> Ptr (Ptr GError) -> IO ()
ggit_repository_set_submodule_url Ptr Repository
repository' CString
name' CString
url'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
)
#if defined(ENABLE_OVERLOADING)
data RepositorySetSubmoduleUrlMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetSubmoduleUrlMethodInfo a signature where
overloadedMethod = repositorySetSubmoduleUrl
#endif
foreign import ccall "ggit_repository_set_workdir" ggit_repository_set_workdir ::
Ptr Repository ->
Ptr Gio.File.File ->
CInt ->
IO ()
repositorySetWorkdir ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a, Gio.File.IsFile b) =>
a
-> b
-> Bool
-> m ()
repositorySetWorkdir :: a -> b -> Bool -> m ()
repositorySetWorkdir a
repository b
workdir Bool
updateGitlink = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr File
workdir' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
workdir
let updateGitlink' :: CInt
updateGitlink' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
updateGitlink
Ptr Repository -> Ptr File -> CInt -> IO ()
ggit_repository_set_workdir Ptr Repository
repository' Ptr File
workdir' CInt
updateGitlink'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
workdir
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data RepositorySetWorkdirMethodInfo
instance (signature ~ (b -> Bool -> m ()), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.MethodInfo RepositorySetWorkdirMethodInfo a signature where
overloadedMethod = repositorySetWorkdir
#endif
foreign import ccall "ggit_repository_stash_foreach" ggit_repository_stash_foreach ::
Ptr Repository ->
FunPtr Ggit.Callbacks.C_StashCallback ->
Ptr () ->
Ptr (Ptr GError) ->
IO CInt
repositoryStashForeach ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.Callbacks.StashCallback
-> m ()
repositoryStashForeach :: a -> StashCallback -> m ()
repositoryStashForeach a
repository StashCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
FunPtr C_StashCallback
callback' <- C_StashCallback -> IO (FunPtr C_StashCallback)
Ggit.Callbacks.mk_StashCallback (Maybe (Ptr (FunPtr C_StashCallback))
-> StashCallback_WithClosures -> C_StashCallback
Ggit.Callbacks.wrap_StashCallback Maybe (Ptr (FunPtr C_StashCallback))
forall a. Maybe a
Nothing (StashCallback -> StashCallback_WithClosures
Ggit.Callbacks.drop_closures_StashCallback StashCallback
callback))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> FunPtr C_StashCallback -> Ptr () -> Ptr (Ptr GError) -> IO CInt
ggit_repository_stash_foreach Ptr Repository
repository' FunPtr C_StashCallback
callback' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_StashCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_StashCallback
callback'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_StashCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_StashCallback
callback'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryStashForeachMethodInfo
instance (signature ~ (Ggit.Callbacks.StashCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryStashForeachMethodInfo a signature where
overloadedMethod = repositoryStashForeach
#endif
foreign import ccall "ggit_repository_submodule_foreach" ggit_repository_submodule_foreach ::
Ptr Repository ->
FunPtr Ggit.Callbacks.C_SubmoduleCallback ->
Ptr () ->
Ptr (Ptr GError) ->
IO CInt
repositorySubmoduleForeach ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.Callbacks.SubmoduleCallback
-> m ()
repositorySubmoduleForeach :: a -> SubmoduleCallback -> m ()
repositorySubmoduleForeach a
repository SubmoduleCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
FunPtr C_SubmoduleCallback
callback' <- C_SubmoduleCallback -> IO (FunPtr C_SubmoduleCallback)
Ggit.Callbacks.mk_SubmoduleCallback (Maybe (Ptr (FunPtr C_SubmoduleCallback))
-> SubmoduleCallback_WithClosures -> C_SubmoduleCallback
Ggit.Callbacks.wrap_SubmoduleCallback Maybe (Ptr (FunPtr C_SubmoduleCallback))
forall a. Maybe a
Nothing (SubmoduleCallback -> SubmoduleCallback_WithClosures
Ggit.Callbacks.drop_closures_SubmoduleCallback SubmoduleCallback
callback))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> FunPtr C_SubmoduleCallback
-> Ptr ()
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_submodule_foreach Ptr Repository
repository' FunPtr C_SubmoduleCallback
callback' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_SubmoduleCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_SubmoduleCallback
callback'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_SubmoduleCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_SubmoduleCallback
callback'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositorySubmoduleForeachMethodInfo
instance (signature ~ (Ggit.Callbacks.SubmoduleCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySubmoduleForeachMethodInfo a signature where
overloadedMethod = repositorySubmoduleForeach
#endif
foreign import ccall "ggit_repository_tag_foreach" ggit_repository_tag_foreach ::
Ptr Repository ->
FunPtr Ggit.Callbacks.C_TagCallback ->
Ptr () ->
Ptr (Ptr GError) ->
IO CInt
repositoryTagForeach ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Ggit.Callbacks.TagCallback
-> m ()
repositoryTagForeach :: a -> TagCallback -> m ()
repositoryTagForeach a
repository TagCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
FunPtr C_TagCallback
callback' <- C_TagCallback -> IO (FunPtr C_TagCallback)
Ggit.Callbacks.mk_TagCallback (Maybe (Ptr (FunPtr C_TagCallback))
-> TagCallback_WithClosures -> C_TagCallback
Ggit.Callbacks.wrap_TagCallback Maybe (Ptr (FunPtr C_TagCallback))
forall a. Maybe a
Nothing (TagCallback -> TagCallback_WithClosures
Ggit.Callbacks.drop_closures_TagCallback TagCallback
callback))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> FunPtr C_TagCallback -> Ptr () -> Ptr (Ptr GError) -> IO CInt
ggit_repository_tag_foreach Ptr Repository
repository' FunPtr C_TagCallback
callback' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_TagCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_TagCallback
callback'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_TagCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_TagCallback
callback'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryTagForeachMethodInfo
instance (signature ~ (Ggit.Callbacks.TagCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryTagForeachMethodInfo a signature where
overloadedMethod = repositoryTagForeach
#endif
foreign import ccall "ggit_repository_clone" ggit_repository_clone ::
CString ->
Ptr Gio.File.File ->
Ptr Ggit.CloneOptions.CloneOptions ->
Ptr (Ptr GError) ->
IO (Ptr Repository)
repositoryClone ::
(B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a, Ggit.CloneOptions.IsCloneOptions b) =>
T.Text
-> a
-> Maybe (b)
-> m (Maybe Repository)
repositoryClone :: Text -> a -> Maybe b -> m (Maybe Repository)
repositoryClone Text
url a
location Maybe b
options = IO (Maybe Repository) -> m (Maybe Repository)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Repository) -> m (Maybe Repository))
-> IO (Maybe Repository) -> m (Maybe Repository)
forall a b. (a -> b) -> a -> b
$ do
CString
url' <- Text -> IO CString
textToCString Text
url
Ptr File
location' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
location
Ptr CloneOptions
maybeOptions <- case Maybe b
options of
Maybe b
Nothing -> Ptr CloneOptions -> IO (Ptr CloneOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CloneOptions
forall a. Ptr a
nullPtr
Just b
jOptions -> do
Ptr CloneOptions
jOptions' <- b -> IO (Ptr CloneOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jOptions
Ptr CloneOptions -> IO (Ptr CloneOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CloneOptions
jOptions'
IO (Maybe Repository) -> IO () -> IO (Maybe Repository)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Repository
result <- (Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository))
-> (Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository)
forall a b. (a -> b) -> a -> b
$ CString
-> Ptr File
-> Ptr CloneOptions
-> Ptr (Ptr GError)
-> IO (Ptr Repository)
ggit_repository_clone CString
url' Ptr File
location' Ptr CloneOptions
maybeOptions
Maybe Repository
maybeResult <- Ptr Repository
-> (Ptr Repository -> IO Repository) -> IO (Maybe Repository)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Repository
result ((Ptr Repository -> IO Repository) -> IO (Maybe Repository))
-> (Ptr Repository -> IO Repository) -> IO (Maybe Repository)
forall a b. (a -> b) -> a -> b
$ \Ptr Repository
result' -> do
Repository
result'' <- ((ManagedPtr Repository -> Repository)
-> Ptr Repository -> IO Repository
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repository -> Repository
Repository) Ptr Repository
result'
Repository -> IO Repository
forall (m :: * -> *) a. Monad m => a -> m a
return Repository
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
location
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
options b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
Maybe Repository -> IO (Maybe Repository)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Repository
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ggit_repository_discover" ggit_repository_discover ::
Ptr Gio.File.File ->
Ptr (Ptr GError) ->
IO (Ptr Gio.File.File)
repositoryDiscover ::
(B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) =>
a
-> m (Maybe Gio.File.File)
repositoryDiscover :: a -> m (Maybe File)
repositoryDiscover a
location = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ do
Ptr File
location' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
location
IO (Maybe File) -> IO () -> IO (Maybe File)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr File
result <- (Ptr (Ptr GError) -> IO (Ptr File)) -> IO (Ptr File)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr (Ptr GError) -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ Ptr File -> Ptr (Ptr GError) -> IO (Ptr File)
ggit_repository_discover Ptr File
location'
Maybe File
maybeResult <- Ptr File -> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr File
result ((Ptr File -> IO File) -> IO (Maybe File))
-> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
result' -> do
File
result'' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result'
File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
location
Maybe File -> IO (Maybe File)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ggit_repository_discover_full" ggit_repository_discover_full ::
Ptr Gio.File.File ->
CInt ->
Ptr CString ->
Ptr (Ptr GError) ->
IO (Ptr Gio.File.File)
repositoryDiscoverFull ::
(B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) =>
a
-> Bool
-> Maybe ([T.Text])
-> m (Maybe Gio.File.File)
repositoryDiscoverFull :: a -> Bool -> Maybe [Text] -> m (Maybe File)
repositoryDiscoverFull a
location Bool
acrossFs Maybe [Text]
ceilingDirs = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ do
Ptr File
location' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
location
let acrossFs' :: CInt
acrossFs' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
acrossFs
Ptr CString
maybeCeilingDirs <- case Maybe [Text]
ceilingDirs of
Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
Just [Text]
jCeilingDirs -> do
Ptr CString
jCeilingDirs' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jCeilingDirs
Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jCeilingDirs'
IO (Maybe File) -> IO () -> IO (Maybe File)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr File
result <- (Ptr (Ptr GError) -> IO (Ptr File)) -> IO (Ptr File)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr (Ptr GError) -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ Ptr File
-> CInt -> Ptr CString -> Ptr (Ptr GError) -> IO (Ptr File)
ggit_repository_discover_full Ptr File
location' CInt
acrossFs' Ptr CString
maybeCeilingDirs
Maybe File
maybeResult <- Ptr File -> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr File
result ((Ptr File -> IO File) -> IO (Maybe File))
-> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
result' -> do
File
result'' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result'
File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
location
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeCeilingDirs
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeCeilingDirs
Maybe File -> IO (Maybe File)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
maybeResult
) (do
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeCeilingDirs
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeCeilingDirs
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ggit_repository_init_repository" ggit_repository_init_repository ::
Ptr Gio.File.File ->
CInt ->
Ptr (Ptr GError) ->
IO (Ptr Repository)
repositoryInitRepository ::
(B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) =>
a
-> Bool
-> m (Maybe Repository)
repositoryInitRepository :: a -> Bool -> m (Maybe Repository)
repositoryInitRepository a
location Bool
isBare = IO (Maybe Repository) -> m (Maybe Repository)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Repository) -> m (Maybe Repository))
-> IO (Maybe Repository) -> m (Maybe Repository)
forall a b. (a -> b) -> a -> b
$ do
Ptr File
location' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
location
let isBare' :: CInt
isBare' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
isBare
IO (Maybe Repository) -> IO () -> IO (Maybe Repository)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Repository
result <- (Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository))
-> (Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository)
forall a b. (a -> b) -> a -> b
$ Ptr File -> CInt -> Ptr (Ptr GError) -> IO (Ptr Repository)
ggit_repository_init_repository Ptr File
location' CInt
isBare'
Maybe Repository
maybeResult <- Ptr Repository
-> (Ptr Repository -> IO Repository) -> IO (Maybe Repository)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Repository
result ((Ptr Repository -> IO Repository) -> IO (Maybe Repository))
-> (Ptr Repository -> IO Repository) -> IO (Maybe Repository)
forall a b. (a -> b) -> a -> b
$ \Ptr Repository
result' -> do
Repository
result'' <- ((ManagedPtr Repository -> Repository)
-> Ptr Repository -> IO Repository
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repository -> Repository
Repository) Ptr Repository
result'
Repository -> IO Repository
forall (m :: * -> *) a. Monad m => a -> m a
return Repository
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
location
Maybe Repository -> IO (Maybe Repository)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Repository
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ggit_repository_open" ggit_repository_open ::
Ptr Gio.File.File ->
Ptr (Ptr GError) ->
IO (Ptr Repository)
repositoryOpen ::
(B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) =>
a
-> m (Maybe Repository)
repositoryOpen :: a -> m (Maybe Repository)
repositoryOpen a
location = IO (Maybe Repository) -> m (Maybe Repository)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Repository) -> m (Maybe Repository))
-> IO (Maybe Repository) -> m (Maybe Repository)
forall a b. (a -> b) -> a -> b
$ do
Ptr File
location' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
location
IO (Maybe Repository) -> IO () -> IO (Maybe Repository)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Repository
result <- (Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository))
-> (Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository)
forall a b. (a -> b) -> a -> b
$ Ptr File -> Ptr (Ptr GError) -> IO (Ptr Repository)
ggit_repository_open Ptr File
location'
Maybe Repository
maybeResult <- Ptr Repository
-> (Ptr Repository -> IO Repository) -> IO (Maybe Repository)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Repository
result ((Ptr Repository -> IO Repository) -> IO (Maybe Repository))
-> (Ptr Repository -> IO Repository) -> IO (Maybe Repository)
forall a b. (a -> b) -> a -> b
$ \Ptr Repository
result' -> do
Repository
result'' <- ((ManagedPtr Repository -> Repository)
-> Ptr Repository -> IO Repository
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repository -> Repository
Repository) Ptr Repository
result'
Repository -> IO Repository
forall (m :: * -> *) a. Monad m => a -> m a
return Repository
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
location
Maybe Repository -> IO (Maybe Repository)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Repository
maybeResult
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
#endif