{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) Represents an existing git repository including all of it\'s object contents. -} module GI.Ggit.Objects.Repository ( -- * Exported types Repository(..) , IsRepository , toRepository , noRepository , -- * Methods -- ** addRemoteFetch #method:addRemoteFetch# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryAddRemoteFetchMethodInfo , #endif repositoryAddRemoteFetch , -- ** addRemotePush #method:addRemotePush# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryAddRemotePushMethodInfo , #endif repositoryAddRemotePush , -- ** blameFile #method:blameFile# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryBlameFileMethodInfo , #endif repositoryBlameFile , -- ** checkoutHead #method:checkoutHead# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCheckoutHeadMethodInfo , #endif repositoryCheckoutHead , -- ** checkoutIndex #method:checkoutIndex# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCheckoutIndexMethodInfo , #endif repositoryCheckoutIndex , -- ** checkoutTree #method:checkoutTree# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCheckoutTreeMethodInfo , #endif repositoryCheckoutTree , -- ** cherryPick #method:cherryPick# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCherryPickMethodInfo , #endif repositoryCherryPick , -- ** cherryPickCommit #method:cherryPickCommit# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCherryPickCommitMethodInfo , #endif repositoryCherryPickCommit , -- ** clone #method:clone# repositoryClone , -- ** createBlob #method:createBlob# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateBlobMethodInfo , #endif repositoryCreateBlob , -- ** createBlobFromBuffer #method:createBlobFromBuffer# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateBlobFromBufferMethodInfo, #endif repositoryCreateBlobFromBuffer , -- ** createBlobFromFile #method:createBlobFromFile# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateBlobFromFileMethodInfo , #endif repositoryCreateBlobFromFile , -- ** createBlobFromPath #method:createBlobFromPath# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateBlobFromPathMethodInfo , #endif repositoryCreateBlobFromPath , -- ** createBranch #method:createBranch# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateBranchMethodInfo , #endif repositoryCreateBranch , -- ** createCommit #method:createCommit# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateCommitMethodInfo , #endif repositoryCreateCommit , -- ** createCommitFromIds #method:createCommitFromIds# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateCommitFromIdsMethodInfo , #endif repositoryCreateCommitFromIds , -- ** createIndexEntryForFile #method:createIndexEntryForFile# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateIndexEntryForFileMethodInfo, #endif repositoryCreateIndexEntryForFile , -- ** createIndexEntryForPath #method:createIndexEntryForPath# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateIndexEntryForPathMethodInfo, #endif repositoryCreateIndexEntryForPath , -- ** createNote #method:createNote# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateNoteMethodInfo , #endif repositoryCreateNote , -- ** createReference #method:createReference# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateReferenceMethodInfo , #endif repositoryCreateReference , -- ** createRemote #method:createRemote# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateRemoteMethodInfo , #endif repositoryCreateRemote , -- ** createSymbolicReference #method:createSymbolicReference# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateSymbolicReferenceMethodInfo, #endif repositoryCreateSymbolicReference , -- ** createTag #method:createTag# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateTagMethodInfo , #endif repositoryCreateTag , -- ** createTagAnnotation #method:createTagAnnotation# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateTagAnnotationMethodInfo , #endif repositoryCreateTagAnnotation , -- ** createTagFromBuffer #method:createTagFromBuffer# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateTagFromBufferMethodInfo , #endif repositoryCreateTagFromBuffer , -- ** createTagLightweight #method:createTagLightweight# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateTagLightweightMethodInfo, #endif repositoryCreateTagLightweight , -- ** createTreeBuilder #method:createTreeBuilder# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateTreeBuilderMethodInfo , #endif repositoryCreateTreeBuilder , -- ** createTreeBuilderFromTree #method:createTreeBuilderFromTree# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCreateTreeBuilderFromTreeMethodInfo, #endif repositoryCreateTreeBuilderFromTree , -- ** deleteTag #method:deleteTag# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryDeleteTagMethodInfo , #endif repositoryDeleteTag , -- ** discover #method:discover# repositoryDiscover , -- ** discoverFull #method:discoverFull# repositoryDiscoverFull , -- ** dropStash #method:dropStash# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryDropStashMethodInfo , #endif repositoryDropStash , -- ** enumerateBranches #method:enumerateBranches# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryEnumerateBranchesMethodInfo , #endif repositoryEnumerateBranches , -- ** fileStatus #method:fileStatus# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryFileStatusMethodInfo , #endif repositoryFileStatus , -- ** fileStatusForeach #method:fileStatusForeach# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryFileStatusForeachMethodInfo , #endif repositoryFileStatusForeach , -- ** getAheadBehind #method:getAheadBehind# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetAheadBehindMethodInfo , #endif repositoryGetAheadBehind , -- ** getAttribute #method:getAttribute# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetAttributeMethodInfo , #endif repositoryGetAttribute , -- ** getConfig #method:getConfig# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetConfigMethodInfo , #endif repositoryGetConfig , -- ** getDefaultNotesRef #method:getDefaultNotesRef# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetDefaultNotesRefMethodInfo , #endif repositoryGetDefaultNotesRef , -- ** getDescendantOf #method:getDescendantOf# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetDescendantOfMethodInfo , #endif repositoryGetDescendantOf , -- ** getHead #method:getHead# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetHeadMethodInfo , #endif repositoryGetHead , -- ** getIndex #method:getIndex# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetIndexMethodInfo , #endif repositoryGetIndex , -- ** getLocation #method:getLocation# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetLocationMethodInfo , #endif repositoryGetLocation , -- ** getSubmoduleStatus #method:getSubmoduleStatus# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetSubmoduleStatusMethodInfo , #endif repositoryGetSubmoduleStatus , -- ** getWorkdir #method:getWorkdir# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetWorkdirMethodInfo , #endif repositoryGetWorkdir , -- ** initRepository #method:initRepository# repositoryInitRepository , -- ** isBare #method:isBare# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryIsBareMethodInfo , #endif repositoryIsBare , -- ** isEmpty #method:isEmpty# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryIsEmptyMethodInfo , #endif repositoryIsEmpty , -- ** isHeadDetached #method:isHeadDetached# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryIsHeadDetachedMethodInfo , #endif repositoryIsHeadDetached , -- ** isHeadUnborn #method:isHeadUnborn# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryIsHeadUnbornMethodInfo , #endif repositoryIsHeadUnborn , -- ** listRemotes #method:listRemotes# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryListRemotesMethodInfo , #endif repositoryListRemotes , -- ** listTags #method:listTags# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryListTagsMethodInfo , #endif repositoryListTags , -- ** listTagsMatch #method:listTagsMatch# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryListTagsMatchMethodInfo , #endif repositoryListTagsMatch , -- ** lookup #method:lookup# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryLookupMethodInfo , #endif repositoryLookup , -- ** lookupBranch #method:lookupBranch# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryLookupBranchMethodInfo , #endif repositoryLookupBranch , -- ** lookupReference #method:lookupReference# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryLookupReferenceMethodInfo , #endif repositoryLookupReference , -- ** lookupReferenceDwim #method:lookupReferenceDwim# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryLookupReferenceDwimMethodInfo , #endif repositoryLookupReferenceDwim , -- ** lookupRemote #method:lookupRemote# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryLookupRemoteMethodInfo , #endif repositoryLookupRemote , -- ** lookupSubmodule #method:lookupSubmodule# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryLookupSubmoduleMethodInfo , #endif repositoryLookupSubmodule , -- ** mergeCommits #method:mergeCommits# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryMergeCommitsMethodInfo , #endif repositoryMergeCommits , -- ** mergeTrees #method:mergeTrees# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryMergeTreesMethodInfo , #endif repositoryMergeTrees , -- ** noteForeach #method:noteForeach# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryNoteForeachMethodInfo , #endif repositoryNoteForeach , -- ** open #method:open# repositoryOpen , -- ** pathIsIgnored #method:pathIsIgnored# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryPathIsIgnoredMethodInfo , #endif repositoryPathIsIgnored , -- ** readNote #method:readNote# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryReadNoteMethodInfo , #endif repositoryReadNote , -- ** rebaseInit #method:rebaseInit# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryRebaseInitMethodInfo , #endif repositoryRebaseInit , -- ** rebaseOpen #method:rebaseOpen# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryRebaseOpenMethodInfo , #endif repositoryRebaseOpen , -- ** referencesForeach #method:referencesForeach# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryReferencesForeachMethodInfo , #endif repositoryReferencesForeach , -- ** referencesForeachName #method:referencesForeachName# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryReferencesForeachNameMethodInfo, #endif repositoryReferencesForeachName , -- ** removeNote #method:removeNote# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryRemoveNoteMethodInfo , #endif repositoryRemoveNote , -- ** reset #method:reset# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryResetMethodInfo , #endif repositoryReset , -- ** resetDefault #method:resetDefault# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryResetDefaultMethodInfo , #endif repositoryResetDefault , -- ** revert #method:revert# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryRevertMethodInfo , #endif repositoryRevert , -- ** revparse #method:revparse# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryRevparseMethodInfo , #endif repositoryRevparse , -- ** saveStash #method:saveStash# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositorySaveStashMethodInfo , #endif repositorySaveStash , -- ** setHead #method:setHead# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositorySetHeadMethodInfo , #endif repositorySetHead , -- ** setSubmoduleFetchRecurse #method:setSubmoduleFetchRecurse# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositorySetSubmoduleFetchRecurseMethodInfo, #endif repositorySetSubmoduleFetchRecurse , -- ** setSubmoduleIgnore #method:setSubmoduleIgnore# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositorySetSubmoduleIgnoreMethodInfo , #endif repositorySetSubmoduleIgnore , -- ** setSubmoduleUpdate #method:setSubmoduleUpdate# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositorySetSubmoduleUpdateMethodInfo , #endif repositorySetSubmoduleUpdate , -- ** setSubmoduleUrl #method:setSubmoduleUrl# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositorySetSubmoduleUrlMethodInfo , #endif repositorySetSubmoduleUrl , -- ** setWorkdir #method:setWorkdir# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositorySetWorkdirMethodInfo , #endif repositorySetWorkdir , -- ** stashForeach #method:stashForeach# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryStashForeachMethodInfo , #endif repositoryStashForeach , -- ** submoduleForeach #method:submoduleForeach# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositorySubmoduleForeachMethodInfo , #endif repositorySubmoduleForeach , -- ** tagForeach #method:tagForeach# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryTagForeachMethodInfo , #endif repositoryTagForeach , -- * Properties -- ** cloneOptions #attr:cloneOptions# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryCloneOptionsPropertyInfo , #endif constructRepositoryCloneOptions , getRepositoryCloneOptions , #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) repositoryCloneOptions , #endif -- ** head #attr:head# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryHeadPropertyInfo , #endif getRepositoryHead , #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) repositoryHead , #endif -- ** init #attr:init# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryInitPropertyInfo , #endif constructRepositoryInit , getRepositoryInit , #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) repositoryInit , #endif -- ** isBare #attr:isBare# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryIsBarePropertyInfo , #endif constructRepositoryIsBare , getRepositoryIsBare , -- ** location #attr:location# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryLocationPropertyInfo , #endif constructRepositoryLocation , getRepositoryLocation , #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) repositoryLocation , #endif -- ** url #attr:url# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryUrlPropertyInfo , #endif constructRepositoryUrl , getRepositoryUrl , #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) repositoryUrl , #endif -- ** workdir #attr:workdir# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryWorkdirPropertyInfo , #endif clearRepositoryWorkdir , constructRepositoryWorkdir , getRepositoryWorkdir , #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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.ManagedPtr as B.ManagedPtr import qualified Data.GI.Base.GError as B.GError import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack 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 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.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.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 (ManagedPtr Repository) foreign import ccall "ggit_repository_get_type" c_ggit_repository_get_type :: IO GType instance GObject Repository where gobjectType _ = c_ggit_repository_get_type class GObject o => IsRepository o #if MIN_VERSION_base(4,9,0) instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError Repository a) => IsRepository a #endif instance IsRepository Repository instance Ggit.Native.IsNative Repository instance Ggit.ObjectFactoryBase.IsObjectFactoryBase Repository instance GObject.Object.IsObject Repository instance Gio.Initable.IsInitable Repository toRepository :: (MonadIO m, IsRepository o) => o -> m Repository toRepository = liftIO . unsafeCastTo Repository noRepository :: Maybe Repository noRepository = Nothing #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 "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 "lookupBranch" o = RepositoryLookupBranchMethodInfo ResolveRepositoryMethod "lookupReference" o = RepositoryLookupReferenceMethodInfo ResolveRepositoryMethod "lookupReferenceDwim" o = RepositoryLookupReferenceDwimMethodInfo ResolveRepositoryMethod "lookupRemote" o = RepositoryLookupRemoteMethodInfo ResolveRepositoryMethod "lookupSubmodule" o = RepositoryLookupSubmoduleMethodInfo 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 "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo ResolveRepositoryMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo 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 "setHead" o = RepositorySetHeadMethodInfo ResolveRepositoryMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo 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) => O.IsLabelProxy t (Repository -> p) where fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #if MIN_VERSION_base(4,9,0) instance (info ~ ResolveRepositoryMethod t Repository, O.MethodInfo info Repository p) => O.IsLabel t (Repository -> p) where #if MIN_VERSION_base(4,10,0) fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #else fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #endif #endif #endif -- VVV Prop "clone-options" -- Type: TInterface (Name {namespace = "Ggit", name = "CloneOptions"}) -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly] -- Nullable: (Nothing,Nothing) getRepositoryCloneOptions :: (MonadIO m, IsRepository o) => o -> m (Maybe Ggit.CloneOptions.CloneOptions) getRepositoryCloneOptions obj = liftIO $ getObjectPropertyObject obj "clone-options" Ggit.CloneOptions.CloneOptions constructRepositoryCloneOptions :: (IsRepository o, Ggit.CloneOptions.IsCloneOptions a) => a -> IO (GValueConstruct o) constructRepositoryCloneOptions val = constructObjectPropertyObject "clone-options" (Just val) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCloneOptionsPropertyInfo instance AttrInfo RepositoryCloneOptionsPropertyInfo where type AttrAllowedOps RepositoryCloneOptionsPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear] type AttrSetTypeConstraint RepositoryCloneOptionsPropertyInfo = Ggit.CloneOptions.IsCloneOptions type AttrBaseTypeConstraint RepositoryCloneOptionsPropertyInfo = IsRepository type AttrGetType RepositoryCloneOptionsPropertyInfo = (Maybe Ggit.CloneOptions.CloneOptions) type AttrLabel RepositoryCloneOptionsPropertyInfo = "clone-options" type AttrOrigin RepositoryCloneOptionsPropertyInfo = Repository attrGet _ = getRepositoryCloneOptions attrSet _ = undefined attrConstruct _ = constructRepositoryCloneOptions attrClear _ = undefined #endif -- VVV Prop "head" -- Type: TInterface (Name {namespace = "Ggit", name = "Ref"}) -- Flags: [PropertyReadable] -- Nullable: (Nothing,Nothing) getRepositoryHead :: (MonadIO m, IsRepository o) => o -> m (Maybe Ggit.Ref.Ref) getRepositoryHead obj = liftIO $ getObjectPropertyObject obj "head" Ggit.Ref.Ref #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryHeadPropertyInfo instance AttrInfo RepositoryHeadPropertyInfo where type AttrAllowedOps RepositoryHeadPropertyInfo = '[ 'AttrGet, 'AttrClear] type AttrSetTypeConstraint RepositoryHeadPropertyInfo = (~) () type AttrBaseTypeConstraint RepositoryHeadPropertyInfo = IsRepository type AttrGetType RepositoryHeadPropertyInfo = (Maybe Ggit.Ref.Ref) type AttrLabel RepositoryHeadPropertyInfo = "head" type AttrOrigin RepositoryHeadPropertyInfo = Repository attrGet _ = getRepositoryHead attrSet _ = undefined attrConstruct _ = undefined attrClear _ = undefined #endif -- VVV Prop "init" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly] -- Nullable: (Nothing,Nothing) getRepositoryInit :: (MonadIO m, IsRepository o) => o -> m Bool getRepositoryInit obj = liftIO $ getObjectPropertyBool obj "init" constructRepositoryInit :: (IsRepository o) => Bool -> IO (GValueConstruct o) constructRepositoryInit val = constructObjectPropertyBool "init" val #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryInitPropertyInfo instance AttrInfo RepositoryInitPropertyInfo where type AttrAllowedOps RepositoryInitPropertyInfo = '[ 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint RepositoryInitPropertyInfo = (~) Bool type AttrBaseTypeConstraint RepositoryInitPropertyInfo = IsRepository type AttrGetType RepositoryInitPropertyInfo = Bool type AttrLabel RepositoryInitPropertyInfo = "init" type AttrOrigin RepositoryInitPropertyInfo = Repository attrGet _ = getRepositoryInit attrSet _ = undefined attrConstruct _ = constructRepositoryInit attrClear _ = undefined #endif -- VVV Prop "is-bare" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly] -- Nullable: (Nothing,Nothing) getRepositoryIsBare :: (MonadIO m, IsRepository o) => o -> m Bool getRepositoryIsBare obj = liftIO $ getObjectPropertyBool obj "is-bare" constructRepositoryIsBare :: (IsRepository o) => Bool -> IO (GValueConstruct o) constructRepositoryIsBare val = constructObjectPropertyBool "is-bare" val #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryIsBarePropertyInfo instance AttrInfo RepositoryIsBarePropertyInfo where type AttrAllowedOps RepositoryIsBarePropertyInfo = '[ 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint RepositoryIsBarePropertyInfo = (~) Bool type AttrBaseTypeConstraint RepositoryIsBarePropertyInfo = IsRepository type AttrGetType RepositoryIsBarePropertyInfo = Bool type AttrLabel RepositoryIsBarePropertyInfo = "is-bare" type AttrOrigin RepositoryIsBarePropertyInfo = Repository attrGet _ = getRepositoryIsBare attrSet _ = undefined attrConstruct _ = constructRepositoryIsBare attrClear _ = undefined #endif -- VVV Prop "location" -- Type: TInterface (Name {namespace = "Gio", name = "File"}) -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly] -- Nullable: (Nothing,Nothing) getRepositoryLocation :: (MonadIO m, IsRepository o) => o -> m (Maybe Gio.File.File) getRepositoryLocation obj = liftIO $ getObjectPropertyObject obj "location" Gio.File.File constructRepositoryLocation :: (IsRepository o, Gio.File.IsFile a) => a -> IO (GValueConstruct o) constructRepositoryLocation val = constructObjectPropertyObject "location" (Just val) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryLocationPropertyInfo instance AttrInfo RepositoryLocationPropertyInfo where type AttrAllowedOps RepositoryLocationPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear] type AttrSetTypeConstraint RepositoryLocationPropertyInfo = Gio.File.IsFile type AttrBaseTypeConstraint RepositoryLocationPropertyInfo = IsRepository type AttrGetType RepositoryLocationPropertyInfo = (Maybe Gio.File.File) type AttrLabel RepositoryLocationPropertyInfo = "location" type AttrOrigin RepositoryLocationPropertyInfo = Repository attrGet _ = getRepositoryLocation attrSet _ = undefined attrConstruct _ = constructRepositoryLocation attrClear _ = undefined #endif -- VVV Prop "url" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly] -- Nullable: (Nothing,Nothing) getRepositoryUrl :: (MonadIO m, IsRepository o) => o -> m (Maybe T.Text) getRepositoryUrl obj = liftIO $ getObjectPropertyString obj "url" constructRepositoryUrl :: (IsRepository o) => T.Text -> IO (GValueConstruct o) constructRepositoryUrl val = constructObjectPropertyString "url" (Just val) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryUrlPropertyInfo instance AttrInfo RepositoryUrlPropertyInfo where type AttrAllowedOps RepositoryUrlPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear] type AttrSetTypeConstraint RepositoryUrlPropertyInfo = (~) T.Text type AttrBaseTypeConstraint RepositoryUrlPropertyInfo = IsRepository type AttrGetType RepositoryUrlPropertyInfo = (Maybe T.Text) type AttrLabel RepositoryUrlPropertyInfo = "url" type AttrOrigin RepositoryUrlPropertyInfo = Repository attrGet _ = getRepositoryUrl attrSet _ = undefined attrConstruct _ = constructRepositoryUrl attrClear _ = undefined #endif -- VVV Prop "workdir" -- Type: TInterface (Name {namespace = "Gio", name = "File"}) -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct] -- Nullable: (Nothing,Nothing) getRepositoryWorkdir :: (MonadIO m, IsRepository o) => o -> m (Maybe Gio.File.File) getRepositoryWorkdir obj = liftIO $ getObjectPropertyObject obj "workdir" Gio.File.File setRepositoryWorkdir :: (MonadIO m, IsRepository o, Gio.File.IsFile a) => o -> a -> m () setRepositoryWorkdir obj val = liftIO $ setObjectPropertyObject obj "workdir" (Just val) constructRepositoryWorkdir :: (IsRepository o, Gio.File.IsFile a) => a -> IO (GValueConstruct o) constructRepositoryWorkdir val = constructObjectPropertyObject "workdir" (Just val) clearRepositoryWorkdir :: (MonadIO m, IsRepository o) => o -> m () clearRepositoryWorkdir obj = liftIO $ setObjectPropertyObject obj "workdir" (Nothing :: Maybe Gio.File.File) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryWorkdirPropertyInfo instance AttrInfo RepositoryWorkdirPropertyInfo where type AttrAllowedOps RepositoryWorkdirPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear] type AttrSetTypeConstraint RepositoryWorkdirPropertyInfo = Gio.File.IsFile type AttrBaseTypeConstraint RepositoryWorkdirPropertyInfo = IsRepository type AttrGetType RepositoryWorkdirPropertyInfo = (Maybe Gio.File.File) type AttrLabel RepositoryWorkdirPropertyInfo = "workdir" type AttrOrigin RepositoryWorkdirPropertyInfo = Repository attrGet _ = getRepositoryWorkdir attrSet _ = setRepositoryWorkdir attrConstruct _ = constructRepositoryWorkdir attrClear _ = clearRepositoryWorkdir #endif #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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) && !defined(__HADDOCK_VERSION__) 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) && !defined(__HADDOCK_VERSION__) type instance O.SignalList Repository = RepositorySignalList type RepositorySignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)]) #endif -- method Repository::add_remote_fetch -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "remote", argType = TInterface (Name {namespace = "Ggit", name = "Remote"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRemote.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "refspec", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the fetch refspec.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : True -- Skip return : False foreign import ccall "ggit_repository_add_remote_fetch" ggit_repository_add_remote_fetch :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.Remote.Remote -> -- remote : TInterface (Name {namespace = "Ggit", name = "Remote"}) CString -> -- refspec : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO () {- | Adds a fetch refspec to the /@remote@/\'s configuration. Adds /@refspec@/ to the fetch list in the configuration. No loaded remote instances will be affected. -} repositoryAddRemoteFetch :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Remote.IsRemote b) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> b {- ^ /@remote@/: a 'GI.Ggit.Objects.Remote.Remote'. -} -> T.Text {- ^ /@refspec@/: the fetch refspec. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryAddRemoteFetch repository remote refspec = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository remote' <- unsafeManagedPtrCastPtr remote refspec' <- textToCString refspec onException (do propagateGError $ ggit_repository_add_remote_fetch repository' remote' refspec' touchManagedPtr repository touchManagedPtr remote freeMem refspec' return () ) (do freeMem refspec' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::add_remote_push -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "remote", argType = TInterface (Name {namespace = "Ggit", name = "Remote"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRemote.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "refspec", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the push refspec.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : True -- Skip return : False foreign import ccall "ggit_repository_add_remote_push" ggit_repository_add_remote_push :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.Remote.Remote -> -- remote : TInterface (Name {namespace = "Ggit", name = "Remote"}) CString -> -- refspec : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO () {- | Adds a push refspec to /@remote@/\'s configuration. Adds the given refspec to the push list in the configuration. No loaded remote instances will be affected. -} repositoryAddRemotePush :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Remote.IsRemote b) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> b {- ^ /@remote@/: a 'GI.Ggit.Objects.Remote.Remote'. -} -> T.Text {- ^ /@refspec@/: the push refspec. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryAddRemotePush repository remote refspec = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository remote' <- unsafeManagedPtrCastPtr remote refspec' <- textToCString refspec onException (do propagateGError $ ggit_repository_add_remote_push repository' remote' refspec' touchManagedPtr repository touchManagedPtr remote freeMem refspec' return () ) (do freeMem refspec' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::blame_file -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the file to blame.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "blame_options", argType = TInterface (Name {namespace = "Ggit", name = "BlameOptions"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "blame options.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Blame"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_blame_file" ggit_repository_blame_file :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Gio.File.File -> -- file : TInterface (Name {namespace = "Gio", name = "File"}) Ptr Ggit.BlameOptions.BlameOptions -> -- blame_options : TInterface (Name {namespace = "Ggit", name = "BlameOptions"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Blame.Blame) {- | Get a blame for a single file. -} repositoryBlameFile :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Gio.File.IsFile b) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> b {- ^ /@file@/: the file to blame. -} -> Maybe (Ggit.BlameOptions.BlameOptions) {- ^ /@blameOptions@/: blame options. -} -> m Ggit.Blame.Blame {- ^ __Returns:__ a 'GI.Ggit.Objects.Blame.Blame'. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryBlameFile repository file blameOptions = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository file' <- unsafeManagedPtrCastPtr file maybeBlameOptions <- case blameOptions of Nothing -> return nullPtr Just jBlameOptions -> do jBlameOptions' <- unsafeManagedPtrGetPtr jBlameOptions return jBlameOptions' onException (do result <- propagateGError $ ggit_repository_blame_file repository' file' maybeBlameOptions checkUnexpectedReturnNULL "repositoryBlameFile" result result' <- (wrapObject Ggit.Blame.Blame) result touchManagedPtr repository touchManagedPtr file whenJust blameOptions touchManagedPtr return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryBlameFileMethodInfo instance (signature ~ (b -> Maybe (Ggit.BlameOptions.BlameOptions) -> m Ggit.Blame.Blame), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.MethodInfo RepositoryBlameFileMethodInfo a signature where overloadedMethod _ = repositoryBlameFile #endif -- method Repository::checkout_head -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "options", argType = TInterface (Name {namespace = "Ggit", name = "CheckoutOptions"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GgitCheckoutOptions or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_checkout_head" ggit_repository_checkout_head :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.CheckoutOptions.CheckoutOptions -> -- options : TInterface (Name {namespace = "Ggit", name = "CheckoutOptions"}) Ptr (Ptr GError) -> -- error IO CInt {- | Update files in the working tree to reflect the contents of current HEAD. If /@options@/ is 'Nothing', then the default checkout options will be used. If the checkout was not successfull, then /@error@/ will be set. -} repositoryCheckoutHead :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.CheckoutOptions.IsCheckoutOptions b) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (b) {- ^ /@options@/: a 'GI.Ggit.Objects.CheckoutOptions.CheckoutOptions' or 'Nothing'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCheckoutHead repository options = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository maybeOptions <- case options of Nothing -> return nullPtr Just jOptions -> do jOptions' <- unsafeManagedPtrCastPtr jOptions return jOptions' onException (do _ <- propagateGError $ ggit_repository_checkout_head repository' maybeOptions touchManagedPtr repository whenJust options touchManagedPtr return () ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCheckoutHeadMethodInfo instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsRepository a, Ggit.CheckoutOptions.IsCheckoutOptions b) => O.MethodInfo RepositoryCheckoutHeadMethodInfo a signature where overloadedMethod _ = repositoryCheckoutHead #endif -- method Repository::checkout_index -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index", argType = TInterface (Name {namespace = "Ggit", name = "Index"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GgitIndex or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "options", argType = TInterface (Name {namespace = "Ggit", name = "CheckoutOptions"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GgitCheckoutOptions or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_checkout_index" ggit_repository_checkout_index :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.Index.Index -> -- index : TInterface (Name {namespace = "Ggit", name = "Index"}) Ptr Ggit.CheckoutOptions.CheckoutOptions -> -- options : TInterface (Name {namespace = "Ggit", name = "CheckoutOptions"}) Ptr (Ptr GError) -> -- error IO CInt {- | Update files in the working tree to reflect the contents of the index. If /@index@/ is 'Nothing', then the current index of the repository will be used. If /@options@/ is 'Nothing', then the default checkout options will be used. If the checkout was not successfull, then /@error@/ will be set. -} repositoryCheckoutIndex :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Index.IsIndex b, Ggit.CheckoutOptions.IsCheckoutOptions c) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (b) {- ^ /@index@/: a 'GI.Ggit.Objects.Index.Index' or 'Nothing'. -} -> Maybe (c) {- ^ /@options@/: a 'GI.Ggit.Objects.CheckoutOptions.CheckoutOptions' or 'Nothing'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCheckoutIndex repository index options = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository maybeIndex <- case index of Nothing -> return nullPtr Just jIndex -> do jIndex' <- unsafeManagedPtrCastPtr jIndex return jIndex' maybeOptions <- case options of Nothing -> return nullPtr Just jOptions -> do jOptions' <- unsafeManagedPtrCastPtr jOptions return jOptions' onException (do _ <- propagateGError $ ggit_repository_checkout_index repository' maybeIndex maybeOptions touchManagedPtr repository whenJust index touchManagedPtr whenJust options touchManagedPtr return () ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::checkout_tree -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tree", argType = TInterface (Name {namespace = "Ggit", name = "Object"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GgitObject or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "options", argType = TInterface (Name {namespace = "Ggit", name = "CheckoutOptions"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GgitCheckoutOptions or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_checkout_tree" ggit_repository_checkout_tree :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.Object.Object -> -- tree : TInterface (Name {namespace = "Ggit", name = "Object"}) Ptr Ggit.CheckoutOptions.CheckoutOptions -> -- options : TInterface (Name {namespace = "Ggit", name = "CheckoutOptions"}) Ptr (Ptr GError) -> -- error IO CInt {- | Update files in the working tree to reflect the contents of the specified commit, tag or tree object. If /@tree@/ is 'Nothing', then the current HEAD of the repository will be used. If /@options@/ is 'Nothing', then the default checkout options will be used. If the checkout was not successfull, then /@error@/ will be set. -} repositoryCheckoutTree :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.CheckoutOptions.IsCheckoutOptions c) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (b) {- ^ /@tree@/: a 'GI.Ggit.Objects.Object.Object' or 'Nothing'. -} -> Maybe (c) {- ^ /@options@/: a 'GI.Ggit.Objects.CheckoutOptions.CheckoutOptions' or 'Nothing'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCheckoutTree repository tree options = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository maybeTree <- case tree of Nothing -> return nullPtr Just jTree -> do jTree' <- unsafeManagedPtrCastPtr jTree return jTree' maybeOptions <- case options of Nothing -> return nullPtr Just jOptions -> do jOptions' <- unsafeManagedPtrCastPtr jOptions return jOptions' onException (do _ <- propagateGError $ ggit_repository_checkout_tree repository' maybeTree maybeOptions touchManagedPtr repository whenJust tree touchManagedPtr whenJust options touchManagedPtr return () ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::cherry_pick -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "commit", argType = TInterface (Name {namespace = "Ggit", name = "Commit"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitCommit.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "options", argType = TInterface (Name {namespace = "Ggit", name = "CherryPickOptions"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitCherryPickOptions.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_cherry_pick" ggit_repository_cherry_pick :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.Commit.Commit -> -- commit : TInterface (Name {namespace = "Ggit", name = "Commit"}) Ptr Ggit.CherryPickOptions.CherryPickOptions -> -- options : TInterface (Name {namespace = "Ggit", name = "CherryPickOptions"}) Ptr (Ptr GError) -> -- error IO CInt {- | Cherry pick the specified commit, making changes in the index and the working directory. -} repositoryCherryPick :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.CherryPickOptions.IsCherryPickOptions c) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> b {- ^ /@commit@/: a 'GI.Ggit.Objects.Commit.Commit'. -} -> c {- ^ /@options@/: a 'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCherryPick repository commit options = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository commit' <- unsafeManagedPtrCastPtr commit options' <- unsafeManagedPtrCastPtr options onException (do _ <- propagateGError $ ggit_repository_cherry_pick repository' commit' options' touchManagedPtr repository touchManagedPtr commit touchManagedPtr options return () ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::cherry_pick_commit -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "commit", argType = TInterface (Name {namespace = "Ggit", name = "Commit"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitCommit to cherry-pick.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "our_commit", argType = TInterface (Name {namespace = "Ggit", name = "Commit"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitCommit to cherry-pick on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mainline", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the parent of the commit, in case of a merge commit.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "merge_options", argType = TInterface (Name {namespace = "Ggit", name = "MergeOptions"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GgitMergeOptions.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Index"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_cherry_pick_commit" ggit_repository_cherry_pick_commit :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.Commit.Commit -> -- commit : TInterface (Name {namespace = "Ggit", name = "Commit"}) Ptr Ggit.Commit.Commit -> -- our_commit : TInterface (Name {namespace = "Ggit", name = "Commit"}) Word32 -> -- mainline : TBasicType TUInt Ptr Ggit.MergeOptions.MergeOptions -> -- merge_options : TInterface (Name {namespace = "Ggit", name = "MergeOptions"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Index.Index) {- | Cherry-picks the given /@commit@/ against the provided /@ourCommit@/, producing and index that reflects the result of the cherry-pick. -} repositoryCherryPickCommit :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.Commit.IsCommit c) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> b {- ^ /@commit@/: a 'GI.Ggit.Objects.Commit.Commit' to cherry-pick. -} -> c {- ^ /@ourCommit@/: a 'GI.Ggit.Objects.Commit.Commit' to cherry-pick on. -} -> Word32 {- ^ /@mainline@/: the parent of the commit, in case of a merge commit. -} -> Maybe (Ggit.MergeOptions.MergeOptions) {- ^ /@mergeOptions@/: a 'GI.Ggit.Structs.MergeOptions.MergeOptions'. -} -> m Ggit.Index.Index {- ^ __Returns:__ a 'GI.Ggit.Objects.Index.Index'. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCherryPickCommit repository commit ourCommit mainline mergeOptions = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository commit' <- unsafeManagedPtrCastPtr commit ourCommit' <- unsafeManagedPtrCastPtr ourCommit maybeMergeOptions <- case mergeOptions of Nothing -> return nullPtr Just jMergeOptions -> do jMergeOptions' <- unsafeManagedPtrGetPtr jMergeOptions return jMergeOptions' onException (do result <- propagateGError $ ggit_repository_cherry_pick_commit repository' commit' ourCommit' mainline maybeMergeOptions checkUnexpectedReturnNULL "repositoryCherryPickCommit" result result' <- (wrapObject Ggit.Index.Index) result touchManagedPtr repository touchManagedPtr commit touchManagedPtr ourCommit whenJust mergeOptions touchManagedPtr return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCherryPickCommitMethodInfo instance (signature ~ (b -> c -> Word32 -> Maybe (Ggit.MergeOptions.MergeOptions) -> m Ggit.Index.Index), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.Commit.IsCommit c) => O.MethodInfo RepositoryCherryPickCommitMethodInfo a signature where overloadedMethod _ = repositoryCherryPickCommit #endif -- method Repository::create_blob -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "BlobOutputStream"})) -- throws : False -- Skip return : False foreign import ccall "ggit_repository_create_blob" ggit_repository_create_blob :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) IO (Ptr Ggit.BlobOutputStream.BlobOutputStream) {- | Create a new blob and return a 'GI.Gio.Objects.OutputStream.OutputStream' to write contents to the blob. This is an efficient way to create new blobs without copying data. The blob id can be obtained from the blob output stream using @/ggit_blob_output_stream_get_id/@, after you close the stream. -} repositoryCreateBlob :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m Ggit.BlobOutputStream.BlobOutputStream {- ^ __Returns:__ a 'GI.Ggit.Objects.BlobOutputStream.BlobOutputStream'. -} repositoryCreateBlob repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository result <- ggit_repository_create_blob repository' checkUnexpectedReturnNULL "repositoryCreateBlob" result result' <- (wrapObject Ggit.BlobOutputStream.BlobOutputStream) result touchManagedPtr repository return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCreateBlobMethodInfo instance (signature ~ (m Ggit.BlobOutputStream.BlobOutputStream), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateBlobMethodInfo a signature where overloadedMethod _ = repositoryCreateBlob #endif -- method Repository::create_blob_from_buffer -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "buffer", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the length (in bytes) of the data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [Arg {argCName = "size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the length (in bytes) of the data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "OId"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_blob_from_buffer" ggit_repository_create_blob_from_buffer :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Word8 -> -- buffer : TCArray False (-1) 2 (TBasicType TUInt8) Word64 -> -- size : TBasicType TUInt64 Ptr (Ptr GError) -> -- error IO (Ptr Ggit.OId.OId) {- | Write an in-memory buffer to the object database as a blob. -} repositoryCreateBlobFromBuffer :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> ByteString {- ^ /@buffer@/: the data. -} -> m Ggit.OId.OId {- ^ __Returns:__ the new @/GgitOid/@ of the written blob, or 'Nothing' if writing the blob failed. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateBlobFromBuffer repository buffer = liftIO $ do let size = fromIntegral $ B.length buffer repository' <- unsafeManagedPtrCastPtr repository buffer' <- packByteString buffer onException (do result <- propagateGError $ ggit_repository_create_blob_from_buffer repository' buffer' size checkUnexpectedReturnNULL "repositoryCreateBlobFromBuffer" result result' <- (wrapBoxed Ggit.OId.OId) result touchManagedPtr repository freeMem buffer' return result' ) (do freeMem buffer' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCreateBlobFromBufferMethodInfo instance (signature ~ (ByteString -> m Ggit.OId.OId), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateBlobFromBufferMethodInfo a signature where overloadedMethod _ = repositoryCreateBlobFromBuffer #endif -- method Repository::create_blob_from_file -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GFile.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "OId"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_blob_from_file" ggit_repository_create_blob_from_file :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Gio.File.File -> -- file : TInterface (Name {namespace = "Gio", name = "File"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.OId.OId) {- | Write a file to the object database as a blob. -} repositoryCreateBlobFromFile :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Gio.File.IsFile b) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> b {- ^ /@file@/: a 'GI.Gio.Interfaces.File.File'. -} -> m Ggit.OId.OId {- ^ __Returns:__ the new @/GgitOid/@ of the written blob, or 'Nothing' if writing the blob failed. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateBlobFromFile repository file = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository file' <- unsafeManagedPtrCastPtr file onException (do result <- propagateGError $ ggit_repository_create_blob_from_file repository' file' checkUnexpectedReturnNULL "repositoryCreateBlobFromFile" result result' <- (wrapBoxed Ggit.OId.OId) result touchManagedPtr repository touchManagedPtr file return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::create_blob_from_path -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the file path.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "OId"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_blob_from_path" ggit_repository_create_blob_from_path :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- path : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO (Ptr Ggit.OId.OId) {- | Write a path relative to the repository working directory to the object database as a blob. -} repositoryCreateBlobFromPath :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@path@/: the file path. -} -> m Ggit.OId.OId {- ^ __Returns:__ the new @/GgitOid/@ of the written blob, or 'Nothing' if writing the blob failed. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateBlobFromPath repository path = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository path' <- textToCString path onException (do result <- propagateGError $ ggit_repository_create_blob_from_path repository' path' checkUnexpectedReturnNULL "repositoryCreateBlobFromPath" result result' <- (wrapBoxed Ggit.OId.OId) result touchManagedPtr repository freeMem path' return result' ) (do freeMem path' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCreateBlobFromPathMethodInfo instance (signature ~ (T.Text -> m Ggit.OId.OId), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateBlobFromPathMethodInfo a signature where overloadedMethod _ = repositoryCreateBlobFromPath #endif -- method Repository::create_branch -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "branch_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the branch.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "target", argType = TInterface (Name {namespace = "Ggit", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitObject.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Ggit", name = "CreateFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitCreateFlags.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Branch"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_branch" ggit_repository_create_branch :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- branch_name : TBasicType TUTF8 Ptr Ggit.Object.Object -> -- target : TInterface (Name {namespace = "Ggit", name = "Object"}) CUInt -> -- flags : TInterface (Name {namespace = "Ggit", name = "CreateFlags"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Branch.Branch) {- | Creates a new branch pointing at a target commit. -} repositoryCreateBranch :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@branchName@/: the name of the branch. -} -> b {- ^ /@target@/: a 'GI.Ggit.Objects.Object.Object'. -} -> [Ggit.Flags.CreateFlags] {- ^ /@flags@/: a 'GI.Ggit.Flags.CreateFlags'. -} -> m (Maybe Ggit.Branch.Branch) {- ^ __Returns:__ the reference to which the branch points, or 'Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateBranch repository branchName target flags = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository branchName' <- textToCString branchName target' <- unsafeManagedPtrCastPtr target let flags' = gflagsToWord flags onException (do result <- propagateGError $ ggit_repository_create_branch repository' branchName' target' flags' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Branch.Branch) result' return result'' touchManagedPtr repository touchManagedPtr target freeMem branchName' return maybeResult ) (do freeMem branchName' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::create_commit -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "update_ref", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "name of the reference to update.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "author", argType = TInterface (Name {namespace = "Ggit", name = "Signature"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "author signature.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "committer", argType = TInterface (Name {namespace = "Ggit", name = "Signature"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "committer signature (and time of commit).", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "message_encoding", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "message encoding.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "commit message.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tree", argType = TInterface (Name {namespace = "Ggit", name = "Tree"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the tree of objects to commit.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "parents", argType = TCArray False (-1) 8 (TInterface (Name {namespace = "Ggit", name = "Commit"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "parent commits.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "parent_count", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of parent commits in @parents.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [Arg {argCName = "parent_count", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of parent commits in @parents.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "OId"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_commit" ggit_repository_create_commit :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- update_ref : TBasicType TUTF8 Ptr Ggit.Signature.Signature -> -- author : TInterface (Name {namespace = "Ggit", name = "Signature"}) Ptr Ggit.Signature.Signature -> -- committer : TInterface (Name {namespace = "Ggit", name = "Signature"}) CString -> -- message_encoding : TBasicType TUTF8 CString -> -- message : TBasicType TUTF8 Ptr Ggit.Tree.Tree -> -- tree : TInterface (Name {namespace = "Ggit", name = "Tree"}) Ptr (Ptr Ggit.Commit.Commit) -> -- parents : TCArray False (-1) 8 (TInterface (Name {namespace = "Ggit", name = "Commit"})) Int32 -> -- parent_count : TBasicType TInt Ptr (Ptr GError) -> -- error IO (Ptr Ggit.OId.OId) {- | Create a new commit. If /@updateRef@/ is not 'Nothing', the given reference will be updated to point to the newly created commit. Use \"HEAD\" to update the HEAD of the current branch and make it point to this commit. If /@messageEncoding@/ is set to 'Nothing', \"UTF-8\" encoding is assumed for the provided /@message@/. Note that /@message@/ will not be cleaned up automatically. You can use @/ggit_message_prettify/@ to do this yourself if needed. -} repositoryCreateCommit :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c, Ggit.Tree.IsTree d) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (T.Text) {- ^ /@updateRef@/: name of the reference to update. -} -> b {- ^ /@author@/: author signature. -} -> c {- ^ /@committer@/: committer signature (and time of commit). -} -> Maybe (T.Text) {- ^ /@messageEncoding@/: message encoding. -} -> T.Text {- ^ /@message@/: commit message. -} -> d {- ^ /@tree@/: the tree of objects to commit. -} -> [Ggit.Commit.Commit] {- ^ /@parents@/: parent commits. -} -> m Ggit.OId.OId {- ^ __Returns:__ the 'GI.Ggit.Structs.OId.OId' of the created commit object, or 'Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateCommit repository updateRef author committer messageEncoding message tree parents = liftIO $ do let parentCount = fromIntegral $ length parents repository' <- unsafeManagedPtrCastPtr repository maybeUpdateRef <- case updateRef of Nothing -> return nullPtr Just jUpdateRef -> do jUpdateRef' <- textToCString jUpdateRef return jUpdateRef' author' <- unsafeManagedPtrCastPtr author committer' <- unsafeManagedPtrCastPtr committer maybeMessageEncoding <- case messageEncoding of Nothing -> return nullPtr Just jMessageEncoding -> do jMessageEncoding' <- textToCString jMessageEncoding return jMessageEncoding' message' <- textToCString message tree' <- unsafeManagedPtrCastPtr tree parents' <- mapM unsafeManagedPtrCastPtr parents parents'' <- packPtrArray parents' onException (do result <- propagateGError $ ggit_repository_create_commit repository' maybeUpdateRef author' committer' maybeMessageEncoding message' tree' parents'' parentCount checkUnexpectedReturnNULL "repositoryCreateCommit" result result' <- (wrapBoxed Ggit.OId.OId) result touchManagedPtr repository touchManagedPtr author touchManagedPtr committer touchManagedPtr tree mapM_ touchManagedPtr parents freeMem maybeUpdateRef freeMem maybeMessageEncoding freeMem message' freeMem parents'' return result' ) (do freeMem maybeUpdateRef freeMem maybeMessageEncoding freeMem message' freeMem parents'' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCreateCommitMethodInfo instance (signature ~ (Maybe (T.Text) -> b -> c -> Maybe (T.Text) -> T.Text -> d -> [Ggit.Commit.Commit] -> m 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 -- method Repository::create_commit_from_ids -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "update_ref", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "name of the reference to update.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "author", argType = TInterface (Name {namespace = "Ggit", name = "Signature"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "author signature.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "committer", argType = TInterface (Name {namespace = "Ggit", name = "Signature"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "committer signature (and time of commit).", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "message_encoding", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "message encoding.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "commit message.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tree", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the tree of objects to commit.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "parents", argType = TCArray False (-1) 8 (TInterface (Name {namespace = "Ggit", name = "OId"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "parent commits.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "parent_count", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of parent commits in @parents.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [Arg {argCName = "parent_count", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of parent commits in @parents.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "OId"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_commit_from_ids" ggit_repository_create_commit_from_ids :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- update_ref : TBasicType TUTF8 Ptr Ggit.Signature.Signature -> -- author : TInterface (Name {namespace = "Ggit", name = "Signature"}) Ptr Ggit.Signature.Signature -> -- committer : TInterface (Name {namespace = "Ggit", name = "Signature"}) CString -> -- message_encoding : TBasicType TUTF8 CString -> -- message : TBasicType TUTF8 Ptr Ggit.OId.OId -> -- tree : TInterface (Name {namespace = "Ggit", name = "OId"}) Ptr (Ptr Ggit.OId.OId) -> -- parents : TCArray False (-1) 8 (TInterface (Name {namespace = "Ggit", name = "OId"})) Int32 -> -- parent_count : TBasicType TInt Ptr (Ptr GError) -> -- error IO (Ptr Ggit.OId.OId) {- | Create a new commit. If /@updateRef@/ is not 'Nothing', the given reference will be updated to point to the newly created commit. Use \"HEAD\" to update the HEAD of the current branch and make it point to this commit. If /@messageEncoding@/ is set to 'Nothing', \"UTF-8\" encoding is assumed for the provided /@message@/. Note that /@message@/ will not be cleaned up automatically. You can use @/ggit_message_prettify/@ to do this yourself if needed. -} repositoryCreateCommitFromIds :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (T.Text) {- ^ /@updateRef@/: name of the reference to update. -} -> b {- ^ /@author@/: author signature. -} -> c {- ^ /@committer@/: committer signature (and time of commit). -} -> Maybe (T.Text) {- ^ /@messageEncoding@/: message encoding. -} -> T.Text {- ^ /@message@/: commit message. -} -> Ggit.OId.OId {- ^ /@tree@/: the tree of objects to commit. -} -> [Ggit.OId.OId] {- ^ /@parents@/: parent commits. -} -> m Ggit.OId.OId {- ^ __Returns:__ the 'GI.Ggit.Structs.OId.OId' of the created commit object, or 'Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateCommitFromIds repository updateRef author committer messageEncoding message tree parents = liftIO $ do let parentCount = fromIntegral $ length parents repository' <- unsafeManagedPtrCastPtr repository maybeUpdateRef <- case updateRef of Nothing -> return nullPtr Just jUpdateRef -> do jUpdateRef' <- textToCString jUpdateRef return jUpdateRef' author' <- unsafeManagedPtrCastPtr author committer' <- unsafeManagedPtrCastPtr committer maybeMessageEncoding <- case messageEncoding of Nothing -> return nullPtr Just jMessageEncoding -> do jMessageEncoding' <- textToCString jMessageEncoding return jMessageEncoding' message' <- textToCString message tree' <- unsafeManagedPtrGetPtr tree parents' <- mapM unsafeManagedPtrGetPtr parents parents'' <- packPtrArray parents' onException (do result <- propagateGError $ ggit_repository_create_commit_from_ids repository' maybeUpdateRef author' committer' maybeMessageEncoding message' tree' parents'' parentCount checkUnexpectedReturnNULL "repositoryCreateCommitFromIds" result result' <- (wrapBoxed Ggit.OId.OId) result touchManagedPtr repository touchManagedPtr author touchManagedPtr committer touchManagedPtr tree mapM_ touchManagedPtr parents freeMem maybeUpdateRef freeMem maybeMessageEncoding freeMem message' freeMem parents'' return result' ) (do freeMem maybeUpdateRef freeMem maybeMessageEncoding freeMem message' freeMem parents'' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCreateCommitFromIdsMethodInfo instance (signature ~ (Maybe (T.Text) -> b -> c -> Maybe (T.Text) -> T.Text -> Ggit.OId.OId -> [Ggit.OId.OId] -> m Ggit.OId.OId), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => O.MethodInfo RepositoryCreateCommitFromIdsMethodInfo a signature where overloadedMethod _ = repositoryCreateCommitFromIds #endif -- method Repository::create_index_entry_for_file -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GFile.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "id", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GgitOId.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "IndexEntry"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_index_entry_for_file" ggit_repository_create_index_entry_for_file :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Gio.File.File -> -- file : TInterface (Name {namespace = "Gio", name = "File"}) Ptr Ggit.OId.OId -> -- id : TInterface (Name {namespace = "Ggit", name = "OId"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.IndexEntry.IndexEntry) {- | Create a new index entry. When /@file@/ is not 'Nothing', the path of the returned entry (@/ggit_index_entry_get_path/@) is set to the path of /@file@/ relative to the working directory of /@repository@/. The file must reside in the working directory of /@repository@/. The file related fields of the returned entry are also queried from this file (if the file exists). If /@id@/ is not 'Nothing', then the id of the returned entry is set to /@id@/ (see @/ggit_index_entry_get_id/@) which could point to a blob (for a file) or a tree (for a directory). -} repositoryCreateIndexEntryForFile :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Gio.File.IsFile b) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (b) {- ^ /@file@/: a 'GI.Gio.Interfaces.File.File'. -} -> Maybe (Ggit.OId.OId) {- ^ /@id@/: a 'GI.Ggit.Structs.OId.OId'. -} -> m Ggit.IndexEntry.IndexEntry {- ^ __Returns:__ a 'GI.Ggit.Structs.IndexEntry.IndexEntry' or 'Nothing' when an error occurred. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateIndexEntryForFile repository file id = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository maybeFile <- case file of Nothing -> return nullPtr Just jFile -> do jFile' <- unsafeManagedPtrCastPtr jFile return jFile' maybeId <- case id of Nothing -> return nullPtr Just jId -> do jId' <- unsafeManagedPtrGetPtr jId return jId' onException (do result <- propagateGError $ ggit_repository_create_index_entry_for_file repository' maybeFile maybeId checkUnexpectedReturnNULL "repositoryCreateIndexEntryForFile" result result' <- (wrapBoxed Ggit.IndexEntry.IndexEntry) result touchManagedPtr repository whenJust file touchManagedPtr whenJust id touchManagedPtr return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCreateIndexEntryForFileMethodInfo instance (signature ~ (Maybe (b) -> Maybe (Ggit.OId.OId) -> m Ggit.IndexEntry.IndexEntry), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.MethodInfo RepositoryCreateIndexEntryForFileMethodInfo a signature where overloadedMethod _ = repositoryCreateIndexEntryForFile #endif -- method Repository::create_index_entry_for_path -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a path.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "id", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GgitOId.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "IndexEntry"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_index_entry_for_path" ggit_repository_create_index_entry_for_path :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- path : TBasicType TUTF8 Ptr Ggit.OId.OId -> -- id : TInterface (Name {namespace = "Ggit", name = "OId"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.IndexEntry.IndexEntry) {- | Create a new index entry. When /@path@/ is not 'Nothing', the path of the returned entry (@/ggit_index_entry_get_path/@) is set to /@path@/. The specified path can be either absolute or relative. In the case of an absolute path, the path must reside within the working directory of /@repository@/. The file related fields of the returned entry are also queried from this path (if the file exists). If /@id@/ is not 'Nothing', then the id of the returned entry is set to /@id@/ (see @/ggit_index_entry_get_id/@) which could point to a blob (for a file) or a tree (for a directory). -} repositoryCreateIndexEntryForPath :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (T.Text) {- ^ /@path@/: a path. -} -> Maybe (Ggit.OId.OId) {- ^ /@id@/: a 'GI.Ggit.Structs.OId.OId'. -} -> m Ggit.IndexEntry.IndexEntry {- ^ __Returns:__ a 'GI.Ggit.Structs.IndexEntry.IndexEntry' or 'Nothing' when an error occurred. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateIndexEntryForPath repository path id = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository maybePath <- case path of Nothing -> return nullPtr Just jPath -> do jPath' <- textToCString jPath return jPath' maybeId <- case id of Nothing -> return nullPtr Just jId -> do jId' <- unsafeManagedPtrGetPtr jId return jId' onException (do result <- propagateGError $ ggit_repository_create_index_entry_for_path repository' maybePath maybeId checkUnexpectedReturnNULL "repositoryCreateIndexEntryForPath" result result' <- (wrapBoxed Ggit.IndexEntry.IndexEntry) result touchManagedPtr repository whenJust id touchManagedPtr freeMem maybePath return result' ) (do freeMem maybePath ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCreateIndexEntryForPathMethodInfo instance (signature ~ (Maybe (T.Text) -> Maybe (Ggit.OId.OId) -> m Ggit.IndexEntry.IndexEntry), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateIndexEntryForPathMethodInfo a signature where overloadedMethod _ = repositoryCreateIndexEntryForPath #endif -- method Repository::create_note -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "notes_ref", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "canonical name of the reference to use, or %NULL to use the default ref.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "author", argType = TInterface (Name {namespace = "Ggit", name = "Signature"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "author signature.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "committer", argType = TInterface (Name {namespace = "Ggit", name = "Signature"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "committer signature.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "id", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "OID of the git object to decorate.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "note", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "content of the note to add for object oid.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "force", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether to overwrite existing note.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "OId"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_note" ggit_repository_create_note :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- notes_ref : TBasicType TUTF8 Ptr Ggit.Signature.Signature -> -- author : TInterface (Name {namespace = "Ggit", name = "Signature"}) Ptr Ggit.Signature.Signature -> -- committer : TInterface (Name {namespace = "Ggit", name = "Signature"}) Ptr Ggit.OId.OId -> -- id : TInterface (Name {namespace = "Ggit", name = "OId"}) CString -> -- note : TBasicType TUTF8 CInt -> -- force : TBasicType TBoolean Ptr (Ptr GError) -> -- error IO (Ptr Ggit.OId.OId) {- | Adds a note for an object. -} repositoryCreateNote :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (T.Text) {- ^ /@notesRef@/: canonical name of the reference to use, or 'Nothing' to use the default ref. -} -> b {- ^ /@author@/: author signature. -} -> c {- ^ /@committer@/: committer signature. -} -> Ggit.OId.OId {- ^ /@id@/: OID of the git object to decorate. -} -> T.Text {- ^ /@note@/: content of the note to add for object oid. -} -> Bool {- ^ /@force@/: whether to overwrite existing note. -} -> m Ggit.OId.OId {- ^ __Returns:__ the OID for the note or 'Nothing' in case of error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateNote repository notesRef author committer id note force = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository maybeNotesRef <- case notesRef of Nothing -> return nullPtr Just jNotesRef -> do jNotesRef' <- textToCString jNotesRef return jNotesRef' author' <- unsafeManagedPtrCastPtr author committer' <- unsafeManagedPtrCastPtr committer id' <- unsafeManagedPtrGetPtr id note' <- textToCString note let force' = (fromIntegral . fromEnum) force onException (do result <- propagateGError $ ggit_repository_create_note repository' maybeNotesRef author' committer' id' note' force' checkUnexpectedReturnNULL "repositoryCreateNote" result result' <- (wrapBoxed Ggit.OId.OId) result touchManagedPtr repository touchManagedPtr author touchManagedPtr committer touchManagedPtr id freeMem maybeNotesRef freeMem note' return result' ) (do freeMem maybeNotesRef freeMem note' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCreateNoteMethodInfo instance (signature ~ (Maybe (T.Text) -> b -> c -> Ggit.OId.OId -> T.Text -> Bool -> m Ggit.OId.OId), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => O.MethodInfo RepositoryCreateNoteMethodInfo a signature where overloadedMethod _ = repositoryCreateNote #endif -- method Repository::create_reference -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name for the new #GgitRef.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "oid", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GgitOId pointed to by the reference.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "log_message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The one line long message to be appended to the reflog.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Ref"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_reference" ggit_repository_create_reference :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- name : TBasicType TUTF8 Ptr Ggit.OId.OId -> -- oid : TInterface (Name {namespace = "Ggit", name = "OId"}) CString -> -- log_message : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Ref.Ref) {- | Creates a new object id reference. The reference will be created in the repository and written to the disk. The returned value must be freed with 'GI.GObject.Objects.Object.objectUnref'. -} repositoryCreateReference :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@name@/: the name for the new 'GI.Ggit.Objects.Ref.Ref'. -} -> Ggit.OId.OId {- ^ /@oid@/: the 'GI.Ggit.Structs.OId.OId' pointed to by the reference. -} -> T.Text {- ^ /@logMessage@/: The one line long message to be appended to the reflog. -} -> m Ggit.Ref.Ref {- ^ __Returns:__ the newly created reference. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateReference repository name oid logMessage = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository name' <- textToCString name oid' <- unsafeManagedPtrGetPtr oid logMessage' <- textToCString logMessage onException (do result <- propagateGError $ ggit_repository_create_reference repository' name' oid' logMessage' checkUnexpectedReturnNULL "repositoryCreateReference" result result' <- (wrapObject Ggit.Ref.Ref) result touchManagedPtr repository touchManagedPtr oid freeMem name' freeMem logMessage' return result' ) (do freeMem name' freeMem logMessage' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCreateReferenceMethodInfo instance (signature ~ (T.Text -> Ggit.OId.OId -> T.Text -> m Ggit.Ref.Ref), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateReferenceMethodInfo a signature where overloadedMethod _ = repositoryCreateReference #endif -- method Repository::create_remote -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the new remote.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "url", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the url of the remote.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Remote"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_remote" ggit_repository_create_remote :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- name : TBasicType TUTF8 CString -> -- url : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Remote.Remote) {- | Adds a remote with the default fetch refspec to the repository\'s configuration. -} repositoryCreateRemote :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@name@/: the name of the new remote. -} -> T.Text {- ^ /@url@/: the url of the remote. -} -> m (Maybe Ggit.Remote.Remote) {- ^ __Returns:__ a new 'GI.Ggit.Objects.Remote.Remote' or 'Nothing' if there is an error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateRemote repository name url = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository name' <- textToCString name url' <- textToCString url onException (do result <- propagateGError $ ggit_repository_create_remote repository' name' url' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Remote.Remote) result' return result'' touchManagedPtr repository freeMem name' freeMem url' return maybeResult ) (do freeMem name' freeMem url' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::create_symbolic_reference -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name for the new #GgitRef.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "target", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the full name to the reference.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "log_message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The one line long message to be appended to the reflog.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Ref"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_symbolic_reference" ggit_repository_create_symbolic_reference :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- name : TBasicType TUTF8 CString -> -- target : TBasicType TUTF8 CString -> -- log_message : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Ref.Ref) {- | Creates a new symbolic reference. The reference will be created in the repository and written to the disk. The returned value must be freed with 'GI.GObject.Objects.Object.objectUnref'. -} repositoryCreateSymbolicReference :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@name@/: the name for the new 'GI.Ggit.Objects.Ref.Ref'. -} -> T.Text {- ^ /@target@/: the full name to the reference. -} -> T.Text {- ^ /@logMessage@/: The one line long message to be appended to the reflog. -} -> m Ggit.Ref.Ref {- ^ __Returns:__ the newly created reference. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateSymbolicReference repository name target logMessage = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository name' <- textToCString name target' <- textToCString target logMessage' <- textToCString logMessage onException (do result <- propagateGError $ ggit_repository_create_symbolic_reference repository' name' target' logMessage' checkUnexpectedReturnNULL "repositoryCreateSymbolicReference" result result' <- (wrapObject Ggit.Ref.Ref) result touchManagedPtr repository freeMem name' freeMem target' freeMem logMessage' return result' ) (do freeMem name' freeMem target' freeMem logMessage' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCreateSymbolicReferenceMethodInfo instance (signature ~ (T.Text -> T.Text -> T.Text -> m Ggit.Ref.Ref), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateSymbolicReferenceMethodInfo a signature where overloadedMethod _ = repositoryCreateSymbolicReference #endif -- method Repository::create_tag -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tag_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the tag name.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "target", argType = TInterface (Name {namespace = "Ggit", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitObject.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tagger", argType = TInterface (Name {namespace = "Ggit", name = "Signature"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitSignature.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the tag message.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Ggit", name = "CreateFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitCreateFlags.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "OId"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_tag" ggit_repository_create_tag :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- tag_name : TBasicType TUTF8 Ptr Ggit.Object.Object -> -- target : TInterface (Name {namespace = "Ggit", name = "Object"}) Ptr Ggit.Signature.Signature -> -- tagger : TInterface (Name {namespace = "Ggit", name = "Signature"}) CString -> -- message : TBasicType TUTF8 CUInt -> -- flags : TInterface (Name {namespace = "Ggit", name = "CreateFlags"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.OId.OId) {- | Create a new tag object. -} repositoryCreateTag :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.Signature.IsSignature c) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@tagName@/: the tag name. -} -> b {- ^ /@target@/: a 'GI.Ggit.Objects.Object.Object'. -} -> c {- ^ /@tagger@/: a 'GI.Ggit.Objects.Signature.Signature'. -} -> T.Text {- ^ /@message@/: the tag message. -} -> [Ggit.Flags.CreateFlags] {- ^ /@flags@/: a 'GI.Ggit.Flags.CreateFlags'. -} -> m (Maybe Ggit.OId.OId) {- ^ __Returns:__ the id to which the tag points, or 'Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateTag repository tagName target tagger message flags = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository tagName' <- textToCString tagName target' <- unsafeManagedPtrCastPtr target tagger' <- unsafeManagedPtrCastPtr tagger message' <- textToCString message let flags' = gflagsToWord flags onException (do result <- propagateGError $ ggit_repository_create_tag repository' tagName' target' tagger' message' flags' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.OId.OId) result' return result'' touchManagedPtr repository touchManagedPtr target touchManagedPtr tagger freeMem tagName' freeMem message' return maybeResult ) (do freeMem tagName' freeMem message' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::create_tag_annotation -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tag_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the tag.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "target", argType = TInterface (Name {namespace = "Ggit", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitObject.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "signature", argType = TInterface (Name {namespace = "Ggit", name = "Signature"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitObject.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the tag message.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "OId"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_tag_annotation" ggit_repository_create_tag_annotation :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- tag_name : TBasicType TUTF8 Ptr Ggit.Object.Object -> -- target : TInterface (Name {namespace = "Ggit", name = "Object"}) Ptr Ggit.Signature.Signature -> -- signature : TInterface (Name {namespace = "Ggit", name = "Signature"}) CString -> -- message : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO (Ptr Ggit.OId.OId) {- | Creates a new annotated tag. -} repositoryCreateTagAnnotation :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.Signature.IsSignature c) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@tagName@/: the name of the tag. -} -> b {- ^ /@target@/: a 'GI.Ggit.Objects.Object.Object'. -} -> c {- ^ /@signature@/: a 'GI.Ggit.Objects.Object.Object'. -} -> T.Text {- ^ /@message@/: the tag message. -} -> m (Maybe Ggit.OId.OId) {- ^ __Returns:__ the id to which the tag points, or 'Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateTagAnnotation repository tagName target signature message = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository tagName' <- textToCString tagName target' <- unsafeManagedPtrCastPtr target signature' <- unsafeManagedPtrCastPtr signature message' <- textToCString message onException (do result <- propagateGError $ ggit_repository_create_tag_annotation repository' tagName' target' signature' message' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.OId.OId) result' return result'' touchManagedPtr repository touchManagedPtr target touchManagedPtr signature freeMem tagName' freeMem message' return maybeResult ) (do freeMem tagName' freeMem message' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::create_tag_from_buffer -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tag", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the tag buffer.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Ggit", name = "CreateFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitCreateFlags.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "OId"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_tag_from_buffer" ggit_repository_create_tag_from_buffer :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- tag : TBasicType TUTF8 CUInt -> -- flags : TInterface (Name {namespace = "Ggit", name = "CreateFlags"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.OId.OId) {- | Create a new tag from a buffer describing the tag object. The buffer must be correctly formatted. -} repositoryCreateTagFromBuffer :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@tag@/: the tag buffer. -} -> [Ggit.Flags.CreateFlags] {- ^ /@flags@/: a 'GI.Ggit.Flags.CreateFlags'. -} -> m (Maybe Ggit.OId.OId) {- ^ __Returns:__ the id to which the tag points, or 'Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateTagFromBuffer repository tag flags = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository tag' <- textToCString tag let flags' = gflagsToWord flags onException (do result <- propagateGError $ ggit_repository_create_tag_from_buffer repository' tag' flags' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.OId.OId) result' return result'' touchManagedPtr repository freeMem tag' return maybeResult ) (do freeMem tag' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::create_tag_lightweight -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tag_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the tag.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "target", argType = TInterface (Name {namespace = "Ggit", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitObject.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Ggit", name = "CreateFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitCreateFlags.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "OId"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_tag_lightweight" ggit_repository_create_tag_lightweight :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- tag_name : TBasicType TUTF8 Ptr Ggit.Object.Object -> -- target : TInterface (Name {namespace = "Ggit", name = "Object"}) CUInt -> -- flags : TInterface (Name {namespace = "Ggit", name = "CreateFlags"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.OId.OId) {- | Creates a new lightweight tag. -} repositoryCreateTagLightweight :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@tagName@/: the name of the tag. -} -> b {- ^ /@target@/: a 'GI.Ggit.Objects.Object.Object'. -} -> [Ggit.Flags.CreateFlags] {- ^ /@flags@/: a 'GI.Ggit.Flags.CreateFlags'. -} -> m (Maybe Ggit.OId.OId) {- ^ __Returns:__ the id to which the tag points, or 'Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateTagLightweight repository tagName target flags = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository tagName' <- textToCString tagName target' <- unsafeManagedPtrCastPtr target let flags' = gflagsToWord flags onException (do result <- propagateGError $ ggit_repository_create_tag_lightweight repository' tagName' target' flags' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.OId.OId) result' return result'' touchManagedPtr repository touchManagedPtr target freeMem tagName' return maybeResult ) (do freeMem tagName' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::create_tree_builder -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "TreeBuilder"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_tree_builder" ggit_repository_create_tree_builder :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.TreeBuilder.TreeBuilder) {- | Create a new tree builder. -} repositoryCreateTreeBuilder :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m Ggit.TreeBuilder.TreeBuilder {- ^ __Returns:__ a new 'GI.Ggit.Objects.TreeBuilder.TreeBuilder', or 'Nothing' if there was an error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateTreeBuilder repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository onException (do result <- propagateGError $ ggit_repository_create_tree_builder repository' checkUnexpectedReturnNULL "repositoryCreateTreeBuilder" result result' <- (wrapObject Ggit.TreeBuilder.TreeBuilder) result touchManagedPtr repository return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCreateTreeBuilderMethodInfo instance (signature ~ (m Ggit.TreeBuilder.TreeBuilder), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateTreeBuilderMethodInfo a signature where overloadedMethod _ = repositoryCreateTreeBuilder #endif -- method Repository::create_tree_builder_from_tree -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tree", argType = TInterface (Name {namespace = "Ggit", name = "Tree"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitTree.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "TreeBuilder"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_create_tree_builder_from_tree" ggit_repository_create_tree_builder_from_tree :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.Tree.Tree -> -- tree : TInterface (Name {namespace = "Ggit", name = "Tree"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.TreeBuilder.TreeBuilder) {- | Create a tree builder for initialized with /@tree@/. To create an empty tree builder, use @/ggit_repository_create_tree_builder/@ instead. -} repositoryCreateTreeBuilderFromTree :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Tree.IsTree b) => a -> b {- ^ /@tree@/: a 'GI.Ggit.Objects.Tree.Tree'. -} -> m Ggit.TreeBuilder.TreeBuilder {- ^ __Returns:__ a new 'GI.Ggit.Objects.TreeBuilder.TreeBuilder' object, or 'Nothing' if there was an error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryCreateTreeBuilderFromTree repository tree = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository tree' <- unsafeManagedPtrCastPtr tree onException (do result <- propagateGError $ ggit_repository_create_tree_builder_from_tree repository' tree' checkUnexpectedReturnNULL "repositoryCreateTreeBuilderFromTree" result result' <- (wrapObject Ggit.TreeBuilder.TreeBuilder) result touchManagedPtr repository touchManagedPtr tree return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryCreateTreeBuilderFromTreeMethodInfo instance (signature ~ (b -> m Ggit.TreeBuilder.TreeBuilder), MonadIO m, IsRepository a, Ggit.Tree.IsTree b) => O.MethodInfo RepositoryCreateTreeBuilderFromTreeMethodInfo a signature where overloadedMethod _ = repositoryCreateTreeBuilderFromTree #endif -- method Repository::delete_tag -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the tag.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_delete_tag" ggit_repository_delete_tag :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- name : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO CInt {- | Delete an existing tag reference by name. -} repositoryDeleteTag :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@name@/: the name of the tag. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryDeleteTag repository name = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository name' <- textToCString name onException (do _ <- propagateGError $ ggit_repository_delete_tag repository' name' touchManagedPtr repository freeMem name' return () ) (do freeMem name' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryDeleteTagMethodInfo instance (signature ~ (T.Text -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryDeleteTagMethodInfo a signature where overloadedMethod _ = repositoryDeleteTag #endif -- method Repository::drop_stash -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the position within the stash list. 0 points to the.\nmost recent stashed state.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : True -- Skip return : False foreign import ccall "ggit_repository_drop_stash" ggit_repository_drop_stash :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Word64 -> -- index : TBasicType TUInt64 Ptr (Ptr GError) -> -- error IO () {- | Removes a single stashed state from the stash list. -} repositoryDropStash :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Word64 {- ^ /@index@/: the position within the stash list. 0 points to the. most recent stashed state. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryDropStash repository index = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository onException (do propagateGError $ ggit_repository_drop_stash repository' index touchManagedPtr repository return () ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryDropStashMethodInfo instance (signature ~ (Word64 -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryDropStashMethodInfo a signature where overloadedMethod _ = repositoryDropStash #endif -- method Repository::enumerate_branches -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "list_type", argType = TInterface (Name {namespace = "Ggit", name = "BranchType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitBranchType.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "BranchEnumerator"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_enumerate_branches" ggit_repository_enumerate_branches :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CUInt -> -- list_type : TInterface (Name {namespace = "Ggit", name = "BranchType"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.BranchEnumerator.BranchEnumerator) {- | Get a branch enumerator to enumerate over all branches of the specified /@listType@/ in /@repository@/. -} repositoryEnumerateBranches :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Ggit.Enums.BranchType {- ^ /@listType@/: a 'GI.Ggit.Enums.BranchType'. -} -> m Ggit.BranchEnumerator.BranchEnumerator {- ^ __Returns:__ a branch enumerator. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryEnumerateBranches repository listType = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository let listType' = (fromIntegral . fromEnum) listType onException (do result <- propagateGError $ ggit_repository_enumerate_branches repository' listType' checkUnexpectedReturnNULL "repositoryEnumerateBranches" result result' <- (wrapBoxed Ggit.BranchEnumerator.BranchEnumerator) result touchManagedPtr repository return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryEnumerateBranchesMethodInfo instance (signature ~ (Ggit.Enums.BranchType -> m Ggit.BranchEnumerator.BranchEnumerator), MonadIO m, IsRepository a) => O.MethodInfo RepositoryEnumerateBranchesMethodInfo a signature where overloadedMethod _ = repositoryEnumerateBranches #endif -- method Repository::file_status -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "location", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the file to retrieve status for, rooted at the repository working dir.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "StatusFlags"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_file_status" ggit_repository_file_status :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Gio.File.File -> -- location : TInterface (Name {namespace = "Gio", name = "File"}) Ptr (Ptr GError) -> -- error IO CUInt {- | Gets the file status for a single file. -} repositoryFileStatus :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Gio.File.IsFile b) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> b {- ^ /@location@/: the file to retrieve status for, rooted at the repository working dir. -} -> m [Ggit.Flags.StatusFlags] {- ^ __Returns:__ the status for a single file. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryFileStatus repository location = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository location' <- unsafeManagedPtrCastPtr location onException (do result <- propagateGError $ ggit_repository_file_status repository' location' let result' = wordToGFlags result touchManagedPtr repository touchManagedPtr location return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::file_status_foreach -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "options", argType = TInterface (Name {namespace = "Ggit", name = "StatusOptions"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "status options, or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Ggit", name = "StatusCallback"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitStatusCallback.", sinceVersion = Nothing}, argScope = ScopeTypeCall, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "callback user data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_file_status_foreach" ggit_repository_file_status_foreach :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.StatusOptions.StatusOptions -> -- options : TInterface (Name {namespace = "Ggit", name = "StatusOptions"}) FunPtr Ggit.Callbacks.C_StatusCallback -> -- callback : TInterface (Name {namespace = "Ggit", name = "StatusCallback"}) Ptr () -> -- user_data : TBasicType TPtr Ptr (Ptr GError) -> -- error IO CInt {- | Gathers file statuses and run a callback for each one. To the callback is passed the path of the file, the status and the data pointer passed to this function. If the callback returns something other than 0, the iteration will stop and /@error@/ will be set. Set /@options@/ to 'Nothing' to get the default status options. -} repositoryFileStatusForeach :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (Ggit.StatusOptions.StatusOptions) {- ^ /@options@/: status options, or 'Nothing'. -} -> Ggit.Callbacks.StatusCallback {- ^ /@callback@/: a 'GI.Ggit.Callbacks.StatusCallback'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryFileStatusForeach repository options callback = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository maybeOptions <- case options of Nothing -> return nullPtr Just jOptions -> do jOptions' <- unsafeManagedPtrGetPtr jOptions return jOptions' callback' <- Ggit.Callbacks.mk_StatusCallback (Ggit.Callbacks.wrap_StatusCallback Nothing (Ggit.Callbacks.drop_closures_StatusCallback callback)) let userData = nullPtr onException (do _ <- propagateGError $ ggit_repository_file_status_foreach repository' maybeOptions callback' userData safeFreeFunPtr $ castFunPtrToPtr callback' touchManagedPtr repository whenJust options touchManagedPtr return () ) (do safeFreeFunPtr $ castFunPtrToPtr callback' return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::get_ahead_behind -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "local", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the commit for local.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "upstream", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the commit for upstream.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ahead", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of unique from commits in @upstream.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "behind", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of unique from commits in @local.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}] -- Lengths : [] -- returnType : Nothing -- throws : True -- Skip return : False foreign import ccall "ggit_repository_get_ahead_behind" ggit_repository_get_ahead_behind :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.OId.OId -> -- local : TInterface (Name {namespace = "Ggit", name = "OId"}) Ptr Ggit.OId.OId -> -- upstream : TInterface (Name {namespace = "Ggit", name = "OId"}) Ptr Word64 -> -- ahead : TBasicType TUInt64 Ptr Word64 -> -- behind : TBasicType TUInt64 Ptr (Ptr GError) -> -- error IO () {- | Count the number of unique commits between two commit objects. There is no need for branches containing the commits to have any upstream relationship, but it helps to think of one as a branch and the other as its upstream, the /@ahead@/ and /@behind@/ values will be what git would report for the branches. -} repositoryGetAheadBehind :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Ggit.OId.OId {- ^ /@local@/: the commit for local. -} -> Ggit.OId.OId {- ^ /@upstream@/: the commit for upstream. -} -> m ((Word64, Word64)) {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryGetAheadBehind repository local upstream = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository local' <- unsafeManagedPtrGetPtr local upstream' <- unsafeManagedPtrGetPtr upstream ahead <- allocMem :: IO (Ptr Word64) behind <- allocMem :: IO (Ptr Word64) onException (do propagateGError $ ggit_repository_get_ahead_behind repository' local' upstream' ahead behind ahead' <- peek ahead behind' <- peek behind touchManagedPtr repository touchManagedPtr local touchManagedPtr upstream freeMem ahead freeMem behind return (ahead', behind') ) (do freeMem ahead freeMem behind ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::get_attribute -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the relative path to the file.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the attribute.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Ggit", name = "AttributeCheckFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitAttributeCheckFlags.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_get_attribute" ggit_repository_get_attribute :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- path : TBasicType TUTF8 CString -> -- name : TBasicType TUTF8 CUInt -> -- flags : TInterface (Name {namespace = "Ggit", name = "AttributeCheckFlags"}) Ptr (Ptr GError) -> -- error IO CString {- | Get the attribute value of the specified attribute for the given file. -} repositoryGetAttribute :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@path@/: the relative path to the file. -} -> T.Text {- ^ /@name@/: the name of the attribute. -} -> [Ggit.Flags.AttributeCheckFlags] {- ^ /@flags@/: a 'GI.Ggit.Flags.AttributeCheckFlags'. -} -> m T.Text {- ^ __Returns:__ the attribute value, or 'Nothing'. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryGetAttribute repository path name flags = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository path' <- textToCString path name' <- textToCString name let flags' = gflagsToWord flags onException (do result <- propagateGError $ ggit_repository_get_attribute repository' path' name' flags' checkUnexpectedReturnNULL "repositoryGetAttribute" result result' <- cstringToText result touchManagedPtr repository freeMem path' freeMem name' return result' ) (do freeMem path' freeMem name' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetAttributeMethodInfo instance (signature ~ (T.Text -> T.Text -> [Ggit.Flags.AttributeCheckFlags] -> m T.Text), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetAttributeMethodInfo a signature where overloadedMethod _ = repositoryGetAttribute #endif -- method Repository::get_config -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Config"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_get_config" ggit_repository_get_config :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Config.Config) {- | Get the config for a specific repository. -} repositoryGetConfig :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m Ggit.Config.Config {- ^ __Returns:__ a 'GI.Ggit.Objects.Config.Config'. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryGetConfig repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository onException (do result <- propagateGError $ ggit_repository_get_config repository' checkUnexpectedReturnNULL "repositoryGetConfig" result result' <- (wrapObject Ggit.Config.Config) result touchManagedPtr repository return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetConfigMethodInfo instance (signature ~ (m Ggit.Config.Config), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetConfigMethodInfo a signature where overloadedMethod _ = repositoryGetConfig #endif -- method Repository::get_default_notes_ref -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_get_default_notes_ref" ggit_repository_get_default_notes_ref :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr (Ptr GError) -> -- error IO CString {- | Gets the default notes reference for /@repository@/. It defaults to \"refs\/notes\/commits\". -} repositoryGetDefaultNotesRef :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m T.Text {- ^ __Returns:__ the default notes reference for /@repository@/. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryGetDefaultNotesRef repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository onException (do result <- propagateGError $ ggit_repository_get_default_notes_ref repository' checkUnexpectedReturnNULL "repositoryGetDefaultNotesRef" result result' <- cstringToText result freeMem result touchManagedPtr repository return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetDefaultNotesRefMethodInfo instance (signature ~ (m T.Text), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetDefaultNotesRefMethodInfo a signature where overloadedMethod _ = repositoryGetDefaultNotesRef #endif -- method Repository::get_descendant_of -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "commit", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the commit.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ancestor", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the ancestor.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_get_descendant_of" ggit_repository_get_descendant_of :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.OId.OId -> -- commit : TInterface (Name {namespace = "Ggit", name = "OId"}) Ptr Ggit.OId.OId -> -- ancestor : TInterface (Name {namespace = "Ggit", name = "OId"}) Ptr (Ptr GError) -> -- error IO CInt {- | Check whether /@com@/ mit is a descendant of /@ancestor@/. Note that if this function returns 'False', an error might have occurred. If so, /@error@/ will be set appropriately. -} repositoryGetDescendantOf :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Ggit.OId.OId {- ^ /@commit@/: the commit. -} -> Ggit.OId.OId {- ^ /@ancestor@/: the ancestor. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryGetDescendantOf repository commit ancestor = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository commit' <- unsafeManagedPtrGetPtr commit ancestor' <- unsafeManagedPtrGetPtr ancestor onException (do _ <- propagateGError $ ggit_repository_get_descendant_of repository' commit' ancestor' touchManagedPtr repository touchManagedPtr commit touchManagedPtr ancestor return () ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetDescendantOfMethodInfo instance (signature ~ (Ggit.OId.OId -> Ggit.OId.OId -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetDescendantOfMethodInfo a signature where overloadedMethod _ = repositoryGetDescendantOf #endif -- method Repository::get_head -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Ref"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_get_head" ggit_repository_get_head :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Ref.Ref) {- | Get and resolves the current HEAD reference of the repository. Note that the returned ref is already resolved (if HEAD is symbolic). If you want to retrieve the symbolic ref called HEAD, then use @/ggit_repository_lookup_reference/@ instead. -} repositoryGetHead :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m Ggit.Ref.Ref {- ^ __Returns:__ a 'GI.Ggit.Objects.Ref.Ref' /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryGetHead repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository onException (do result <- propagateGError $ ggit_repository_get_head repository' checkUnexpectedReturnNULL "repositoryGetHead" result result' <- (wrapObject Ggit.Ref.Ref) result touchManagedPtr repository return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetHeadMethodInfo instance (signature ~ (m Ggit.Ref.Ref), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetHeadMethodInfo a signature where overloadedMethod _ = repositoryGetHead #endif -- method Repository::get_index -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Index"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_get_index" ggit_repository_get_index :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Index.Index) {- | Get the index for a specific repository. -} repositoryGetIndex :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m Ggit.Index.Index {- ^ __Returns:__ a 'GI.Ggit.Objects.Index.Index'. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryGetIndex repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository onException (do result <- propagateGError $ ggit_repository_get_index repository' checkUnexpectedReturnNULL "repositoryGetIndex" result result' <- (wrapObject Ggit.Index.Index) result touchManagedPtr repository return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetIndexMethodInfo instance (signature ~ (m Ggit.Index.Index), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetIndexMethodInfo a signature where overloadedMethod _ = repositoryGetIndex #endif -- method Repository::get_location -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gio", name = "File"})) -- throws : False -- Skip return : False foreign import ccall "ggit_repository_get_location" ggit_repository_get_location :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) IO (Ptr Gio.File.File) {- | Get the gitdir location of the repository. -} repositoryGetLocation :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m Gio.File.File {- ^ __Returns:__ the location of the gitdir of the repository. -} repositoryGetLocation repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository result <- ggit_repository_get_location repository' checkUnexpectedReturnNULL "repositoryGetLocation" result result' <- (wrapObject Gio.File.File) result touchManagedPtr repository return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetLocationMethodInfo instance (signature ~ (m Gio.File.File), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetLocationMethodInfo a signature where overloadedMethod _ = repositoryGetLocation #endif -- method Repository::get_submodule_status -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the submodule.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ignore", argType = TInterface (Name {namespace = "Ggit", name = "SubmoduleIgnore"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the ignore rules to follow.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "SubmoduleStatus"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_get_submodule_status" ggit_repository_get_submodule_status :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- name : TBasicType TUTF8 CUInt -> -- ignore : TInterface (Name {namespace = "Ggit", name = "SubmoduleIgnore"}) Ptr (Ptr GError) -> -- error IO CUInt {- | Gets the status for a submodule. This looks at a submodule and tries to determine the status. It will return a combination of the @/GGIT_SUBMODULE_STATUS/@ values. How deeply it examines the working directory to do this will depend on /@ignore@/. -} repositoryGetSubmoduleStatus :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@name@/: the name of the submodule. -} -> Ggit.Enums.SubmoduleIgnore {- ^ /@ignore@/: the ignore rules to follow. -} -> m [Ggit.Flags.SubmoduleStatus] {- ^ __Returns:__ the 'GI.Ggit.Flags.SubmoduleStatus' for /@submodule@/. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryGetSubmoduleStatus repository name ignore = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository name' <- textToCString name let ignore' = (fromIntegral . fromEnum) ignore onException (do result <- propagateGError $ ggit_repository_get_submodule_status repository' name' ignore' let result' = wordToGFlags result touchManagedPtr repository freeMem name' return result' ) (do freeMem name' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::get_workdir -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gio", name = "File"})) -- throws : False -- Skip return : False foreign import ccall "ggit_repository_get_workdir" ggit_repository_get_workdir :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) IO (Ptr Gio.File.File) {- | Gets the working directory of the repository. -} repositoryGetWorkdir :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m Gio.File.File {- ^ __Returns:__ the location of the working directory of the repository. -} repositoryGetWorkdir repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository result <- ggit_repository_get_workdir repository' checkUnexpectedReturnNULL "repositoryGetWorkdir" result result' <- (wrapObject Gio.File.File) result touchManagedPtr repository return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetWorkdirMethodInfo instance (signature ~ (m Gio.File.File), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetWorkdirMethodInfo a signature where overloadedMethod _ = repositoryGetWorkdir #endif -- method Repository::is_bare -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "ggit_repository_is_bare" ggit_repository_is_bare :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) IO CInt {- | Checks if /@repository@/ is bare. -} repositoryIsBare :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m Bool {- ^ __Returns:__ 'True' if the repository is empty. -} repositoryIsBare repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository result <- ggit_repository_is_bare repository' let result' = (/= 0) result touchManagedPtr repository return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryIsBareMethodInfo instance (signature ~ (m Bool), MonadIO m, IsRepository a) => O.MethodInfo RepositoryIsBareMethodInfo a signature where overloadedMethod _ = repositoryIsBare #endif -- method Repository::is_empty -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_is_empty" ggit_repository_is_empty :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr (Ptr GError) -> -- error IO CInt {- | Checks if /@repository@/ is empty. An empty repository has just been initialized and contains no commits. -} repositoryIsEmpty :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryIsEmpty repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository onException (do _ <- propagateGError $ ggit_repository_is_empty repository' touchManagedPtr repository return () ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryIsEmptyMethodInfo instance (signature ~ (m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryIsEmptyMethodInfo a signature where overloadedMethod _ = repositoryIsEmpty #endif -- method Repository::is_head_detached -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_is_head_detached" ggit_repository_is_head_detached :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr (Ptr GError) -> -- error IO CInt {- | Checks if /@repository@/\'s HEAD is detached. A repository\'s HEAD is detached when it points directly to a commit instead of a branch. -} repositoryIsHeadDetached :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryIsHeadDetached repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository onException (do _ <- propagateGError $ ggit_repository_is_head_detached repository' touchManagedPtr repository return () ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryIsHeadDetachedMethodInfo instance (signature ~ (m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryIsHeadDetachedMethodInfo a signature where overloadedMethod _ = repositoryIsHeadDetached #endif -- method Repository::is_head_unborn -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_is_head_unborn" ggit_repository_is_head_unborn :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr (Ptr GError) -> -- error IO CInt {- | Checks if /@repository@/\'s HEAD is an orphan. An orphan branch is one named from HEAD but doesn\'t exist in the refs namespace, because it doesn\'t have any commit to point to. -} repositoryIsHeadUnborn :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryIsHeadUnborn repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository onException (do _ <- propagateGError $ ggit_repository_is_head_unborn repository' touchManagedPtr repository return () ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryIsHeadUnbornMethodInfo instance (signature ~ (m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryIsHeadUnbornMethodInfo a signature where overloadedMethod _ = repositoryIsHeadUnborn #endif -- method Repository::list_remotes -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8)) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_list_remotes" ggit_repository_list_remotes :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr (Ptr GError) -> -- error IO (Ptr CString) {- | Fill a list with all the remotes in /@repository@/. -} repositoryListRemotes :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m (Maybe [T.Text]) {- ^ __Returns:__ a list with the remotes. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryListRemotes repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository onException (do result <- propagateGError $ ggit_repository_list_remotes repository' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- unpackZeroTerminatedUTF8CArray result' mapZeroTerminatedCArray freeMem result' freeMem result' return result'' touchManagedPtr repository return maybeResult ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryListRemotesMethodInfo instance (signature ~ (m (Maybe [T.Text])), MonadIO m, IsRepository a) => O.MethodInfo RepositoryListRemotesMethodInfo a signature where overloadedMethod _ = repositoryListRemotes #endif -- method Repository::list_tags -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8)) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_list_tags" ggit_repository_list_tags :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr (Ptr GError) -> -- error IO (Ptr CString) {- | Fill a list with all the tags in the /@repository@/. -} repositoryListTags :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> m (Maybe [T.Text]) {- ^ __Returns:__ a list with the tags in /@repository@/. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryListTags repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository onException (do result <- propagateGError $ ggit_repository_list_tags repository' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- unpackZeroTerminatedUTF8CArray result' mapZeroTerminatedCArray freeMem result' freeMem result' return result'' touchManagedPtr repository return maybeResult ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryListTagsMethodInfo instance (signature ~ (m (Maybe [T.Text])), MonadIO m, IsRepository a) => O.MethodInfo RepositoryListTagsMethodInfo a signature where overloadedMethod _ = repositoryListTags #endif -- method Repository::list_tags_match -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a pattern to match.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8)) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_list_tags_match" ggit_repository_list_tags_match :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- pattern : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO (Ptr CString) {- | Fill a list with all the tags in the /@repository@/ matching the provided pattern. The pattern can use standard fnmatch syntax. -} repositoryListTagsMatch :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (T.Text) {- ^ /@pattern@/: a pattern to match. -} -> m (Maybe [T.Text]) {- ^ __Returns:__ a list with matching tags in /@repository@/. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryListTagsMatch repository pattern = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository maybePattern <- case pattern of Nothing -> return nullPtr Just jPattern -> do jPattern' <- textToCString jPattern return jPattern' onException (do result <- propagateGError $ ggit_repository_list_tags_match repository' maybePattern maybeResult <- convertIfNonNull result $ \result' -> do result'' <- unpackZeroTerminatedUTF8CArray result' mapZeroTerminatedCArray freeMem result' freeMem result' return result'' touchManagedPtr repository freeMem maybePattern return maybeResult ) (do freeMem maybePattern ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryListTagsMatchMethodInfo instance (signature ~ (Maybe (T.Text) -> m (Maybe [T.Text])), MonadIO m, IsRepository a) => O.MethodInfo RepositoryListTagsMatchMethodInfo a signature where overloadedMethod _ = repositoryListTagsMatch #endif -- method Repository::lookup -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "oid", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitOId.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "gtype", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GType.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Object"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_lookup" ggit_repository_lookup :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.OId.OId -> -- oid : TInterface (Name {namespace = "Ggit", name = "OId"}) CGType -> -- gtype : TBasicType TGType Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Object.Object) {- | Lookups a reference to one of the objects in the /@repository@/. The generated reference must be freed with 'GI.GObject.Objects.Object.objectUnref'. The /@gtype@/ must match the type of the object in the odb; the method will fail otherwise. The special value @/G_TYPE_NONE/@ may be passed to let the method guess the object\'s type. -} repositoryLookup :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Ggit.OId.OId {- ^ /@oid@/: a 'GI.Ggit.Structs.OId.OId'. -} -> GType {- ^ /@gtype@/: a 'GType'. -} -> m Ggit.Object.Object {- ^ __Returns:__ the found 'GI.Ggit.Objects.Object.Object', or 'Nothing' on error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryLookup repository oid gtype = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository oid' <- unsafeManagedPtrGetPtr oid let gtype' = gtypeToCGType gtype onException (do result <- propagateGError $ ggit_repository_lookup repository' oid' gtype' checkUnexpectedReturnNULL "repositoryLookup" result result' <- (wrapObject Ggit.Object.Object) result touchManagedPtr repository touchManagedPtr oid return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryLookupMethodInfo instance (signature ~ (Ggit.OId.OId -> GType -> m Ggit.Object.Object), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupMethodInfo a signature where overloadedMethod _ = repositoryLookup #endif -- method Repository::lookup_branch -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "branch_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the branch.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "branch_type", argType = TInterface (Name {namespace = "Ggit", name = "BranchType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitBranchType.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Branch"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_lookup_branch" ggit_repository_lookup_branch :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- branch_name : TBasicType TUTF8 CUInt -> -- branch_type : TInterface (Name {namespace = "Ggit", name = "BranchType"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Branch.Branch) {- | Lookups a branch by its name in a repository. -} repositoryLookupBranch :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@branchName@/: the name of the branch. -} -> Ggit.Enums.BranchType {- ^ /@branchType@/: a 'GI.Ggit.Enums.BranchType'. -} -> m (Maybe Ggit.Branch.Branch) {- ^ __Returns:__ a branch by its name in a repository. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryLookupBranch repository branchName branchType = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository branchName' <- textToCString branchName let branchType' = (fromIntegral . fromEnum) branchType onException (do result <- propagateGError $ ggit_repository_lookup_branch repository' branchName' branchType' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Branch.Branch) result' return result'' touchManagedPtr repository freeMem branchName' return maybeResult ) (do freeMem branchName' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::lookup_reference -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the long name for the reference (e.g. HEAD, ref/heads/master, refs/tags/v0.1.0, ...).", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Ref"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_lookup_reference" ggit_repository_lookup_reference :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- name : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Ref.Ref) {- | Lookups a reference by its name in /@repository@/. The returned 'GI.Ggit.Objects.Ref.Ref' must be freed with 'GI.GObject.Objects.Object.objectUnref'. -} repositoryLookupReference :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@name@/: the long name for the reference (e.g. HEAD, ref\/heads\/master, refs\/tags\/v0.1.0, ...). -} -> m Ggit.Ref.Ref {- ^ __Returns:__ the searched reference. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryLookupReference repository name = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository name' <- textToCString name onException (do result <- propagateGError $ ggit_repository_lookup_reference repository' name' checkUnexpectedReturnNULL "repositoryLookupReference" result result' <- (wrapObject Ggit.Ref.Ref) result touchManagedPtr repository freeMem name' return result' ) (do freeMem name' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryLookupReferenceMethodInfo instance (signature ~ (T.Text -> m Ggit.Ref.Ref), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupReferenceMethodInfo a signature where overloadedMethod _ = repositoryLookupReference #endif -- method Repository::lookup_reference_dwim -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "short_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the short name for the reference (e.g. master, v0.1.0, ...).", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Ref"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_lookup_reference_dwim" ggit_repository_lookup_reference_dwim :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- short_name : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Ref.Ref) {- | Lookups a reference by its short name in /@repository@/ applying the git precendence rules to the given shorthand to determine which reference the user is referring to. The returned 'GI.Ggit.Objects.Ref.Ref' must be freed with 'GI.GObject.Objects.Object.objectUnref'. -} repositoryLookupReferenceDwim :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@shortName@/: the short name for the reference (e.g. master, v0.1.0, ...). -} -> m Ggit.Ref.Ref {- ^ __Returns:__ the searched reference. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryLookupReferenceDwim repository shortName = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository shortName' <- textToCString shortName onException (do result <- propagateGError $ ggit_repository_lookup_reference_dwim repository' shortName' checkUnexpectedReturnNULL "repositoryLookupReferenceDwim" result result' <- (wrapObject Ggit.Ref.Ref) result touchManagedPtr repository freeMem shortName' return result' ) (do freeMem shortName' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryLookupReferenceDwimMethodInfo instance (signature ~ (T.Text -> m Ggit.Ref.Ref), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupReferenceDwimMethodInfo a signature where overloadedMethod _ = repositoryLookupReferenceDwim #endif -- method Repository::lookup_remote -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the remote's name.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Remote"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_lookup_remote" ggit_repository_lookup_remote :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- name : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Remote.Remote) {- | Gets the remote called /@name@/. -} repositoryLookupRemote :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@name@/: the remote\'s name. -} -> m (Maybe Ggit.Remote.Remote) {- ^ __Returns:__ a new 'GI.Ggit.Objects.Remote.Remote' or 'Nothing' if there is an error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryLookupRemote repository name = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository name' <- textToCString name onException (do result <- propagateGError $ ggit_repository_lookup_remote repository' name' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Remote.Remote) result' return result'' touchManagedPtr repository freeMem name' return maybeResult ) (do freeMem name' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryLookupRemoteMethodInfo instance (signature ~ (T.Text -> m (Maybe Ggit.Remote.Remote)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupRemoteMethodInfo a signature where overloadedMethod _ = repositoryLookupRemote #endif -- method Repository::lookup_submodule -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the submodule.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Submodule"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_lookup_submodule" ggit_repository_lookup_submodule :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- name : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Submodule.Submodule) {- | Lookups a submodule information by name or path. If the submodule does not exist, 'Nothing' is returned and a GGIT_ERROR_NOTFOUND error set. -} repositoryLookupSubmodule :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@name@/: the name of the submodule. -} -> m (Maybe Ggit.Submodule.Submodule) {- ^ __Returns:__ a newly-allocated 'GI.Ggit.Structs.Submodule.Submodule'. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryLookupSubmodule repository name = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository name' <- textToCString name onException (do result <- propagateGError $ ggit_repository_lookup_submodule repository' name' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.Submodule.Submodule) result' return result'' touchManagedPtr repository freeMem name' return maybeResult ) (do freeMem name' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryLookupSubmoduleMethodInfo instance (signature ~ (T.Text -> m (Maybe Ggit.Submodule.Submodule)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupSubmoduleMethodInfo a signature where overloadedMethod _ = repositoryLookupSubmodule #endif -- method Repository::merge_commits -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "our_commit", argType = TInterface (Name {namespace = "Ggit", name = "Commit"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the commit that reflects the destination tree.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "their_commit", argType = TInterface (Name {namespace = "Ggit", name = "Commit"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the commit that reflects the source tree.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "merge_options", argType = TInterface (Name {namespace = "Ggit", name = "MergeOptions"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the merge options.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Index"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_merge_commits" ggit_repository_merge_commits :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.Commit.Commit -> -- our_commit : TInterface (Name {namespace = "Ggit", name = "Commit"}) Ptr Ggit.Commit.Commit -> -- their_commit : TInterface (Name {namespace = "Ggit", name = "Commit"}) Ptr Ggit.MergeOptions.MergeOptions -> -- merge_options : TInterface (Name {namespace = "Ggit", name = "MergeOptions"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Index.Index) {- | Merge two commits creating a 'GI.Ggit.Objects.Index.Index' reflecting the result of the merge. -} repositoryMergeCommits :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.Commit.IsCommit c) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> b {- ^ /@ourCommit@/: the commit that reflects the destination tree. -} -> c {- ^ /@theirCommit@/: the commit that reflects the source tree. -} -> Ggit.MergeOptions.MergeOptions {- ^ /@mergeOptions@/: the merge options. -} -> m Ggit.Index.Index {- ^ __Returns:__ a new 'GI.Ggit.Objects.Index.Index' or 'Nothing' if an error occurred. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryMergeCommits repository ourCommit theirCommit mergeOptions = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository ourCommit' <- unsafeManagedPtrCastPtr ourCommit theirCommit' <- unsafeManagedPtrCastPtr theirCommit mergeOptions' <- unsafeManagedPtrGetPtr mergeOptions onException (do result <- propagateGError $ ggit_repository_merge_commits repository' ourCommit' theirCommit' mergeOptions' checkUnexpectedReturnNULL "repositoryMergeCommits" result result' <- (wrapObject Ggit.Index.Index) result touchManagedPtr repository touchManagedPtr ourCommit touchManagedPtr theirCommit touchManagedPtr mergeOptions return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryMergeCommitsMethodInfo instance (signature ~ (b -> c -> Ggit.MergeOptions.MergeOptions -> m Ggit.Index.Index), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.Commit.IsCommit c) => O.MethodInfo RepositoryMergeCommitsMethodInfo a signature where overloadedMethod _ = repositoryMergeCommits #endif -- method Repository::merge_trees -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ancestor_tree", argType = TInterface (Name {namespace = "Ggit", name = "Tree"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the common ancestor between the trees, or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "our_tree", argType = TInterface (Name {namespace = "Ggit", name = "Tree"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the tree that reflects the destination tree.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "their_tree", argType = TInterface (Name {namespace = "Ggit", name = "Tree"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the tree that reflects the source tree.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "merge_options", argType = TInterface (Name {namespace = "Ggit", name = "MergeOptions"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the merge options.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Index"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_merge_trees" ggit_repository_merge_trees :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.Tree.Tree -> -- ancestor_tree : TInterface (Name {namespace = "Ggit", name = "Tree"}) Ptr Ggit.Tree.Tree -> -- our_tree : TInterface (Name {namespace = "Ggit", name = "Tree"}) Ptr Ggit.Tree.Tree -> -- their_tree : TInterface (Name {namespace = "Ggit", name = "Tree"}) Ptr Ggit.MergeOptions.MergeOptions -> -- merge_options : TInterface (Name {namespace = "Ggit", name = "MergeOptions"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Index.Index) {- | Merge two trees creating a 'GI.Ggit.Objects.Index.Index' reflecting the result of the merge. -} repositoryMergeTrees :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Tree.IsTree b, Ggit.Tree.IsTree c, Ggit.Tree.IsTree d) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> b {- ^ /@ancestorTree@/: the common ancestor between the trees, or 'Nothing'. -} -> c {- ^ /@ourTree@/: the tree that reflects the destination tree. -} -> d {- ^ /@theirTree@/: the tree that reflects the source tree. -} -> Ggit.MergeOptions.MergeOptions {- ^ /@mergeOptions@/: the merge options. -} -> m Ggit.Index.Index {- ^ __Returns:__ a new 'GI.Ggit.Objects.Index.Index' or 'Nothing' if an error occurred. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryMergeTrees repository ancestorTree ourTree theirTree mergeOptions = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository ancestorTree' <- unsafeManagedPtrCastPtr ancestorTree ourTree' <- unsafeManagedPtrCastPtr ourTree theirTree' <- unsafeManagedPtrCastPtr theirTree mergeOptions' <- unsafeManagedPtrGetPtr mergeOptions onException (do result <- propagateGError $ ggit_repository_merge_trees repository' ancestorTree' ourTree' theirTree' mergeOptions' checkUnexpectedReturnNULL "repositoryMergeTrees" result result' <- (wrapObject Ggit.Index.Index) result touchManagedPtr repository touchManagedPtr ancestorTree touchManagedPtr ourTree touchManagedPtr theirTree touchManagedPtr mergeOptions return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryMergeTreesMethodInfo instance (signature ~ (b -> c -> d -> Ggit.MergeOptions.MergeOptions -> m 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 -- method Repository::note_foreach -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "notes_ref", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "canonical name of the reference to use, or %NULL to use the default ref.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Ggit", name = "NoteCallback"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitNoteCallback.", sinceVersion = Nothing}, argScope = ScopeTypeCall, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "callback user data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_note_foreach" ggit_repository_note_foreach :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- notes_ref : TBasicType TUTF8 FunPtr Ggit.Callbacks.C_NoteCallback -> -- callback : TInterface (Name {namespace = "Ggit", name = "NoteCallback"}) Ptr () -> -- user_data : TBasicType TPtr Ptr (Ptr GError) -> -- error IO CInt {- | Loop over all the notes within a specified namespace and issue a callback for each one. If /@callback@/ returns a non-zero value, this will stop looping. -} repositoryNoteForeach :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (T.Text) {- ^ /@notesRef@/: canonical name of the reference to use, or 'Nothing' to use the default ref. -} -> Ggit.Callbacks.NoteCallback {- ^ /@callback@/: a 'GI.Ggit.Callbacks.NoteCallback'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryNoteForeach repository notesRef callback = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository maybeNotesRef <- case notesRef of Nothing -> return nullPtr Just jNotesRef -> do jNotesRef' <- textToCString jNotesRef return jNotesRef' callback' <- Ggit.Callbacks.mk_NoteCallback (Ggit.Callbacks.wrap_NoteCallback Nothing (Ggit.Callbacks.drop_closures_NoteCallback callback)) let userData = nullPtr onException (do _ <- propagateGError $ ggit_repository_note_foreach repository' maybeNotesRef callback' userData safeFreeFunPtr $ castFunPtrToPtr callback' touchManagedPtr repository freeMem maybeNotesRef return () ) (do safeFreeFunPtr $ castFunPtrToPtr callback' freeMem maybeNotesRef ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryNoteForeachMethodInfo instance (signature ~ (Maybe (T.Text) -> Ggit.Callbacks.NoteCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryNoteForeachMethodInfo a signature where overloadedMethod _ = repositoryNoteForeach #endif -- method Repository::path_is_ignored -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A path within the repository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_path_is_ignored" ggit_repository_path_is_ignored :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- path : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO CInt {- | Tests if the ignore rules apply to the path provided. This acts similar to filtering performed when calling \"git add .\" on the command line. -} repositoryPathIsIgnored :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@path@/: A path within the repository. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryPathIsIgnored repository path = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository path' <- textToCString path onException (do _ <- propagateGError $ ggit_repository_path_is_ignored repository' path' touchManagedPtr repository freeMem path' return () ) (do freeMem path' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryPathIsIgnoredMethodInfo instance (signature ~ (T.Text -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryPathIsIgnoredMethodInfo a signature where overloadedMethod _ = repositoryPathIsIgnored #endif -- method Repository::read_note -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "notes_ref", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "canonical name of the reference to use, or %NULL to use the default ref.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "id", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "OID of the git object to decorate.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Note"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_read_note" ggit_repository_read_note :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- notes_ref : TBasicType TUTF8 Ptr Ggit.OId.OId -> -- id : TInterface (Name {namespace = "Ggit", name = "OId"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Note.Note) {- | Reads the note for an object. -} repositoryReadNote :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (T.Text) {- ^ /@notesRef@/: canonical name of the reference to use, or 'Nothing' to use the default ref. -} -> Ggit.OId.OId {- ^ /@id@/: OID of the git object to decorate. -} -> m Ggit.Note.Note {- ^ __Returns:__ the read note or 'Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryReadNote repository notesRef id = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository maybeNotesRef <- case notesRef of Nothing -> return nullPtr Just jNotesRef -> do jNotesRef' <- textToCString jNotesRef return jNotesRef' id' <- unsafeManagedPtrGetPtr id onException (do result <- propagateGError $ ggit_repository_read_note repository' maybeNotesRef id' checkUnexpectedReturnNULL "repositoryReadNote" result result' <- (wrapBoxed Ggit.Note.Note) result touchManagedPtr repository touchManagedPtr id freeMem maybeNotesRef return result' ) (do freeMem maybeNotesRef ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryReadNoteMethodInfo instance (signature ~ (Maybe (T.Text) -> Ggit.OId.OId -> m Ggit.Note.Note), MonadIO m, IsRepository a) => O.MethodInfo RepositoryReadNoteMethodInfo a signature where overloadedMethod _ = repositoryReadNote #endif -- method Repository::rebase_init -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "branch", argType = TInterface (Name {namespace = "Ggit", name = "AnnotatedCommit"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the terminal commit to rebase, or %NULL to rebase the\ncurrent branch.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "upstream", argType = TInterface (Name {namespace = "Ggit", name = "AnnotatedCommit"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the commit to begin rebasing from, or %NULL to\nrebase all reachable commits.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "onto", argType = TInterface (Name {namespace = "Ggit", name = "AnnotatedCommit"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the branch to rebase onto, or %NULL to rebase onto\nthe given upstream.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "options", argType = TInterface (Name {namespace = "Ggit", name = "RebaseOptions"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRebaseOptions to specify how rebase is performed, or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Rebase"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_rebase_init" ggit_repository_rebase_init :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.AnnotatedCommit.AnnotatedCommit -> -- branch : TInterface (Name {namespace = "Ggit", name = "AnnotatedCommit"}) Ptr Ggit.AnnotatedCommit.AnnotatedCommit -> -- upstream : TInterface (Name {namespace = "Ggit", name = "AnnotatedCommit"}) Ptr Ggit.AnnotatedCommit.AnnotatedCommit -> -- onto : TInterface (Name {namespace = "Ggit", name = "AnnotatedCommit"}) Ptr Ggit.RebaseOptions.RebaseOptions -> -- options : TInterface (Name {namespace = "Ggit", name = "RebaseOptions"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Rebase.Rebase) {- | Initializes a rebase operation to rebase the changes in /@branch@/ relative to /@upstream@/ onto another branch. To begin the rebase process, call @/git_rebase_next()/@. When you have finished with this object, call 'GI.GObject.Objects.Object.objectUnref'. -} repositoryRebaseInit :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) {- ^ /@branch@/: the terminal commit to rebase, or 'Nothing' to rebase the current branch. -} -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) {- ^ /@upstream@/: the commit to begin rebasing from, or 'Nothing' to rebase all reachable commits. -} -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) {- ^ /@onto@/: the branch to rebase onto, or 'Nothing' to rebase onto the given upstream. -} -> Ggit.RebaseOptions.RebaseOptions {- ^ /@options@/: a 'GI.Ggit.Structs.RebaseOptions.RebaseOptions' to specify how rebase is performed, or 'Nothing'. -} -> m Ggit.Rebase.Rebase {- ^ __Returns:__ a newly allocated 'GI.Ggit.Objects.Rebase.Rebase'. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryRebaseInit repository branch upstream onto options = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository maybeBranch <- case branch of Nothing -> return nullPtr Just jBranch -> do jBranch' <- unsafeManagedPtrGetPtr jBranch return jBranch' maybeUpstream <- case upstream of Nothing -> return nullPtr Just jUpstream -> do jUpstream' <- unsafeManagedPtrGetPtr jUpstream return jUpstream' maybeOnto <- case onto of Nothing -> return nullPtr Just jOnto -> do jOnto' <- unsafeManagedPtrGetPtr jOnto return jOnto' options' <- unsafeManagedPtrGetPtr options onException (do result <- propagateGError $ ggit_repository_rebase_init repository' maybeBranch maybeUpstream maybeOnto options' checkUnexpectedReturnNULL "repositoryRebaseInit" result result' <- (wrapObject Ggit.Rebase.Rebase) result touchManagedPtr repository whenJust branch touchManagedPtr whenJust upstream touchManagedPtr whenJust onto touchManagedPtr touchManagedPtr options return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryRebaseInitMethodInfo instance (signature ~ (Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) -> Ggit.RebaseOptions.RebaseOptions -> m Ggit.Rebase.Rebase), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRebaseInitMethodInfo a signature where overloadedMethod _ = repositoryRebaseInit #endif -- method Repository::rebase_open -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "options", argType = TInterface (Name {namespace = "Ggit", name = "RebaseOptions"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRebaseOptions to specify how rebase is performed, or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Rebase"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_rebase_open" ggit_repository_rebase_open :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.RebaseOptions.RebaseOptions -> -- options : TInterface (Name {namespace = "Ggit", name = "RebaseOptions"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Rebase.Rebase) {- | Opens an existing rebase that was previously started by either an invocation of @/ggit_rebase_init()/@ or by another client. -} repositoryRebaseOpen :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Ggit.RebaseOptions.RebaseOptions {- ^ /@options@/: a 'GI.Ggit.Structs.RebaseOptions.RebaseOptions' to specify how rebase is performed, or 'Nothing'. -} -> m Ggit.Rebase.Rebase {- ^ __Returns:__ a newly allocated 'GI.Ggit.Objects.Rebase.Rebase'. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryRebaseOpen repository options = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository options' <- unsafeManagedPtrGetPtr options onException (do result <- propagateGError $ ggit_repository_rebase_open repository' options' checkUnexpectedReturnNULL "repositoryRebaseOpen" result result' <- (wrapObject Ggit.Rebase.Rebase) result touchManagedPtr repository touchManagedPtr options return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryRebaseOpenMethodInfo instance (signature ~ (Ggit.RebaseOptions.RebaseOptions -> m Ggit.Rebase.Rebase), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRebaseOpenMethodInfo a signature where overloadedMethod _ = repositoryRebaseOpen #endif -- method Repository::references_foreach -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Ggit", name = "ReferencesCallback"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitReferencesCallback.", sinceVersion = Nothing}, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "callback user data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_references_foreach" ggit_repository_references_foreach :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) FunPtr Ggit.Callbacks.C_ReferencesCallback -> -- callback : TInterface (Name {namespace = "Ggit", name = "ReferencesCallback"}) Ptr () -> -- user_data : TBasicType TPtr Ptr (Ptr GError) -> -- error IO CInt {- | Gathers references and run a callback for each one. To the callback is passed the reference and the data pointer passed to this function. If the callback returns something other than 0, the iteration will stop and /@error@/ will be set. -} repositoryReferencesForeach :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Ggit.Callbacks.ReferencesCallback {- ^ /@callback@/: a 'GI.Ggit.Callbacks.ReferencesCallback'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryReferencesForeach repository callback = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository callback' <- Ggit.Callbacks.mk_ReferencesCallback (Ggit.Callbacks.wrap_ReferencesCallback Nothing (Ggit.Callbacks.drop_closures_ReferencesCallback callback)) let userData = nullPtr onException (do _ <- propagateGError $ ggit_repository_references_foreach repository' callback' userData safeFreeFunPtr $ castFunPtrToPtr callback' touchManagedPtr repository return () ) (do safeFreeFunPtr $ castFunPtrToPtr callback' return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryReferencesForeachMethodInfo instance (signature ~ (Ggit.Callbacks.ReferencesCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryReferencesForeachMethodInfo a signature where overloadedMethod _ = repositoryReferencesForeach #endif -- method Repository::references_foreach_name -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Ggit", name = "ReferencesNameCallback"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitReferencesNameCallback.", sinceVersion = Nothing}, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "callback user data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_references_foreach_name" ggit_repository_references_foreach_name :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) FunPtr Ggit.Callbacks.C_ReferencesNameCallback -> -- callback : TInterface (Name {namespace = "Ggit", name = "ReferencesNameCallback"}) Ptr () -> -- user_data : TBasicType TPtr Ptr (Ptr GError) -> -- error IO CInt {- | Gathers reference names and run a callback for each one. To the callback is passed the name of the reference and the data pointer passed to this function. If the callback returns something other than 0, the iteration will stop and /@error@/ will be set. -} repositoryReferencesForeachName :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Ggit.Callbacks.ReferencesNameCallback {- ^ /@callback@/: a 'GI.Ggit.Callbacks.ReferencesNameCallback'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryReferencesForeachName repository callback = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository callback' <- Ggit.Callbacks.mk_ReferencesNameCallback (Ggit.Callbacks.wrap_ReferencesNameCallback Nothing (Ggit.Callbacks.drop_closures_ReferencesNameCallback callback)) let userData = nullPtr onException (do _ <- propagateGError $ ggit_repository_references_foreach_name repository' callback' userData safeFreeFunPtr $ castFunPtrToPtr callback' touchManagedPtr repository return () ) (do safeFreeFunPtr $ castFunPtrToPtr callback' return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryReferencesForeachNameMethodInfo instance (signature ~ (Ggit.Callbacks.ReferencesNameCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryReferencesForeachNameMethodInfo a signature where overloadedMethod _ = repositoryReferencesForeachName #endif -- method Repository::remove_note -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "notes_ref", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "canonical name of the reference to use, or %NULL to use the default ref.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "author", argType = TInterface (Name {namespace = "Ggit", name = "Signature"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "author signature.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "committer", argType = TInterface (Name {namespace = "Ggit", name = "Signature"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "committer signature.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "id", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "OID of the git object to decorate.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_remove_note" ggit_repository_remove_note :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- notes_ref : TBasicType TUTF8 Ptr Ggit.Signature.Signature -> -- author : TInterface (Name {namespace = "Ggit", name = "Signature"}) Ptr Ggit.Signature.Signature -> -- committer : TInterface (Name {namespace = "Ggit", name = "Signature"}) Ptr Ggit.OId.OId -> -- id : TInterface (Name {namespace = "Ggit", name = "OId"}) Ptr (Ptr GError) -> -- error IO CInt {- | Removes the note for an object. -} repositoryRemoveNote :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (T.Text) {- ^ /@notesRef@/: canonical name of the reference to use, or 'Nothing' to use the default ref. -} -> b {- ^ /@author@/: author signature. -} -> c {- ^ /@committer@/: committer signature. -} -> Ggit.OId.OId {- ^ /@id@/: OID of the git object to decorate. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryRemoveNote repository notesRef author committer id = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository maybeNotesRef <- case notesRef of Nothing -> return nullPtr Just jNotesRef -> do jNotesRef' <- textToCString jNotesRef return jNotesRef' author' <- unsafeManagedPtrCastPtr author committer' <- unsafeManagedPtrCastPtr committer id' <- unsafeManagedPtrGetPtr id onException (do _ <- propagateGError $ ggit_repository_remove_note repository' maybeNotesRef author' committer' id' touchManagedPtr repository touchManagedPtr author touchManagedPtr committer touchManagedPtr id freeMem maybeNotesRef return () ) (do freeMem maybeNotesRef ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::reset -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "target", argType = TInterface (Name {namespace = "Ggit", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the target #GgitObject which is a commit or a tag.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "reset_type", argType = TInterface (Name {namespace = "Ggit", name = "ResetType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GgitResetType to perform.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "checkout_options", argType = TInterface (Name {namespace = "Ggit", name = "CheckoutOptions"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GgitCheckoutOptions to be used for a HARD reset.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : True -- Skip return : False foreign import ccall "ggit_repository_reset" ggit_repository_reset :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.Object.Object -> -- target : TInterface (Name {namespace = "Ggit", name = "Object"}) CUInt -> -- reset_type : TInterface (Name {namespace = "Ggit", name = "ResetType"}) Ptr Ggit.CheckoutOptions.CheckoutOptions -> -- checkout_options : TInterface (Name {namespace = "Ggit", name = "CheckoutOptions"}) Ptr (Ptr GError) -> -- error IO () {- | Performs a reset of type /@resetType@/ on /@repository@/ to /@target@/, or /@error@/ will be set. -} repositoryReset :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.CheckoutOptions.IsCheckoutOptions c) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> b {- ^ /@target@/: the target 'GI.Ggit.Objects.Object.Object' which is a commit or a tag. -} -> Ggit.Enums.ResetType {- ^ /@resetType@/: the 'GI.Ggit.Enums.ResetType' to perform. -} -> c {- ^ /@checkoutOptions@/: the 'GI.Ggit.Objects.CheckoutOptions.CheckoutOptions' to be used for a HARD reset. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryReset repository target resetType checkoutOptions = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository target' <- unsafeManagedPtrCastPtr target let resetType' = (fromIntegral . fromEnum) resetType checkoutOptions' <- unsafeManagedPtrCastPtr checkoutOptions onException (do propagateGError $ ggit_repository_reset repository' target' resetType' checkoutOptions' touchManagedPtr repository touchManagedPtr target touchManagedPtr checkoutOptions return () ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::reset_default -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "target", argType = TInterface (Name {namespace = "Ggit", name = "Object"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the target #GgitObject which is a commit or a tag.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pathspecs", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a list of file paths to reset.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : True -- Skip return : False foreign import ccall "ggit_repository_reset_default" ggit_repository_reset_default :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.Object.Object -> -- target : TInterface (Name {namespace = "Ggit", name = "Object"}) Ptr CString -> -- pathspecs : TCArray True (-1) (-1) (TBasicType TUTF8) Ptr (Ptr GError) -> -- error IO () {- | Update some entries in the index from the target commit tree. The scope of the updated entries is determined by the paths specified in /@pathspecs@/. Passing 'Nothing' in /@target@/ will result in removing entries in the index matching the provided pathspecs. -} repositoryResetDefault :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Object.IsObject b) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Maybe (b) {- ^ /@target@/: the target 'GI.Ggit.Objects.Object.Object' which is a commit or a tag. -} -> [T.Text] {- ^ /@pathspecs@/: a list of file paths to reset. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryResetDefault repository target pathspecs = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository maybeTarget <- case target of Nothing -> return nullPtr Just jTarget -> do jTarget' <- unsafeManagedPtrCastPtr jTarget return jTarget' pathspecs' <- packZeroTerminatedUTF8CArray pathspecs onException (do propagateGError $ ggit_repository_reset_default repository' maybeTarget pathspecs' touchManagedPtr repository whenJust target touchManagedPtr mapZeroTerminatedCArray freeMem pathspecs' freeMem pathspecs' return () ) (do mapZeroTerminatedCArray freeMem pathspecs' freeMem pathspecs' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::revert -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "commit", argType = TInterface (Name {namespace = "Ggit", name = "Commit"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitCommit.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "options", argType = TInterface (Name {namespace = "Ggit", name = "RevertOptions"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRevertOptions.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_revert" ggit_repository_revert :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.Commit.Commit -> -- commit : TInterface (Name {namespace = "Ggit", name = "Commit"}) Ptr Ggit.RevertOptions.RevertOptions -> -- options : TInterface (Name {namespace = "Ggit", name = "RevertOptions"}) Ptr (Ptr GError) -> -- error IO CInt {- | Revert the given /@commit@/ on top of the current working directory. -} repositoryRevert :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Commit.IsCommit b) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> b {- ^ /@commit@/: a 'GI.Ggit.Objects.Commit.Commit'. -} -> Ggit.RevertOptions.RevertOptions {- ^ /@options@/: a 'GI.Ggit.Structs.RevertOptions.RevertOptions'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryRevert repository commit options = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository commit' <- unsafeManagedPtrCastPtr commit options' <- unsafeManagedPtrGetPtr options onException (do _ <- propagateGError $ ggit_repository_revert repository' commit' options' touchManagedPtr repository touchManagedPtr commit touchManagedPtr options return () ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) 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 -- method Repository::revparse -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "spec", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the revision specification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Object"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_revparse" ggit_repository_revparse :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- spec : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Object.Object) {- | Find an object, as specified by a revision string. See @man gitrevisions@, or the documentation for @git rev-parse@ for information on the syntax accepted. -} repositoryRevparse :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@spec@/: the revision specification. -} -> m Ggit.Object.Object {- ^ __Returns:__ a 'GI.Ggit.Objects.Object.Object' or 'Nothing' if the revision could not be found. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryRevparse repository spec = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository spec' <- textToCString spec onException (do result <- propagateGError $ ggit_repository_revparse repository' spec' checkUnexpectedReturnNULL "repositoryRevparse" result result' <- (wrapObject Ggit.Object.Object) result touchManagedPtr repository freeMem spec' return result' ) (do freeMem spec' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryRevparseMethodInfo instance (signature ~ (T.Text -> m Ggit.Object.Object), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRevparseMethodInfo a signature where overloadedMethod _ = repositoryRevparse #endif -- method Repository::save_stash -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "stasher", argType = TInterface (Name {namespace = "Ggit", name = "Signature"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitSignature.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "description along with the stashed state or %NULL to be autogenerated.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Ggit", name = "StashFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitStashFlags to control the stashing process.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "OId"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_save_stash" ggit_repository_save_stash :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.Signature.Signature -> -- stasher : TInterface (Name {namespace = "Ggit", name = "Signature"}) CString -> -- message : TBasicType TUTF8 CUInt -> -- flags : TInterface (Name {namespace = "Ggit", name = "StashFlags"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.OId.OId) {- | Saves the local modifications to a new stash. It returns the commit containing the stashed state. This commit is also the target of the direct reference refs\/stash. -} repositorySaveStash :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.Signature.IsSignature b) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> b {- ^ /@stasher@/: a 'GI.Ggit.Objects.Signature.Signature'. -} -> T.Text {- ^ /@message@/: description along with the stashed state or 'Nothing' to be autogenerated. -} -> [Ggit.Flags.StashFlags] {- ^ /@flags@/: a 'GI.Ggit.Flags.StashFlags' to control the stashing process. -} -> m Ggit.OId.OId {- ^ __Returns:__ a new object id of the commit containing the stashed state. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositorySaveStash repository stasher message flags = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository stasher' <- unsafeManagedPtrCastPtr stasher message' <- textToCString message let flags' = gflagsToWord flags onException (do result <- propagateGError $ ggit_repository_save_stash repository' stasher' message' flags' checkUnexpectedReturnNULL "repositorySaveStash" result result' <- (wrapBoxed Ggit.OId.OId) result touchManagedPtr repository touchManagedPtr stasher freeMem message' return result' ) (do freeMem message' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositorySaveStashMethodInfo instance (signature ~ (b -> T.Text -> [Ggit.Flags.StashFlags] -> m Ggit.OId.OId), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b) => O.MethodInfo RepositorySaveStashMethodInfo a signature where overloadedMethod _ = repositorySaveStash #endif -- method Repository::set_head -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ref_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "canonical name of the reference HEAD should point to.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_set_head" ggit_repository_set_head :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- ref_name : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO CInt {- | /No description available in the introspection data./ -} repositorySetHead :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@refName@/: canonical name of the reference HEAD should point to. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositorySetHead repository refName = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository refName' <- textToCString refName onException (do _ <- propagateGError $ ggit_repository_set_head repository' refName' touchManagedPtr repository freeMem refName' return () ) (do freeMem refName' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositorySetHeadMethodInfo instance (signature ~ (T.Text -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetHeadMethodInfo a signature where overloadedMethod _ = repositorySetHead #endif -- method Repository::set_submodule_fetch_recurse -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the submodule.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fetch_recurse_submodules", argType = TInterface (Name {namespace = "Ggit", name = "SubmoduleRecurse"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitSubmoduleRecurse.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : True -- Skip return : False foreign import ccall "ggit_repository_set_submodule_fetch_recurse" ggit_repository_set_submodule_fetch_recurse :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- name : TBasicType TUTF8 CUInt -> -- fetch_recurse_submodules : TInterface (Name {namespace = "Ggit", name = "SubmoduleRecurse"}) Ptr (Ptr GError) -> -- error IO () {- | Sets the submodule.\'name\'.fetchRecurseSubmodules value for the submodule. This setting won\'t affect any existing instances.. -} repositorySetSubmoduleFetchRecurse :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@name@/: the name of the submodule. -} -> Ggit.Enums.SubmoduleRecurse {- ^ /@fetchRecurseSubmodules@/: a 'GI.Ggit.Enums.SubmoduleRecurse'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositorySetSubmoduleFetchRecurse repository name fetchRecurseSubmodules = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository name' <- textToCString name let fetchRecurseSubmodules' = (fromIntegral . fromEnum) fetchRecurseSubmodules onException (do propagateGError $ ggit_repository_set_submodule_fetch_recurse repository' name' fetchRecurseSubmodules' touchManagedPtr repository freeMem name' return () ) (do freeMem name' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositorySetSubmoduleFetchRecurseMethodInfo instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleRecurse -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetSubmoduleFetchRecurseMethodInfo a signature where overloadedMethod _ = repositorySetSubmoduleFetchRecurse #endif -- method Repository::set_submodule_ignore -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the submodule.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ignore", argType = TInterface (Name {namespace = "Ggit", name = "SubmoduleIgnore"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitSubmoduleIgnore.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : True -- Skip return : False foreign import ccall "ggit_repository_set_submodule_ignore" ggit_repository_set_submodule_ignore :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- name : TBasicType TUTF8 CUInt -> -- ignore : TInterface (Name {namespace = "Ggit", name = "SubmoduleIgnore"}) Ptr (Ptr GError) -> -- error IO () {- | Sets the ignore rule for the submodule in the configuration. This does not affect any currently-loaded instances.. -} repositorySetSubmoduleIgnore :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@name@/: the name of the submodule. -} -> Ggit.Enums.SubmoduleIgnore {- ^ /@ignore@/: a 'GI.Ggit.Enums.SubmoduleIgnore'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositorySetSubmoduleIgnore repository name ignore = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository name' <- textToCString name let ignore' = (fromIntegral . fromEnum) ignore onException (do propagateGError $ ggit_repository_set_submodule_ignore repository' name' ignore' touchManagedPtr repository freeMem name' return () ) (do freeMem name' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositorySetSubmoduleIgnoreMethodInfo instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleIgnore -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetSubmoduleIgnoreMethodInfo a signature where overloadedMethod _ = repositorySetSubmoduleIgnore #endif -- method Repository::set_submodule_update -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the submodule.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "update", argType = TInterface (Name {namespace = "Ggit", name = "SubmoduleUpdate"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitSubmoduleUpdate.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : True -- Skip return : False foreign import ccall "ggit_repository_set_submodule_update" ggit_repository_set_submodule_update :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- name : TBasicType TUTF8 CUInt -> -- update : TInterface (Name {namespace = "Ggit", name = "SubmoduleUpdate"}) Ptr (Ptr GError) -> -- error IO () {- | Sets the update rule for the submodule in the configuration. This setting won\'t affect any existing instances. -} repositorySetSubmoduleUpdate :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@name@/: the name of the submodule. -} -> Ggit.Enums.SubmoduleUpdate {- ^ /@update@/: a 'GI.Ggit.Enums.SubmoduleUpdate'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositorySetSubmoduleUpdate repository name update = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository name' <- textToCString name let update' = (fromIntegral . fromEnum) update onException (do propagateGError $ ggit_repository_set_submodule_update repository' name' update' touchManagedPtr repository freeMem name' return () ) (do freeMem name' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositorySetSubmoduleUpdateMethodInfo instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleUpdate -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetSubmoduleUpdateMethodInfo a signature where overloadedMethod _ = repositorySetSubmoduleUpdate #endif -- method Repository::set_submodule_url -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the submodule to configure.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "url", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "URL that should be used for the submodule.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : True -- Skip return : False foreign import ccall "ggit_repository_set_submodule_url" ggit_repository_set_submodule_url :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) CString -> -- name : TBasicType TUTF8 CString -> -- url : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO () {- | Sets the URL for the submodule in the configuration. After calling this, you may wish to call 'GI.Ggit.Structs.Submodule.submoduleSync' to write the changes to the checked out submodule repository. -} repositorySetSubmoduleUrl :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> T.Text {- ^ /@name@/: the name of the submodule to configure. -} -> T.Text {- ^ /@url@/: URL that should be used for the submodule. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositorySetSubmoduleUrl repository name url = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository name' <- textToCString name url' <- textToCString url onException (do propagateGError $ ggit_repository_set_submodule_url repository' name' url' touchManagedPtr repository freeMem name' freeMem url' return () ) (do freeMem name' freeMem url' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositorySetSubmoduleUrlMethodInfo instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetSubmoduleUrlMethodInfo a signature where overloadedMethod _ = repositorySetSubmoduleUrl #endif -- method Repository::set_workdir -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "workdir", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the working directory.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "update_gitlink", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "create/update gitlink in workdir.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "ggit_repository_set_workdir" ggit_repository_set_workdir :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Gio.File.File -> -- workdir : TInterface (Name {namespace = "Gio", name = "File"}) CInt -> -- update_gitlink : TBasicType TBoolean IO () {- | Sets the working directory of the repository. If /@updateGitlink@/ is set to 'True' \"core.worktree\" will be set in the config if workdir is not the parent of the .git directory). -} repositorySetWorkdir :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Gio.File.IsFile b) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> b {- ^ /@workdir@/: the working directory. -} -> Bool {- ^ /@updateGitlink@/: create\/update gitlink in workdir. -} -> m () repositorySetWorkdir repository workdir updateGitlink = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository workdir' <- unsafeManagedPtrCastPtr workdir let updateGitlink' = (fromIntegral . fromEnum) updateGitlink ggit_repository_set_workdir repository' workdir' updateGitlink' touchManagedPtr repository touchManagedPtr workdir return () #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositorySetWorkdirMethodInfo instance (signature ~ (b -> Bool -> m ()), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.MethodInfo RepositorySetWorkdirMethodInfo a signature where overloadedMethod _ = repositorySetWorkdir #endif -- method Repository::stash_foreach -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Ggit", name = "StashCallback"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitStashCallback.", sinceVersion = Nothing}, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "callback user data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_stash_foreach" ggit_repository_stash_foreach :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) FunPtr Ggit.Callbacks.C_StashCallback -> -- callback : TInterface (Name {namespace = "Ggit", name = "StashCallback"}) Ptr () -> -- user_data : TBasicType TPtr Ptr (Ptr GError) -> -- error IO CInt {- | Loops over all the stashed states and issue a callback for each one. If /@callback@/ returns a non-zero value, this will stop looping. -} repositoryStashForeach :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Ggit.Callbacks.StashCallback {- ^ /@callback@/: a 'GI.Ggit.Callbacks.StashCallback'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryStashForeach repository callback = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository callback' <- Ggit.Callbacks.mk_StashCallback (Ggit.Callbacks.wrap_StashCallback Nothing (Ggit.Callbacks.drop_closures_StashCallback callback)) let userData = nullPtr onException (do _ <- propagateGError $ ggit_repository_stash_foreach repository' callback' userData safeFreeFunPtr $ castFunPtrToPtr callback' touchManagedPtr repository return () ) (do safeFreeFunPtr $ castFunPtrToPtr callback' return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryStashForeachMethodInfo instance (signature ~ (Ggit.Callbacks.StashCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryStashForeachMethodInfo a signature where overloadedMethod _ = repositoryStashForeach #endif -- method Repository::submodule_foreach -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Ggit", name = "SubmoduleCallback"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitStatusCallback.", sinceVersion = Nothing}, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "callback user data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_submodule_foreach" ggit_repository_submodule_foreach :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) FunPtr Ggit.Callbacks.C_SubmoduleCallback -> -- callback : TInterface (Name {namespace = "Ggit", name = "SubmoduleCallback"}) Ptr () -> -- user_data : TBasicType TPtr Ptr (Ptr GError) -> -- error IO CInt {- | Gathers submodules and run a callback for each one. To the callback is passed the submodule instance and name. If the callback returns something other than 0, the iteration will stop and /@error@/ will be set. NOTE: the submodule instance passed to the callback is only valid during the call to ggit_repository_submodule_foreach and may not be used after the call has finished. -} repositorySubmoduleForeach :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Ggit.Callbacks.SubmoduleCallback {- ^ /@callback@/: a 'GI.Ggit.Callbacks.StatusCallback'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositorySubmoduleForeach repository callback = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository callback' <- Ggit.Callbacks.mk_SubmoduleCallback (Ggit.Callbacks.wrap_SubmoduleCallback Nothing (Ggit.Callbacks.drop_closures_SubmoduleCallback callback)) let userData = nullPtr onException (do _ <- propagateGError $ ggit_repository_submodule_foreach repository' callback' userData safeFreeFunPtr $ castFunPtrToPtr callback' touchManagedPtr repository return () ) (do safeFreeFunPtr $ castFunPtrToPtr callback' return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositorySubmoduleForeachMethodInfo instance (signature ~ (Ggit.Callbacks.SubmoduleCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySubmoduleForeachMethodInfo a signature where overloadedMethod _ = repositorySubmoduleForeach #endif -- method Repository::tag_foreach -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "Ggit", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitRepository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Ggit", name = "TagCallback"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitTagCallback.", sinceVersion = Nothing}, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "callback user data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_tag_foreach" ggit_repository_tag_foreach :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) FunPtr Ggit.Callbacks.C_TagCallback -> -- callback : TInterface (Name {namespace = "Ggit", name = "TagCallback"}) Ptr () -> -- user_data : TBasicType TPtr Ptr (Ptr GError) -> -- error IO CInt {- | Get all the tags in the repository and run the provided callback on each. If the callback returns something other than 0, the iteration will stop and /@error@/ will be set. -} repositoryTagForeach :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: a 'GI.Ggit.Objects.Repository.Repository'. -} -> Ggit.Callbacks.TagCallback {- ^ /@callback@/: a 'GI.Ggit.Callbacks.TagCallback'. -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryTagForeach repository callback = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository callback' <- Ggit.Callbacks.mk_TagCallback (Ggit.Callbacks.wrap_TagCallback Nothing (Ggit.Callbacks.drop_closures_TagCallback callback)) let userData = nullPtr onException (do _ <- propagateGError $ ggit_repository_tag_foreach repository' callback' userData safeFreeFunPtr $ castFunPtrToPtr callback' touchManagedPtr repository return () ) (do safeFreeFunPtr $ castFunPtrToPtr callback' return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryTagForeachMethodInfo instance (signature ~ (Ggit.Callbacks.TagCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryTagForeachMethodInfo a signature where overloadedMethod _ = repositoryTagForeach #endif -- method Repository::clone -- method type : MemberFunction -- Args : [Arg {argCName = "url", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "url to fetch the repository from.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "location", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the location of the repository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "options", argType = TInterface (Name {namespace = "Ggit", name = "CloneOptions"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GgitCloneOptions.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Repository"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_clone" ggit_repository_clone :: CString -> -- url : TBasicType TUTF8 Ptr Gio.File.File -> -- location : TInterface (Name {namespace = "Gio", name = "File"}) Ptr Ggit.CloneOptions.CloneOptions -> -- options : TInterface (Name {namespace = "Ggit", name = "CloneOptions"}) Ptr (Ptr GError) -> -- error IO (Ptr Repository) {- | Clones a new git repository in the given folder. -} repositoryClone :: (B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a, Ggit.CloneOptions.IsCloneOptions b) => T.Text {- ^ /@url@/: url to fetch the repository from. -} -> a {- ^ /@location@/: the location of the repository. -} -> Maybe (b) {- ^ /@options@/: a 'GI.Ggit.Objects.CloneOptions.CloneOptions'. -} -> m Repository {- ^ __Returns:__ a newly created 'GI.Ggit.Objects.Repository.Repository'. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryClone url location options = liftIO $ do url' <- textToCString url location' <- unsafeManagedPtrCastPtr location maybeOptions <- case options of Nothing -> return nullPtr Just jOptions -> do jOptions' <- unsafeManagedPtrCastPtr jOptions return jOptions' onException (do result <- propagateGError $ ggit_repository_clone url' location' maybeOptions checkUnexpectedReturnNULL "repositoryClone" result result' <- (wrapObject Repository) result touchManagedPtr location whenJust options touchManagedPtr freeMem url' return result' ) (do freeMem url' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) #endif -- method Repository::discover -- method type : MemberFunction -- Args : [Arg {argCName = "location", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the base location where the lookup starts.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gio", name = "File"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_discover" ggit_repository_discover :: Ptr Gio.File.File -> -- location : TInterface (Name {namespace = "Gio", name = "File"}) Ptr (Ptr GError) -> -- error IO (Ptr Gio.File.File) {- | Looks for a git repository. The lookup starts from /@path@/ and walks up the parent directories and stops when a repository is found. -} repositoryDiscover :: (B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) => a {- ^ /@location@/: the base location where the lookup starts. -} -> m Gio.File.File {- ^ __Returns:__ the repository location. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryDiscover location = liftIO $ do location' <- unsafeManagedPtrCastPtr location onException (do result <- propagateGError $ ggit_repository_discover location' checkUnexpectedReturnNULL "repositoryDiscover" result result' <- (wrapObject Gio.File.File) result touchManagedPtr location return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) #endif -- method Repository::discover_full -- method type : MemberFunction -- Args : [Arg {argCName = "location", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the base location where the lookup starts.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "across_fs", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "indictaes whether lookup will work across filesystem devices.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ceiling_dirs", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a list of absolute paths\n at which lookup will stop when reached, or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gio", name = "File"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_discover_full" ggit_repository_discover_full :: Ptr Gio.File.File -> -- location : TInterface (Name {namespace = "Gio", name = "File"}) CInt -> -- across_fs : TBasicType TBoolean Ptr CString -> -- ceiling_dirs : TCArray True (-1) (-1) (TBasicType TUTF8) Ptr (Ptr GError) -> -- error IO (Ptr Gio.File.File) {- | Looks for a git repository. The lookup starts from /@path@/ and walks up the parent directories and stops when a repository is found. -} repositoryDiscoverFull :: (B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) => a {- ^ /@location@/: the base location where the lookup starts. -} -> Bool {- ^ /@acrossFs@/: indictaes whether lookup will work across filesystem devices. -} -> Maybe ([T.Text]) {- ^ /@ceilingDirs@/: a list of absolute paths at which lookup will stop when reached, or 'Nothing'. -} -> m Gio.File.File {- ^ __Returns:__ the repository location. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryDiscoverFull location acrossFs ceilingDirs = liftIO $ do location' <- unsafeManagedPtrCastPtr location let acrossFs' = (fromIntegral . fromEnum) acrossFs maybeCeilingDirs <- case ceilingDirs of Nothing -> return nullPtr Just jCeilingDirs -> do jCeilingDirs' <- packZeroTerminatedUTF8CArray jCeilingDirs return jCeilingDirs' onException (do result <- propagateGError $ ggit_repository_discover_full location' acrossFs' maybeCeilingDirs checkUnexpectedReturnNULL "repositoryDiscoverFull" result result' <- (wrapObject Gio.File.File) result touchManagedPtr location mapZeroTerminatedCArray freeMem maybeCeilingDirs freeMem maybeCeilingDirs return result' ) (do mapZeroTerminatedCArray freeMem maybeCeilingDirs freeMem maybeCeilingDirs ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) #endif -- method Repository::init_repository -- method type : MemberFunction -- Args : [Arg {argCName = "location", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the location of the repository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "is_bare", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "if %TRUE, a git repository without a working directory is created\n at the pointed path. If %FALSE, provided path will be considered as the working\n directory into which the .git directory will be created.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Repository"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_init_repository" ggit_repository_init_repository :: Ptr Gio.File.File -> -- location : TInterface (Name {namespace = "Gio", name = "File"}) CInt -> -- is_bare : TBasicType TBoolean Ptr (Ptr GError) -> -- error IO (Ptr Repository) {- | Creates a new git repository in the given folder. -} repositoryInitRepository :: (B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) => a {- ^ /@location@/: the location of the repository. -} -> Bool {- ^ /@isBare@/: if 'True', a git repository without a working directory is created at the pointed path. If 'False', provided path will be considered as the working directory into which the .git directory will be created. -} -> m Repository {- ^ __Returns:__ a newly created 'GI.Ggit.Objects.Repository.Repository'. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryInitRepository location isBare = liftIO $ do location' <- unsafeManagedPtrCastPtr location let isBare' = (fromIntegral . fromEnum) isBare onException (do result <- propagateGError $ ggit_repository_init_repository location' isBare' checkUnexpectedReturnNULL "repositoryInitRepository" result result' <- (wrapObject Repository) result touchManagedPtr location return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) #endif -- method Repository::open -- method type : MemberFunction -- Args : [Arg {argCName = "location", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the location of the repository.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Repository"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_open" ggit_repository_open :: Ptr Gio.File.File -> -- location : TInterface (Name {namespace = "Gio", name = "File"}) Ptr (Ptr GError) -> -- error IO (Ptr Repository) {- | Open a git repository. The /@path@/ must point to an existing git repository folder, e.g. \/path\/to\/my_repo\/.git\/ (normal repository) objects\/ index HEAD \/path\/to\/bare_repo\/ (bare repository) objects\/ index HEAD The method will automatically detect if /@path@/ is a normal or bare repository or fail if it is neither. -} repositoryOpen :: (B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) => a {- ^ /@location@/: the location of the repository. -} -> m Repository {- ^ __Returns:__ a newly created 'GI.Ggit.Objects.Repository.Repository'. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryOpen location = liftIO $ do location' <- unsafeManagedPtrCastPtr location onException (do result <- propagateGError $ ggit_repository_open location' checkUnexpectedReturnNULL "repositoryOpen" result result' <- (wrapObject Repository) result touchManagedPtr location return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) #endif