{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc) Represents an existing git repository including all of it\'s object contents. -} #define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \ && !defined(__HADDOCK_VERSION__)) module GI.Ggit.Objects.Repository ( -- * Exported types Repository(..) , IsRepository , toRepository , noRepository , -- * Methods -- ** addRemoteFetch #method:addRemoteFetch# #if ENABLE_OVERLOADING RepositoryAddRemoteFetchMethodInfo , #endif repositoryAddRemoteFetch , -- ** addRemotePush #method:addRemotePush# #if ENABLE_OVERLOADING RepositoryAddRemotePushMethodInfo , #endif repositoryAddRemotePush , -- ** blameFile #method:blameFile# #if ENABLE_OVERLOADING RepositoryBlameFileMethodInfo , #endif repositoryBlameFile , -- ** checkoutHead #method:checkoutHead# #if ENABLE_OVERLOADING RepositoryCheckoutHeadMethodInfo , #endif repositoryCheckoutHead , -- ** checkoutIndex #method:checkoutIndex# #if ENABLE_OVERLOADING RepositoryCheckoutIndexMethodInfo , #endif repositoryCheckoutIndex , -- ** checkoutTree #method:checkoutTree# #if ENABLE_OVERLOADING RepositoryCheckoutTreeMethodInfo , #endif repositoryCheckoutTree , -- ** cherryPick #method:cherryPick# #if ENABLE_OVERLOADING RepositoryCherryPickMethodInfo , #endif repositoryCherryPick , -- ** cherryPickCommit #method:cherryPickCommit# #if ENABLE_OVERLOADING RepositoryCherryPickCommitMethodInfo , #endif repositoryCherryPickCommit , -- ** clone #method:clone# repositoryClone , -- ** createBlob #method:createBlob# #if ENABLE_OVERLOADING RepositoryCreateBlobMethodInfo , #endif repositoryCreateBlob , -- ** createBlobFromBuffer #method:createBlobFromBuffer# #if ENABLE_OVERLOADING RepositoryCreateBlobFromBufferMethodInfo, #endif repositoryCreateBlobFromBuffer , -- ** createBlobFromFile #method:createBlobFromFile# #if ENABLE_OVERLOADING RepositoryCreateBlobFromFileMethodInfo , #endif repositoryCreateBlobFromFile , -- ** createBlobFromPath #method:createBlobFromPath# #if ENABLE_OVERLOADING RepositoryCreateBlobFromPathMethodInfo , #endif repositoryCreateBlobFromPath , -- ** createBranch #method:createBranch# #if ENABLE_OVERLOADING RepositoryCreateBranchMethodInfo , #endif repositoryCreateBranch , -- ** createCommit #method:createCommit# #if ENABLE_OVERLOADING RepositoryCreateCommitMethodInfo , #endif repositoryCreateCommit , -- ** createCommitFromIds #method:createCommitFromIds# #if ENABLE_OVERLOADING RepositoryCreateCommitFromIdsMethodInfo , #endif repositoryCreateCommitFromIds , -- ** createIndexEntryForFile #method:createIndexEntryForFile# #if ENABLE_OVERLOADING RepositoryCreateIndexEntryForFileMethodInfo, #endif repositoryCreateIndexEntryForFile , -- ** createIndexEntryForPath #method:createIndexEntryForPath# #if ENABLE_OVERLOADING RepositoryCreateIndexEntryForPathMethodInfo, #endif repositoryCreateIndexEntryForPath , -- ** createNote #method:createNote# #if ENABLE_OVERLOADING RepositoryCreateNoteMethodInfo , #endif repositoryCreateNote , -- ** createReference #method:createReference# #if ENABLE_OVERLOADING RepositoryCreateReferenceMethodInfo , #endif repositoryCreateReference , -- ** createRemote #method:createRemote# #if ENABLE_OVERLOADING RepositoryCreateRemoteMethodInfo , #endif repositoryCreateRemote , -- ** createSymbolicReference #method:createSymbolicReference# #if ENABLE_OVERLOADING RepositoryCreateSymbolicReferenceMethodInfo, #endif repositoryCreateSymbolicReference , -- ** createTag #method:createTag# #if ENABLE_OVERLOADING RepositoryCreateTagMethodInfo , #endif repositoryCreateTag , -- ** createTagAnnotation #method:createTagAnnotation# #if ENABLE_OVERLOADING RepositoryCreateTagAnnotationMethodInfo , #endif repositoryCreateTagAnnotation , -- ** createTagFromBuffer #method:createTagFromBuffer# #if ENABLE_OVERLOADING RepositoryCreateTagFromBufferMethodInfo , #endif repositoryCreateTagFromBuffer , -- ** createTagLightweight #method:createTagLightweight# #if ENABLE_OVERLOADING RepositoryCreateTagLightweightMethodInfo, #endif repositoryCreateTagLightweight , -- ** createTreeBuilder #method:createTreeBuilder# #if ENABLE_OVERLOADING RepositoryCreateTreeBuilderMethodInfo , #endif repositoryCreateTreeBuilder , -- ** createTreeBuilderFromTree #method:createTreeBuilderFromTree# #if ENABLE_OVERLOADING RepositoryCreateTreeBuilderFromTreeMethodInfo, #endif repositoryCreateTreeBuilderFromTree , -- ** deleteTag #method:deleteTag# #if ENABLE_OVERLOADING RepositoryDeleteTagMethodInfo , #endif repositoryDeleteTag , -- ** discover #method:discover# repositoryDiscover , -- ** discoverFull #method:discoverFull# repositoryDiscoverFull , -- ** dropStash #method:dropStash# #if ENABLE_OVERLOADING RepositoryDropStashMethodInfo , #endif repositoryDropStash , -- ** enumerateBranches #method:enumerateBranches# #if ENABLE_OVERLOADING RepositoryEnumerateBranchesMethodInfo , #endif repositoryEnumerateBranches , -- ** fileStatus #method:fileStatus# #if ENABLE_OVERLOADING RepositoryFileStatusMethodInfo , #endif repositoryFileStatus , -- ** fileStatusForeach #method:fileStatusForeach# #if ENABLE_OVERLOADING RepositoryFileStatusForeachMethodInfo , #endif repositoryFileStatusForeach , -- ** getAheadBehind #method:getAheadBehind# #if ENABLE_OVERLOADING RepositoryGetAheadBehindMethodInfo , #endif repositoryGetAheadBehind , -- ** getAttribute #method:getAttribute# #if ENABLE_OVERLOADING RepositoryGetAttributeMethodInfo , #endif repositoryGetAttribute , -- ** getConfig #method:getConfig# #if ENABLE_OVERLOADING RepositoryGetConfigMethodInfo , #endif repositoryGetConfig , -- ** getDefaultNotesRef #method:getDefaultNotesRef# #if ENABLE_OVERLOADING RepositoryGetDefaultNotesRefMethodInfo , #endif repositoryGetDefaultNotesRef , -- ** getDescendantOf #method:getDescendantOf# #if ENABLE_OVERLOADING RepositoryGetDescendantOfMethodInfo , #endif repositoryGetDescendantOf , -- ** getHead #method:getHead# #if ENABLE_OVERLOADING RepositoryGetHeadMethodInfo , #endif repositoryGetHead , -- ** getIndex #method:getIndex# #if ENABLE_OVERLOADING RepositoryGetIndexMethodInfo , #endif repositoryGetIndex , -- ** getLocation #method:getLocation# #if ENABLE_OVERLOADING RepositoryGetLocationMethodInfo , #endif repositoryGetLocation , -- ** getSubmoduleStatus #method:getSubmoduleStatus# #if ENABLE_OVERLOADING RepositoryGetSubmoduleStatusMethodInfo , #endif repositoryGetSubmoduleStatus , -- ** getWorkdir #method:getWorkdir# #if ENABLE_OVERLOADING RepositoryGetWorkdirMethodInfo , #endif repositoryGetWorkdir , -- ** initRepository #method:initRepository# repositoryInitRepository , -- ** isBare #method:isBare# #if ENABLE_OVERLOADING RepositoryIsBareMethodInfo , #endif repositoryIsBare , -- ** isEmpty #method:isEmpty# #if ENABLE_OVERLOADING RepositoryIsEmptyMethodInfo , #endif repositoryIsEmpty , -- ** isHeadDetached #method:isHeadDetached# #if ENABLE_OVERLOADING RepositoryIsHeadDetachedMethodInfo , #endif repositoryIsHeadDetached , -- ** isHeadUnborn #method:isHeadUnborn# #if ENABLE_OVERLOADING RepositoryIsHeadUnbornMethodInfo , #endif repositoryIsHeadUnborn , -- ** listRemotes #method:listRemotes# #if ENABLE_OVERLOADING RepositoryListRemotesMethodInfo , #endif repositoryListRemotes , -- ** listTags #method:listTags# #if ENABLE_OVERLOADING RepositoryListTagsMethodInfo , #endif repositoryListTags , -- ** listTagsMatch #method:listTagsMatch# #if ENABLE_OVERLOADING RepositoryListTagsMatchMethodInfo , #endif repositoryListTagsMatch , -- ** lookup #method:lookup# #if ENABLE_OVERLOADING RepositoryLookupMethodInfo , #endif repositoryLookup , -- ** lookupBlob #method:lookupBlob# #if ENABLE_OVERLOADING RepositoryLookupBlobMethodInfo , #endif repositoryLookupBlob , -- ** lookupBranch #method:lookupBranch# #if ENABLE_OVERLOADING RepositoryLookupBranchMethodInfo , #endif repositoryLookupBranch , -- ** lookupCommit #method:lookupCommit# #if ENABLE_OVERLOADING RepositoryLookupCommitMethodInfo , #endif repositoryLookupCommit , -- ** lookupReference #method:lookupReference# #if ENABLE_OVERLOADING RepositoryLookupReferenceMethodInfo , #endif repositoryLookupReference , -- ** lookupReferenceDwim #method:lookupReferenceDwim# #if ENABLE_OVERLOADING RepositoryLookupReferenceDwimMethodInfo , #endif repositoryLookupReferenceDwim , -- ** lookupRemote #method:lookupRemote# #if ENABLE_OVERLOADING RepositoryLookupRemoteMethodInfo , #endif repositoryLookupRemote , -- ** lookupSubmodule #method:lookupSubmodule# #if ENABLE_OVERLOADING RepositoryLookupSubmoduleMethodInfo , #endif repositoryLookupSubmodule , -- ** lookupTag #method:lookupTag# #if ENABLE_OVERLOADING RepositoryLookupTagMethodInfo , #endif repositoryLookupTag , -- ** lookupTree #method:lookupTree# #if ENABLE_OVERLOADING RepositoryLookupTreeMethodInfo , #endif repositoryLookupTree , -- ** mergeCommits #method:mergeCommits# #if ENABLE_OVERLOADING RepositoryMergeCommitsMethodInfo , #endif repositoryMergeCommits , -- ** mergeTrees #method:mergeTrees# #if ENABLE_OVERLOADING RepositoryMergeTreesMethodInfo , #endif repositoryMergeTrees , -- ** noteForeach #method:noteForeach# #if ENABLE_OVERLOADING RepositoryNoteForeachMethodInfo , #endif repositoryNoteForeach , -- ** open #method:open# repositoryOpen , -- ** pathIsIgnored #method:pathIsIgnored# #if ENABLE_OVERLOADING RepositoryPathIsIgnoredMethodInfo , #endif repositoryPathIsIgnored , -- ** readNote #method:readNote# #if ENABLE_OVERLOADING RepositoryReadNoteMethodInfo , #endif repositoryReadNote , -- ** rebaseInit #method:rebaseInit# #if ENABLE_OVERLOADING RepositoryRebaseInitMethodInfo , #endif repositoryRebaseInit , -- ** rebaseOpen #method:rebaseOpen# #if ENABLE_OVERLOADING RepositoryRebaseOpenMethodInfo , #endif repositoryRebaseOpen , -- ** referencesForeach #method:referencesForeach# #if ENABLE_OVERLOADING RepositoryReferencesForeachMethodInfo , #endif repositoryReferencesForeach , -- ** referencesForeachName #method:referencesForeachName# #if ENABLE_OVERLOADING RepositoryReferencesForeachNameMethodInfo, #endif repositoryReferencesForeachName , -- ** removeNote #method:removeNote# #if ENABLE_OVERLOADING RepositoryRemoveNoteMethodInfo , #endif repositoryRemoveNote , -- ** reset #method:reset# #if ENABLE_OVERLOADING RepositoryResetMethodInfo , #endif repositoryReset , -- ** resetDefault #method:resetDefault# #if ENABLE_OVERLOADING RepositoryResetDefaultMethodInfo , #endif repositoryResetDefault , -- ** revert #method:revert# #if ENABLE_OVERLOADING RepositoryRevertMethodInfo , #endif repositoryRevert , -- ** revparse #method:revparse# #if ENABLE_OVERLOADING RepositoryRevparseMethodInfo , #endif repositoryRevparse , -- ** saveStash #method:saveStash# #if ENABLE_OVERLOADING RepositorySaveStashMethodInfo , #endif repositorySaveStash , -- ** setHead #method:setHead# #if ENABLE_OVERLOADING RepositorySetHeadMethodInfo , #endif repositorySetHead , -- ** setSubmoduleFetchRecurse #method:setSubmoduleFetchRecurse# #if ENABLE_OVERLOADING RepositorySetSubmoduleFetchRecurseMethodInfo, #endif repositorySetSubmoduleFetchRecurse , -- ** setSubmoduleIgnore #method:setSubmoduleIgnore# #if ENABLE_OVERLOADING RepositorySetSubmoduleIgnoreMethodInfo , #endif repositorySetSubmoduleIgnore , -- ** setSubmoduleUpdate #method:setSubmoduleUpdate# #if ENABLE_OVERLOADING RepositorySetSubmoduleUpdateMethodInfo , #endif repositorySetSubmoduleUpdate , -- ** setSubmoduleUrl #method:setSubmoduleUrl# #if ENABLE_OVERLOADING RepositorySetSubmoduleUrlMethodInfo , #endif repositorySetSubmoduleUrl , -- ** setWorkdir #method:setWorkdir# #if ENABLE_OVERLOADING RepositorySetWorkdirMethodInfo , #endif repositorySetWorkdir , -- ** stashForeach #method:stashForeach# #if ENABLE_OVERLOADING RepositoryStashForeachMethodInfo , #endif repositoryStashForeach , -- ** submoduleForeach #method:submoduleForeach# #if ENABLE_OVERLOADING RepositorySubmoduleForeachMethodInfo , #endif repositorySubmoduleForeach , -- ** tagForeach #method:tagForeach# #if ENABLE_OVERLOADING RepositoryTagForeachMethodInfo , #endif repositoryTagForeach , -- * Properties -- ** cloneOptions #attr:cloneOptions# {- | /No description available in the introspection data./ -} #if ENABLE_OVERLOADING RepositoryCloneOptionsPropertyInfo , #endif constructRepositoryCloneOptions , getRepositoryCloneOptions , #if ENABLE_OVERLOADING repositoryCloneOptions , #endif -- ** head #attr:head# {- | /No description available in the introspection data./ -} #if ENABLE_OVERLOADING RepositoryHeadPropertyInfo , #endif getRepositoryHead , #if ENABLE_OVERLOADING repositoryHead , #endif -- ** init #attr:init# {- | /No description available in the introspection data./ -} #if ENABLE_OVERLOADING RepositoryInitPropertyInfo , #endif constructRepositoryInit , getRepositoryInit , #if ENABLE_OVERLOADING repositoryInit , #endif -- ** isBare #attr:isBare# {- | /No description available in the introspection data./ -} #if ENABLE_OVERLOADING RepositoryIsBarePropertyInfo , #endif constructRepositoryIsBare , getRepositoryIsBare , -- ** location #attr:location# {- | /No description available in the introspection data./ -} #if ENABLE_OVERLOADING RepositoryLocationPropertyInfo , #endif constructRepositoryLocation , getRepositoryLocation , #if ENABLE_OVERLOADING repositoryLocation , #endif -- ** url #attr:url# {- | /No description available in the introspection data./ -} #if ENABLE_OVERLOADING RepositoryUrlPropertyInfo , #endif constructRepositoryUrl , getRepositoryUrl , #if ENABLE_OVERLOADING repositoryUrl , #endif -- ** workdir #attr:workdir# {- | /No description available in the introspection data./ -} #if ENABLE_OVERLOADING RepositoryWorkdirPropertyInfo , #endif clearRepositoryWorkdir , constructRepositoryWorkdir , getRepositoryWorkdir , #if ENABLE_OVERLOADING repositoryWorkdir , #endif setRepositoryWorkdir , ) where import Data.GI.Base.ShortPrelude import qualified Data.GI.Base.ShortPrelude as SP import qualified Data.GI.Base.Overloading as O import qualified Prelude as P import qualified Data.GI.Base.Attributes as GI.Attributes import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr import qualified Data.GI.Base.GClosure as B.GClosure import qualified Data.GI.Base.GError as B.GError import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GValue as B.GValue import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack import qualified Data.GI.Base.Properties as B.Properties import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import qualified Foreign.Ptr as FP import qualified GHC.OverloadedLabels as OL import qualified GI.GObject.Objects.Object as GObject.Object import qualified GI.Ggit.Callbacks as Ggit.Callbacks import {-# SOURCE #-} qualified GI.Ggit.Enums as Ggit.Enums import {-# SOURCE #-} qualified GI.Ggit.Flags as Ggit.Flags import {-# SOURCE #-} qualified GI.Ggit.Objects.Blame as Ggit.Blame import {-# SOURCE #-} qualified GI.Ggit.Objects.Blob as Ggit.Blob import {-# SOURCE #-} qualified GI.Ggit.Objects.BlobOutputStream as Ggit.BlobOutputStream import {-# SOURCE #-} qualified GI.Ggit.Objects.Branch as Ggit.Branch import {-# SOURCE #-} qualified GI.Ggit.Objects.CheckoutOptions as Ggit.CheckoutOptions import {-# SOURCE #-} qualified GI.Ggit.Objects.CherryPickOptions as Ggit.CherryPickOptions import {-# SOURCE #-} qualified GI.Ggit.Objects.CloneOptions as Ggit.CloneOptions import {-# SOURCE #-} qualified GI.Ggit.Objects.Commit as Ggit.Commit import {-# SOURCE #-} qualified GI.Ggit.Objects.Config as Ggit.Config import {-# SOURCE #-} qualified GI.Ggit.Objects.Index as Ggit.Index import {-# SOURCE #-} qualified GI.Ggit.Objects.Native as Ggit.Native import {-# SOURCE #-} qualified GI.Ggit.Objects.Object as Ggit.Object import {-# SOURCE #-} qualified GI.Ggit.Objects.ObjectFactoryBase as Ggit.ObjectFactoryBase import {-# SOURCE #-} qualified GI.Ggit.Objects.Rebase as Ggit.Rebase import {-# SOURCE #-} qualified GI.Ggit.Objects.Ref as Ggit.Ref import {-# SOURCE #-} qualified GI.Ggit.Objects.Remote as Ggit.Remote import {-# SOURCE #-} qualified GI.Ggit.Objects.Signature as Ggit.Signature import {-# SOURCE #-} qualified GI.Ggit.Objects.Tag as Ggit.Tag import {-# SOURCE #-} qualified GI.Ggit.Objects.Tree as Ggit.Tree import {-# SOURCE #-} qualified GI.Ggit.Objects.TreeBuilder as Ggit.TreeBuilder import {-# SOURCE #-} qualified GI.Ggit.Structs.AnnotatedCommit as Ggit.AnnotatedCommit import {-# SOURCE #-} qualified GI.Ggit.Structs.BlameOptions as Ggit.BlameOptions import {-# SOURCE #-} qualified GI.Ggit.Structs.BranchEnumerator as Ggit.BranchEnumerator import {-# SOURCE #-} qualified GI.Ggit.Structs.IndexEntry as Ggit.IndexEntry import {-# SOURCE #-} qualified GI.Ggit.Structs.MergeOptions as Ggit.MergeOptions import {-# SOURCE #-} qualified GI.Ggit.Structs.Note as Ggit.Note import {-# SOURCE #-} qualified GI.Ggit.Structs.OId as Ggit.OId import {-# SOURCE #-} qualified GI.Ggit.Structs.RebaseOptions as Ggit.RebaseOptions import {-# SOURCE #-} qualified GI.Ggit.Structs.RevertOptions as Ggit.RevertOptions import {-# SOURCE #-} qualified GI.Ggit.Structs.StatusOptions as Ggit.StatusOptions import {-# SOURCE #-} qualified GI.Ggit.Structs.Submodule as Ggit.Submodule import qualified GI.Gio.Interfaces.File as Gio.File import qualified GI.Gio.Interfaces.Initable as Gio.Initable -- | Memory-managed wrapper type. 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 -- | Type class for types which can be safely cast to `Repository`, for instance with `toRepository`. class (GObject o, O.IsDescendantOf Repository o) => IsRepository o instance (GObject o, O.IsDescendantOf Repository o) => IsRepository o instance O.HasParentTypes Repository type instance O.ParentTypes Repository = '[Ggit.Native.Native, Ggit.ObjectFactoryBase.ObjectFactoryBase, GObject.Object.Object, Gio.Initable.Initable] -- | Cast to `Repository`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`. toRepository :: (MonadIO m, IsRepository o) => o -> m Repository toRepository = liftIO . unsafeCastTo Repository -- | A convenience alias for `Nothing` :: `Maybe` `Repository`. noRepository :: Maybe Repository noRepository = Nothing #if ENABLE_OVERLOADING type family ResolveRepositoryMethod (t :: Symbol) (o :: *) :: * where ResolveRepositoryMethod "addRemoteFetch" o = RepositoryAddRemoteFetchMethodInfo ResolveRepositoryMethod "addRemotePush" o = RepositoryAddRemotePushMethodInfo ResolveRepositoryMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo ResolveRepositoryMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo ResolveRepositoryMethod "blameFile" o = RepositoryBlameFileMethodInfo ResolveRepositoryMethod "checkoutHead" o = RepositoryCheckoutHeadMethodInfo ResolveRepositoryMethod "checkoutIndex" o = RepositoryCheckoutIndexMethodInfo ResolveRepositoryMethod "checkoutTree" o = RepositoryCheckoutTreeMethodInfo ResolveRepositoryMethod "cherryPick" o = RepositoryCherryPickMethodInfo ResolveRepositoryMethod "cherryPickCommit" o = RepositoryCherryPickCommitMethodInfo ResolveRepositoryMethod "createBlob" o = RepositoryCreateBlobMethodInfo ResolveRepositoryMethod "createBlobFromBuffer" o = RepositoryCreateBlobFromBufferMethodInfo ResolveRepositoryMethod "createBlobFromFile" o = RepositoryCreateBlobFromFileMethodInfo ResolveRepositoryMethod "createBlobFromPath" o = RepositoryCreateBlobFromPathMethodInfo ResolveRepositoryMethod "createBranch" o = RepositoryCreateBranchMethodInfo ResolveRepositoryMethod "createCommit" o = RepositoryCreateCommitMethodInfo ResolveRepositoryMethod "createCommitFromIds" o = RepositoryCreateCommitFromIdsMethodInfo ResolveRepositoryMethod "createIndexEntryForFile" o = RepositoryCreateIndexEntryForFileMethodInfo ResolveRepositoryMethod "createIndexEntryForPath" o = RepositoryCreateIndexEntryForPathMethodInfo ResolveRepositoryMethod "createNote" o = RepositoryCreateNoteMethodInfo ResolveRepositoryMethod "createReference" o = RepositoryCreateReferenceMethodInfo ResolveRepositoryMethod "createRemote" o = RepositoryCreateRemoteMethodInfo ResolveRepositoryMethod "createSymbolicReference" o = RepositoryCreateSymbolicReferenceMethodInfo ResolveRepositoryMethod "createTag" o = RepositoryCreateTagMethodInfo ResolveRepositoryMethod "createTagAnnotation" o = RepositoryCreateTagAnnotationMethodInfo ResolveRepositoryMethod "createTagFromBuffer" o = RepositoryCreateTagFromBufferMethodInfo ResolveRepositoryMethod "createTagLightweight" o = RepositoryCreateTagLightweightMethodInfo ResolveRepositoryMethod "createTreeBuilder" o = RepositoryCreateTreeBuilderMethodInfo ResolveRepositoryMethod "createTreeBuilderFromTree" o = RepositoryCreateTreeBuilderFromTreeMethodInfo ResolveRepositoryMethod "deleteTag" o = RepositoryDeleteTagMethodInfo ResolveRepositoryMethod "dropStash" o = RepositoryDropStashMethodInfo ResolveRepositoryMethod "enumerateBranches" o = RepositoryEnumerateBranchesMethodInfo ResolveRepositoryMethod "fileStatus" o = RepositoryFileStatusMethodInfo ResolveRepositoryMethod "fileStatusForeach" o = RepositoryFileStatusForeachMethodInfo ResolveRepositoryMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo ResolveRepositoryMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo ResolveRepositoryMethod "getv" o = GObject.Object.ObjectGetvMethodInfo ResolveRepositoryMethod "init" o = Gio.Initable.InitableInitMethodInfo ResolveRepositoryMethod "isBare" o = RepositoryIsBareMethodInfo ResolveRepositoryMethod "isEmpty" o = RepositoryIsEmptyMethodInfo ResolveRepositoryMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo ResolveRepositoryMethod "isHeadDetached" o = RepositoryIsHeadDetachedMethodInfo ResolveRepositoryMethod "isHeadUnborn" o = RepositoryIsHeadUnbornMethodInfo ResolveRepositoryMethod "listRemotes" o = RepositoryListRemotesMethodInfo ResolveRepositoryMethod "listTags" o = RepositoryListTagsMethodInfo ResolveRepositoryMethod "listTagsMatch" o = RepositoryListTagsMatchMethodInfo ResolveRepositoryMethod "lookup" o = RepositoryLookupMethodInfo ResolveRepositoryMethod "lookupBlob" o = RepositoryLookupBlobMethodInfo ResolveRepositoryMethod "lookupBranch" o = RepositoryLookupBranchMethodInfo ResolveRepositoryMethod "lookupCommit" o = RepositoryLookupCommitMethodInfo ResolveRepositoryMethod "lookupReference" o = RepositoryLookupReferenceMethodInfo ResolveRepositoryMethod "lookupReferenceDwim" o = RepositoryLookupReferenceDwimMethodInfo ResolveRepositoryMethod "lookupRemote" o = RepositoryLookupRemoteMethodInfo ResolveRepositoryMethod "lookupSubmodule" o = RepositoryLookupSubmoduleMethodInfo ResolveRepositoryMethod "lookupTag" o = RepositoryLookupTagMethodInfo ResolveRepositoryMethod "lookupTree" o = RepositoryLookupTreeMethodInfo ResolveRepositoryMethod "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 "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) => OL.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 -- VVV Prop "clone-options" -- Type: TInterface (Name {namespace = "Ggit", name = "CloneOptions"}) -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly] -- Nullable: (Nothing,Nothing) {- | Get the value of the “@clone-options@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' repository #cloneOptions @ -} getRepositoryCloneOptions :: (MonadIO m, IsRepository o) => o -> m (Maybe Ggit.CloneOptions.CloneOptions) getRepositoryCloneOptions obj = liftIO $ B.Properties.getObjectPropertyObject obj "clone-options" Ggit.CloneOptions.CloneOptions {- | Construct a `GValueConstruct` with valid value for the “@clone-options@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructRepositoryCloneOptions :: (IsRepository o, Ggit.CloneOptions.IsCloneOptions a) => a -> IO (GValueConstruct o) constructRepositoryCloneOptions val = B.Properties.constructObjectPropertyObject "clone-options" (Just val) #if ENABLE_OVERLOADING 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) {- | Get the value of the “@head@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' repository #head @ -} getRepositoryHead :: (MonadIO m, IsRepository o) => o -> m (Maybe Ggit.Ref.Ref) getRepositoryHead obj = liftIO $ B.Properties.getObjectPropertyObject obj "head" Ggit.Ref.Ref #if ENABLE_OVERLOADING 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) {- | Get the value of the “@init@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' repository #init @ -} getRepositoryInit :: (MonadIO m, IsRepository o) => o -> m Bool getRepositoryInit obj = liftIO $ B.Properties.getObjectPropertyBool obj "init" {- | Construct a `GValueConstruct` with valid value for the “@init@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructRepositoryInit :: (IsRepository o) => Bool -> IO (GValueConstruct o) constructRepositoryInit val = B.Properties.constructObjectPropertyBool "init" val #if ENABLE_OVERLOADING 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) {- | Get the value of the “@is-bare@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' repository #isBare @ -} getRepositoryIsBare :: (MonadIO m, IsRepository o) => o -> m Bool getRepositoryIsBare obj = liftIO $ B.Properties.getObjectPropertyBool obj "is-bare" {- | Construct a `GValueConstruct` with valid value for the “@is-bare@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructRepositoryIsBare :: (IsRepository o) => Bool -> IO (GValueConstruct o) constructRepositoryIsBare val = B.Properties.constructObjectPropertyBool "is-bare" val #if ENABLE_OVERLOADING 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) {- | Get the value of the “@location@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' repository #location @ -} getRepositoryLocation :: (MonadIO m, IsRepository o) => o -> m (Maybe Gio.File.File) getRepositoryLocation obj = liftIO $ B.Properties.getObjectPropertyObject obj "location" Gio.File.File {- | Construct a `GValueConstruct` with valid value for the “@location@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructRepositoryLocation :: (IsRepository o, Gio.File.IsFile a) => a -> IO (GValueConstruct o) constructRepositoryLocation val = B.Properties.constructObjectPropertyObject "location" (Just val) #if ENABLE_OVERLOADING 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) {- | Get the value of the “@url@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' repository #url @ -} getRepositoryUrl :: (MonadIO m, IsRepository o) => o -> m (Maybe T.Text) getRepositoryUrl obj = liftIO $ B.Properties.getObjectPropertyString obj "url" {- | Construct a `GValueConstruct` with valid value for the “@url@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructRepositoryUrl :: (IsRepository o) => T.Text -> IO (GValueConstruct o) constructRepositoryUrl val = B.Properties.constructObjectPropertyString "url" (Just val) #if ENABLE_OVERLOADING 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) {- | Get the value of the “@workdir@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' repository #workdir @ -} getRepositoryWorkdir :: (MonadIO m, IsRepository o) => o -> m (Maybe Gio.File.File) getRepositoryWorkdir obj = liftIO $ B.Properties.getObjectPropertyObject obj "workdir" Gio.File.File {- | Set the value of the “@workdir@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' repository [ #workdir 'Data.GI.Base.Attributes.:=' value ] @ -} setRepositoryWorkdir :: (MonadIO m, IsRepository o, Gio.File.IsFile a) => o -> a -> m () setRepositoryWorkdir obj val = liftIO $ B.Properties.setObjectPropertyObject obj "workdir" (Just val) {- | Construct a `GValueConstruct` with valid value for the “@workdir@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructRepositoryWorkdir :: (IsRepository o, Gio.File.IsFile a) => a -> IO (GValueConstruct o) constructRepositoryWorkdir val = B.Properties.constructObjectPropertyObject "workdir" (Just val) {- | Set the value of the “@workdir@” property to `Nothing`. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.clear' #workdir @ -} clearRepositoryWorkdir :: (MonadIO m, IsRepository o) => o -> m () clearRepositoryWorkdir obj = liftIO $ B.Properties.setObjectPropertyObject obj "workdir" (Nothing :: Maybe Gio.File.File) #if ENABLE_OVERLOADING 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 ENABLE_OVERLOADING instance O.HasAttributeList Repository type instance O.AttributeList Repository = RepositoryAttributeList type RepositoryAttributeList = ('[ '("cloneOptions", RepositoryCloneOptionsPropertyInfo), '("head", RepositoryHeadPropertyInfo), '("init", RepositoryInitPropertyInfo), '("isBare", RepositoryIsBarePropertyInfo), '("location", RepositoryLocationPropertyInfo), '("native", Ggit.Native.NativeNativePropertyInfo), '("url", RepositoryUrlPropertyInfo), '("workdir", RepositoryWorkdirPropertyInfo)] :: [(Symbol, *)]) #endif #if ENABLE_OVERLOADING repositoryCloneOptions :: AttrLabelProxy "cloneOptions" repositoryCloneOptions = AttrLabelProxy repositoryHead :: AttrLabelProxy "head" repositoryHead = AttrLabelProxy repositoryInit :: AttrLabelProxy "init" repositoryInit = AttrLabelProxy repositoryLocation :: AttrLabelProxy "location" repositoryLocation = AttrLabelProxy repositoryUrl :: AttrLabelProxy "url" repositoryUrl = AttrLabelProxy repositoryWorkdir :: AttrLabelProxy "workdir" repositoryWorkdir = AttrLabelProxy #endif #if ENABLE_OVERLOADING 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 ENABLE_OVERLOADING data RepositoryAddRemoteFetchMethodInfo instance (signature ~ (b -> T.Text -> m ()), MonadIO m, IsRepository a, Ggit.Remote.IsRemote b) => O.MethodInfo RepositoryAddRemoteFetchMethodInfo a signature where overloadedMethod _ = repositoryAddRemoteFetch #endif -- 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 ENABLE_OVERLOADING data RepositoryAddRemotePushMethodInfo instance (signature ~ (b -> T.Text -> m ()), MonadIO m, IsRepository a, Ggit.Remote.IsRemote b) => O.MethodInfo RepositoryAddRemotePushMethodInfo a signature where overloadedMethod _ = repositoryAddRemotePush #endif -- 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 (Maybe 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 maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Blame.Blame) result' return result'' touchManagedPtr repository touchManagedPtr file whenJust blameOptions touchManagedPtr return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryBlameFileMethodInfo instance (signature ~ (b -> Maybe (Ggit.BlameOptions.BlameOptions) -> m (Maybe Ggit.Blame.Blame)), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.MethodInfo RepositoryBlameFileMethodInfo a signature where overloadedMethod _ = repositoryBlameFile #endif -- 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 ENABLE_OVERLOADING data RepositoryCheckoutHeadMethodInfo instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsRepository a, Ggit.CheckoutOptions.IsCheckoutOptions b) => O.MethodInfo RepositoryCheckoutHeadMethodInfo a signature where overloadedMethod _ = repositoryCheckoutHead #endif -- 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 ENABLE_OVERLOADING data RepositoryCheckoutIndexMethodInfo instance (signature ~ (Maybe (b) -> Maybe (c) -> m ()), MonadIO m, IsRepository a, Ggit.Index.IsIndex b, Ggit.CheckoutOptions.IsCheckoutOptions c) => O.MethodInfo RepositoryCheckoutIndexMethodInfo a signature where overloadedMethod _ = repositoryCheckoutIndex #endif -- 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 ENABLE_OVERLOADING data RepositoryCheckoutTreeMethodInfo instance (signature ~ (Maybe (b) -> Maybe (c) -> m ()), MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.CheckoutOptions.IsCheckoutOptions c) => O.MethodInfo RepositoryCheckoutTreeMethodInfo a signature where overloadedMethod _ = repositoryCheckoutTree #endif -- 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 ENABLE_OVERLOADING data RepositoryCherryPickMethodInfo instance (signature ~ (b -> c -> m ()), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.CherryPickOptions.IsCherryPickOptions c) => O.MethodInfo RepositoryCherryPickMethodInfo a signature where overloadedMethod _ = repositoryCherryPick #endif -- 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 (Maybe 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 maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Index.Index) result' return result'' touchManagedPtr repository touchManagedPtr commit touchManagedPtr ourCommit whenJust mergeOptions touchManagedPtr return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryCherryPickCommitMethodInfo instance (signature ~ (b -> c -> Word32 -> Maybe (Ggit.MergeOptions.MergeOptions) -> m (Maybe Ggit.Index.Index)), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.Commit.IsCommit c) => O.MethodInfo RepositoryCherryPickCommitMethodInfo a signature where overloadedMethod _ = repositoryCherryPickCommit #endif -- 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 (Maybe Ggit.BlobOutputStream.BlobOutputStream) {- ^ __Returns:__ a 'GI.Ggit.Objects.BlobOutputStream.BlobOutputStream'. -} repositoryCreateBlob repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository result <- ggit_repository_create_blob repository' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.BlobOutputStream.BlobOutputStream) result' return result'' touchManagedPtr repository return maybeResult #if ENABLE_OVERLOADING data RepositoryCreateBlobMethodInfo instance (signature ~ (m (Maybe 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 (Maybe 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 maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.OId.OId) result' return result'' touchManagedPtr repository freeMem buffer' return maybeResult ) (do freeMem buffer' ) #if ENABLE_OVERLOADING data RepositoryCreateBlobFromBufferMethodInfo instance (signature ~ (ByteString -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateBlobFromBufferMethodInfo a signature where overloadedMethod _ = repositoryCreateBlobFromBuffer #endif -- 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. Returns (transfer full) (nullable): the new @/GgitOid/@ of the written blob, or 'Nothing' if writing the blob failed. -} 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 {- ^ /(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 ENABLE_OVERLOADING data RepositoryCreateBlobFromFileMethodInfo instance (signature ~ (b -> m Ggit.OId.OId), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.MethodInfo RepositoryCreateBlobFromFileMethodInfo a signature where overloadedMethod _ = repositoryCreateBlobFromFile #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.OId.OId) result' return result'' touchManagedPtr repository freeMem path' return maybeResult ) (do freeMem path' ) #if ENABLE_OVERLOADING data RepositoryCreateBlobFromPathMethodInfo instance (signature ~ (T.Text -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateBlobFromPathMethodInfo a signature where overloadedMethod _ = repositoryCreateBlobFromPath #endif -- 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 ENABLE_OVERLOADING data RepositoryCreateBranchMethodInfo instance (signature ~ (T.Text -> b -> [Ggit.Flags.CreateFlags] -> m (Maybe Ggit.Branch.Branch)), MonadIO m, IsRepository a, Ggit.Object.IsObject b) => O.MethodInfo RepositoryCreateBranchMethodInfo a signature where overloadedMethod _ = repositoryCreateBranch #endif -- 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 (Maybe 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 maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.OId.OId) result' return result'' touchManagedPtr repository touchManagedPtr author touchManagedPtr committer touchManagedPtr tree mapM_ touchManagedPtr parents freeMem maybeUpdateRef freeMem maybeMessageEncoding freeMem message' freeMem parents'' return maybeResult ) (do freeMem maybeUpdateRef freeMem maybeMessageEncoding freeMem message' freeMem parents'' ) #if ENABLE_OVERLOADING data RepositoryCreateCommitMethodInfo instance (signature ~ (Maybe (T.Text) -> b -> c -> Maybe (T.Text) -> T.Text -> d -> [Ggit.Commit.Commit] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c, Ggit.Tree.IsTree d) => O.MethodInfo RepositoryCreateCommitMethodInfo a signature where overloadedMethod _ = repositoryCreateCommit #endif -- 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 (Maybe 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 maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.OId.OId) result' return result'' touchManagedPtr repository touchManagedPtr author touchManagedPtr committer touchManagedPtr tree mapM_ touchManagedPtr parents freeMem maybeUpdateRef freeMem maybeMessageEncoding freeMem message' freeMem parents'' return maybeResult ) (do freeMem maybeUpdateRef freeMem maybeMessageEncoding freeMem message' freeMem parents'' ) #if ENABLE_OVERLOADING data RepositoryCreateCommitFromIdsMethodInfo instance (signature ~ (Maybe (T.Text) -> b -> c -> Maybe (T.Text) -> T.Text -> Ggit.OId.OId -> [Ggit.OId.OId] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => O.MethodInfo RepositoryCreateCommitFromIdsMethodInfo a signature where overloadedMethod _ = repositoryCreateCommitFromIds #endif -- 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 (Maybe 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 maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.IndexEntry.IndexEntry) result' return result'' touchManagedPtr repository whenJust file touchManagedPtr whenJust id touchManagedPtr return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryCreateIndexEntryForFileMethodInfo instance (signature ~ (Maybe (b) -> Maybe (Ggit.OId.OId) -> m (Maybe Ggit.IndexEntry.IndexEntry)), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.MethodInfo RepositoryCreateIndexEntryForFileMethodInfo a signature where overloadedMethod _ = repositoryCreateIndexEntryForFile #endif -- 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 (Maybe 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 maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.IndexEntry.IndexEntry) result' return result'' touchManagedPtr repository whenJust id touchManagedPtr freeMem maybePath return maybeResult ) (do freeMem maybePath ) #if ENABLE_OVERLOADING data RepositoryCreateIndexEntryForPathMethodInfo instance (signature ~ (Maybe (T.Text) -> Maybe (Ggit.OId.OId) -> m (Maybe Ggit.IndexEntry.IndexEntry)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateIndexEntryForPathMethodInfo a signature where overloadedMethod _ = repositoryCreateIndexEntryForPath #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.OId.OId) result' return result'' touchManagedPtr repository touchManagedPtr author touchManagedPtr committer touchManagedPtr id freeMem maybeNotesRef freeMem note' return maybeResult ) (do freeMem maybeNotesRef freeMem note' ) #if ENABLE_OVERLOADING data RepositoryCreateNoteMethodInfo instance (signature ~ (Maybe (T.Text) -> b -> c -> Ggit.OId.OId -> T.Text -> Bool -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => O.MethodInfo RepositoryCreateNoteMethodInfo a signature where overloadedMethod _ = repositoryCreateNote #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Ref.Ref) result' return result'' touchManagedPtr repository touchManagedPtr oid freeMem name' freeMem logMessage' return maybeResult ) (do freeMem name' freeMem logMessage' ) #if ENABLE_OVERLOADING data RepositoryCreateReferenceMethodInfo instance (signature ~ (T.Text -> Ggit.OId.OId -> T.Text -> m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateReferenceMethodInfo a signature where overloadedMethod _ = repositoryCreateReference #endif -- 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 ENABLE_OVERLOADING data RepositoryCreateRemoteMethodInfo instance (signature ~ (T.Text -> T.Text -> m (Maybe Ggit.Remote.Remote)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateRemoteMethodInfo a signature where overloadedMethod _ = repositoryCreateRemote #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Ref.Ref) result' return result'' touchManagedPtr repository freeMem name' freeMem target' freeMem logMessage' return maybeResult ) (do freeMem name' freeMem target' freeMem logMessage' ) #if ENABLE_OVERLOADING data RepositoryCreateSymbolicReferenceMethodInfo instance (signature ~ (T.Text -> T.Text -> T.Text -> m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateSymbolicReferenceMethodInfo a signature where overloadedMethod _ = repositoryCreateSymbolicReference #endif -- 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 ENABLE_OVERLOADING data RepositoryCreateTagMethodInfo instance (signature ~ (T.Text -> b -> c -> T.Text -> [Ggit.Flags.CreateFlags] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.Signature.IsSignature c) => O.MethodInfo RepositoryCreateTagMethodInfo a signature where overloadedMethod _ = repositoryCreateTag #endif -- 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 ENABLE_OVERLOADING data RepositoryCreateTagAnnotationMethodInfo instance (signature ~ (T.Text -> b -> c -> T.Text -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.Signature.IsSignature c) => O.MethodInfo RepositoryCreateTagAnnotationMethodInfo a signature where overloadedMethod _ = repositoryCreateTagAnnotation #endif -- 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 ENABLE_OVERLOADING data RepositoryCreateTagFromBufferMethodInfo instance (signature ~ (T.Text -> [Ggit.Flags.CreateFlags] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryCreateTagFromBufferMethodInfo a signature where overloadedMethod _ = repositoryCreateTagFromBuffer #endif -- 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 ENABLE_OVERLOADING data RepositoryCreateTagLightweightMethodInfo instance (signature ~ (T.Text -> b -> [Ggit.Flags.CreateFlags] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Object.IsObject b) => O.MethodInfo RepositoryCreateTagLightweightMethodInfo a signature where overloadedMethod _ = repositoryCreateTagLightweight #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.TreeBuilder.TreeBuilder) result' return result'' touchManagedPtr repository return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryCreateTreeBuilderMethodInfo instance (signature ~ (m (Maybe 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.TreeBuilder.TreeBuilder) result' return result'' touchManagedPtr repository touchManagedPtr tree return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryCreateTreeBuilderFromTreeMethodInfo instance (signature ~ (b -> m (Maybe Ggit.TreeBuilder.TreeBuilder)), MonadIO m, IsRepository a, Ggit.Tree.IsTree b) => O.MethodInfo RepositoryCreateTreeBuilderFromTreeMethodInfo a signature where overloadedMethod _ = repositoryCreateTreeBuilderFromTree #endif -- 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 ENABLE_OVERLOADING 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 ENABLE_OVERLOADING 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.BranchEnumerator.BranchEnumerator) result' return result'' touchManagedPtr repository return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryEnumerateBranchesMethodInfo instance (signature ~ (Ggit.Enums.BranchType -> m (Maybe Ggit.BranchEnumerator.BranchEnumerator)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryEnumerateBranchesMethodInfo a signature where overloadedMethod _ = repositoryEnumerateBranches #endif -- 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 ENABLE_OVERLOADING data RepositoryFileStatusMethodInfo instance (signature ~ (b -> m [Ggit.Flags.StatusFlags]), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.MethodInfo RepositoryFileStatusMethodInfo a signature where overloadedMethod _ = repositoryFileStatus #endif -- 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 ENABLE_OVERLOADING data RepositoryFileStatusForeachMethodInfo instance (signature ~ (Maybe (Ggit.StatusOptions.StatusOptions) -> Ggit.Callbacks.StatusCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryFileStatusForeachMethodInfo a signature where overloadedMethod _ = repositoryFileStatusForeach #endif -- 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 ENABLE_OVERLOADING data RepositoryGetAheadBehindMethodInfo instance (signature ~ (Ggit.OId.OId -> Ggit.OId.OId -> m ((Word64, Word64))), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetAheadBehindMethodInfo a signature where overloadedMethod _ = repositoryGetAheadBehind #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- cstringToText result' return result'' touchManagedPtr repository freeMem path' freeMem name' return maybeResult ) (do freeMem path' freeMem name' ) #if ENABLE_OVERLOADING data RepositoryGetAttributeMethodInfo instance (signature ~ (T.Text -> T.Text -> [Ggit.Flags.AttributeCheckFlags] -> m (Maybe T.Text)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetAttributeMethodInfo a signature where overloadedMethod _ = repositoryGetAttribute #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Config.Config) result' return result'' touchManagedPtr repository return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryGetConfigMethodInfo instance (signature ~ (m (Maybe 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- cstringToText result' freeMem result' return result'' touchManagedPtr repository return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryGetDefaultNotesRefMethodInfo instance (signature ~ (m (Maybe 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 ENABLE_OVERLOADING data RepositoryGetDescendantOfMethodInfo instance (signature ~ (Ggit.OId.OId -> Ggit.OId.OId -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetDescendantOfMethodInfo a signature where overloadedMethod _ = repositoryGetDescendantOf #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Ref.Ref) result' return result'' touchManagedPtr repository return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryGetHeadMethodInfo instance (signature ~ (m (Maybe 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Index.Index) result' return result'' touchManagedPtr repository return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryGetIndexMethodInfo instance (signature ~ (m (Maybe 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Gio.File.File) result' return result'' touchManagedPtr repository return maybeResult #if ENABLE_OVERLOADING data RepositoryGetLocationMethodInfo instance (signature ~ (m (Maybe 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 CInt -> -- 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 ENABLE_OVERLOADING data RepositoryGetSubmoduleStatusMethodInfo instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleIgnore -> m [Ggit.Flags.SubmoduleStatus]), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetSubmoduleStatusMethodInfo a signature where overloadedMethod _ = repositoryGetSubmoduleStatus #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Gio.File.File) result' return result'' touchManagedPtr repository return maybeResult #if ENABLE_OVERLOADING data RepositoryGetWorkdirMethodInfo instance (signature ~ (m (Maybe 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 ENABLE_OVERLOADING 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 ENABLE_OVERLOADING 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 ENABLE_OVERLOADING 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 ENABLE_OVERLOADING 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 ENABLE_OVERLOADING 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 ENABLE_OVERLOADING 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 ENABLE_OVERLOADING data RepositoryListTagsMatchMethodInfo instance (signature ~ (Maybe (T.Text) -> m (Maybe [T.Text])), MonadIO m, IsRepository a) => O.MethodInfo RepositoryListTagsMatchMethodInfo a signature where overloadedMethod _ = repositoryListTagsMatch #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Object.Object) result' return result'' touchManagedPtr repository touchManagedPtr oid return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryLookupMethodInfo instance (signature ~ (Ggit.OId.OId -> GType -> m (Maybe Ggit.Object.Object)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupMethodInfo a signature where overloadedMethod _ = repositoryLookup #endif -- method Repository::lookup_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},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}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Blob"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_lookup_blob" ggit_repository_lookup_blob :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.OId.OId -> -- oid : TInterface (Name {namespace = "Ggit", name = "OId"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Blob.Blob) {- | Lookups a branch by its name in a repository. -} repositoryLookupBlob :: (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'. -} -> m (Maybe Ggit.Blob.Blob) {- ^ __Returns:__ a @/GgitBlog/@ pointer. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryLookupBlob repository oid = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository oid' <- unsafeManagedPtrGetPtr oid onException (do result <- propagateGError $ ggit_repository_lookup_blob repository' oid' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Blob.Blob) result' return result'' touchManagedPtr repository touchManagedPtr oid return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryLookupBlobMethodInfo instance (signature ~ (Ggit.OId.OId -> m (Maybe Ggit.Blob.Blob)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupBlobMethodInfo a signature where overloadedMethod _ = repositoryLookupBlob #endif -- 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 ENABLE_OVERLOADING data RepositoryLookupBranchMethodInfo instance (signature ~ (T.Text -> Ggit.Enums.BranchType -> m (Maybe Ggit.Branch.Branch)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupBranchMethodInfo a signature where overloadedMethod _ = repositoryLookupBranch #endif -- method Repository::lookup_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 = "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}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Commit"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_lookup_commit" ggit_repository_lookup_commit :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.OId.OId -> -- oid : TInterface (Name {namespace = "Ggit", name = "OId"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Commit.Commit) {- | Lookups a branch by its name in a repository. -} repositoryLookupCommit :: (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'. -} -> m (Maybe Ggit.Commit.Commit) {- ^ __Returns:__ a 'GI.Ggit.Objects.Commit.Commit' pointer. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryLookupCommit repository oid = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository oid' <- unsafeManagedPtrGetPtr oid onException (do result <- propagateGError $ ggit_repository_lookup_commit repository' oid' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Commit.Commit) result' return result'' touchManagedPtr repository touchManagedPtr oid return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryLookupCommitMethodInfo instance (signature ~ (Ggit.OId.OId -> m (Maybe Ggit.Commit.Commit)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupCommitMethodInfo a signature where overloadedMethod _ = repositoryLookupCommit #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Ref.Ref) result' return result'' touchManagedPtr repository freeMem name' return maybeResult ) (do freeMem name' ) #if ENABLE_OVERLOADING data RepositoryLookupReferenceMethodInfo instance (signature ~ (T.Text -> m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupReferenceMethodInfo a signature where overloadedMethod _ = repositoryLookupReference #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Ref.Ref) result' return result'' touchManagedPtr repository freeMem shortName' return maybeResult ) (do freeMem shortName' ) #if ENABLE_OVERLOADING data RepositoryLookupReferenceDwimMethodInfo instance (signature ~ (T.Text -> m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupReferenceDwimMethodInfo a signature where overloadedMethod _ = repositoryLookupReferenceDwim #endif -- 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 ENABLE_OVERLOADING data RepositoryLookupRemoteMethodInfo instance (signature ~ (T.Text -> m (Maybe Ggit.Remote.Remote)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupRemoteMethodInfo a signature where overloadedMethod _ = repositoryLookupRemote #endif -- 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 ENABLE_OVERLOADING data RepositoryLookupSubmoduleMethodInfo instance (signature ~ (T.Text -> m (Maybe Ggit.Submodule.Submodule)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupSubmoduleMethodInfo a signature where overloadedMethod _ = repositoryLookupSubmodule #endif -- method Repository::lookup_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 = "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}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Tag"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_lookup_tag" ggit_repository_lookup_tag :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.OId.OId -> -- oid : TInterface (Name {namespace = "Ggit", name = "OId"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Tag.Tag) {- | Lookups a branch by its name in a repository. -} repositoryLookupTag :: (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'. -} -> m (Maybe Ggit.Tag.Tag) {- ^ __Returns:__ a 'GI.Ggit.Objects.Tag.Tag' pointer. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryLookupTag repository oid = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository oid' <- unsafeManagedPtrGetPtr oid onException (do result <- propagateGError $ ggit_repository_lookup_tag repository' oid' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Tag.Tag) result' return result'' touchManagedPtr repository touchManagedPtr oid return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryLookupTagMethodInfo instance (signature ~ (Ggit.OId.OId -> m (Maybe Ggit.Tag.Tag)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupTagMethodInfo a signature where overloadedMethod _ = repositoryLookupTag #endif -- method Repository::lookup_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 = "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}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Ggit", name = "Tree"})) -- throws : True -- Skip return : False foreign import ccall "ggit_repository_lookup_tree" ggit_repository_lookup_tree :: Ptr Repository -> -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"}) Ptr Ggit.OId.OId -> -- oid : TInterface (Name {namespace = "Ggit", name = "OId"}) Ptr (Ptr GError) -> -- error IO (Ptr Ggit.Tree.Tree) {- | Lookups a branch by its name in a repository. -} repositoryLookupTree :: (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'. -} -> m (Maybe Ggit.Tree.Tree) {- ^ __Returns:__ a 'GI.Ggit.Objects.Tree.Tree' pointer. /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryLookupTree repository oid = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository oid' <- unsafeManagedPtrGetPtr oid onException (do result <- propagateGError $ ggit_repository_lookup_tree repository' oid' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Tree.Tree) result' return result'' touchManagedPtr repository touchManagedPtr oid return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryLookupTreeMethodInfo instance (signature ~ (Ggit.OId.OId -> m (Maybe Ggit.Tree.Tree)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLookupTreeMethodInfo a signature where overloadedMethod _ = repositoryLookupTree #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Index.Index) result' return result'' touchManagedPtr repository touchManagedPtr ourCommit touchManagedPtr theirCommit touchManagedPtr mergeOptions return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryMergeCommitsMethodInfo instance (signature ~ (b -> c -> Ggit.MergeOptions.MergeOptions -> m (Maybe Ggit.Index.Index)), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.Commit.IsCommit c) => O.MethodInfo RepositoryMergeCommitsMethodInfo a signature where overloadedMethod _ = repositoryMergeCommits #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Index.Index) result' return result'' touchManagedPtr repository touchManagedPtr ancestorTree touchManagedPtr ourTree touchManagedPtr theirTree touchManagedPtr mergeOptions return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryMergeTreesMethodInfo instance (signature ~ (b -> c -> d -> Ggit.MergeOptions.MergeOptions -> m (Maybe Ggit.Index.Index)), MonadIO m, IsRepository a, Ggit.Tree.IsTree b, Ggit.Tree.IsTree c, Ggit.Tree.IsTree d) => O.MethodInfo RepositoryMergeTreesMethodInfo a signature where overloadedMethod _ = repositoryMergeTrees #endif -- 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 ENABLE_OVERLOADING data RepositoryNoteForeachMethodInfo instance (signature ~ (Maybe (T.Text) -> Ggit.Callbacks.NoteCallback -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositoryNoteForeachMethodInfo a signature where overloadedMethod _ = repositoryNoteForeach #endif -- 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 ENABLE_OVERLOADING 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.Note.Note) result' return result'' touchManagedPtr repository touchManagedPtr id freeMem maybeNotesRef return maybeResult ) (do freeMem maybeNotesRef ) #if ENABLE_OVERLOADING data RepositoryReadNoteMethodInfo instance (signature ~ (Maybe (T.Text) -> Ggit.OId.OId -> m (Maybe Ggit.Note.Note)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryReadNoteMethodInfo a signature where overloadedMethod _ = repositoryReadNote #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Rebase.Rebase) result' return result'' touchManagedPtr repository whenJust branch touchManagedPtr whenJust upstream touchManagedPtr whenJust onto touchManagedPtr touchManagedPtr options return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryRebaseInitMethodInfo instance (signature ~ (Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) -> Ggit.RebaseOptions.RebaseOptions -> m (Maybe Ggit.Rebase.Rebase)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRebaseInitMethodInfo a signature where overloadedMethod _ = repositoryRebaseInit #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Rebase.Rebase) result' return result'' touchManagedPtr repository touchManagedPtr options return maybeResult ) (do return () ) #if ENABLE_OVERLOADING data RepositoryRebaseOpenMethodInfo instance (signature ~ (Ggit.RebaseOptions.RebaseOptions -> m (Maybe Ggit.Rebase.Rebase)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRebaseOpenMethodInfo a signature where overloadedMethod _ = repositoryRebaseOpen #endif -- 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 ENABLE_OVERLOADING 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 ENABLE_OVERLOADING 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 ENABLE_OVERLOADING data RepositoryRemoveNoteMethodInfo instance (signature ~ (Maybe (T.Text) -> b -> c -> Ggit.OId.OId -> m ()), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => O.MethodInfo RepositoryRemoveNoteMethodInfo a signature where overloadedMethod _ = repositoryRemoveNote #endif -- 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 ENABLE_OVERLOADING data RepositoryResetMethodInfo instance (signature ~ (b -> Ggit.Enums.ResetType -> c -> m ()), MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.CheckoutOptions.IsCheckoutOptions c) => O.MethodInfo RepositoryResetMethodInfo a signature where overloadedMethod _ = repositoryReset #endif -- 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 ENABLE_OVERLOADING data RepositoryResetDefaultMethodInfo instance (signature ~ (Maybe (b) -> [T.Text] -> m ()), MonadIO m, IsRepository a, Ggit.Object.IsObject b) => O.MethodInfo RepositoryResetDefaultMethodInfo a signature where overloadedMethod _ = repositoryResetDefault #endif -- 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 ENABLE_OVERLOADING data RepositoryRevertMethodInfo instance (signature ~ (b -> Ggit.RevertOptions.RevertOptions -> m ()), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b) => O.MethodInfo RepositoryRevertMethodInfo a signature where overloadedMethod _ = repositoryRevert #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Ggit.Object.Object) result' return result'' touchManagedPtr repository freeMem spec' return maybeResult ) (do freeMem spec' ) #if ENABLE_OVERLOADING data RepositoryRevparseMethodInfo instance (signature ~ (T.Text -> m (Maybe Ggit.Object.Object)), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRevparseMethodInfo a signature where overloadedMethod _ = repositoryRevparse #endif -- 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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Ggit.OId.OId) result' return result'' touchManagedPtr repository touchManagedPtr stasher freeMem message' return maybeResult ) (do freeMem message' ) #if ENABLE_OVERLOADING data RepositorySaveStashMethodInfo instance (signature ~ (b -> T.Text -> [Ggit.Flags.StashFlags] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b) => O.MethodInfo RepositorySaveStashMethodInfo a signature where overloadedMethod _ = repositorySaveStash #endif -- 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 ENABLE_OVERLOADING 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 ENABLE_OVERLOADING data RepositorySetSubmoduleFetchRecurseMethodInfo instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleRecurse -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetSubmoduleFetchRecurseMethodInfo a signature where overloadedMethod _ = repositorySetSubmoduleFetchRecurse #endif -- 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 CInt -> -- 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 ENABLE_OVERLOADING data RepositorySetSubmoduleIgnoreMethodInfo instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleIgnore -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetSubmoduleIgnoreMethodInfo a signature where overloadedMethod _ = repositorySetSubmoduleIgnore #endif -- 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 ENABLE_OVERLOADING data RepositorySetSubmoduleUpdateMethodInfo instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleUpdate -> m ()), MonadIO m, IsRepository a) => O.MethodInfo RepositorySetSubmoduleUpdateMethodInfo a signature where overloadedMethod _ = repositorySetSubmoduleUpdate #endif -- 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 ENABLE_OVERLOADING 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 ENABLE_OVERLOADING data RepositorySetWorkdirMethodInfo instance (signature ~ (b -> Bool -> m ()), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.MethodInfo RepositorySetWorkdirMethodInfo a signature where overloadedMethod _ = repositorySetWorkdir #endif -- 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 ENABLE_OVERLOADING 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 ENABLE_OVERLOADING 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 ENABLE_OVERLOADING 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 (Maybe 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 maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Repository) result' return result'' touchManagedPtr location whenJust options touchManagedPtr freeMem url' return maybeResult ) (do freeMem url' ) #if ENABLE_OVERLOADING #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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Gio.File.File) result' return result'' touchManagedPtr location return maybeResult ) (do return () ) #if ENABLE_OVERLOADING #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 (Maybe 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 maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Gio.File.File) result' return result'' touchManagedPtr location mapZeroTerminatedCArray freeMem maybeCeilingDirs freeMem maybeCeilingDirs return maybeResult ) (do mapZeroTerminatedCArray freeMem maybeCeilingDirs freeMem maybeCeilingDirs ) #if ENABLE_OVERLOADING #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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Repository) result' return result'' touchManagedPtr location return maybeResult ) (do return () ) #if ENABLE_OVERLOADING #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 (Maybe 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' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Repository) result' return result'' touchManagedPtr location return maybeResult ) (do return () ) #if ENABLE_OVERLOADING #endif