{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Represents an existing git repository including all of it\'s
-- object contents.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Ggit.Objects.Repository
    ( 

-- * Exported types
    Repository(..)                          ,
    IsRepository                            ,
    toRepository                            ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [addRemoteFetch]("GI.Ggit.Objects.Repository#g:method:addRemoteFetch"), [addRemotePush]("GI.Ggit.Objects.Repository#g:method:addRemotePush"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [blameFile]("GI.Ggit.Objects.Repository#g:method:blameFile"), [checkoutHead]("GI.Ggit.Objects.Repository#g:method:checkoutHead"), [checkoutIndex]("GI.Ggit.Objects.Repository#g:method:checkoutIndex"), [checkoutTree]("GI.Ggit.Objects.Repository#g:method:checkoutTree"), [cherryPick]("GI.Ggit.Objects.Repository#g:method:cherryPick"), [cherryPickCommit]("GI.Ggit.Objects.Repository#g:method:cherryPickCommit"), [createBlob]("GI.Ggit.Objects.Repository#g:method:createBlob"), [createBlobFromBuffer]("GI.Ggit.Objects.Repository#g:method:createBlobFromBuffer"), [createBlobFromFile]("GI.Ggit.Objects.Repository#g:method:createBlobFromFile"), [createBlobFromPath]("GI.Ggit.Objects.Repository#g:method:createBlobFromPath"), [createBranch]("GI.Ggit.Objects.Repository#g:method:createBranch"), [createCommit]("GI.Ggit.Objects.Repository#g:method:createCommit"), [createCommitFromIds]("GI.Ggit.Objects.Repository#g:method:createCommitFromIds"), [createIndexEntryForFile]("GI.Ggit.Objects.Repository#g:method:createIndexEntryForFile"), [createIndexEntryForPath]("GI.Ggit.Objects.Repository#g:method:createIndexEntryForPath"), [createNote]("GI.Ggit.Objects.Repository#g:method:createNote"), [createReference]("GI.Ggit.Objects.Repository#g:method:createReference"), [createRemote]("GI.Ggit.Objects.Repository#g:method:createRemote"), [createSymbolicReference]("GI.Ggit.Objects.Repository#g:method:createSymbolicReference"), [createTag]("GI.Ggit.Objects.Repository#g:method:createTag"), [createTagAnnotation]("GI.Ggit.Objects.Repository#g:method:createTagAnnotation"), [createTagFromBuffer]("GI.Ggit.Objects.Repository#g:method:createTagFromBuffer"), [createTagLightweight]("GI.Ggit.Objects.Repository#g:method:createTagLightweight"), [createTreeBuilder]("GI.Ggit.Objects.Repository#g:method:createTreeBuilder"), [createTreeBuilderFromTree]("GI.Ggit.Objects.Repository#g:method:createTreeBuilderFromTree"), [deleteTag]("GI.Ggit.Objects.Repository#g:method:deleteTag"), [dropStash]("GI.Ggit.Objects.Repository#g:method:dropStash"), [enumerateBranches]("GI.Ggit.Objects.Repository#g:method:enumerateBranches"), [fileStatus]("GI.Ggit.Objects.Repository#g:method:fileStatus"), [fileStatusForeach]("GI.Ggit.Objects.Repository#g:method:fileStatusForeach"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [init]("GI.Gio.Interfaces.Initable#g:method:init"), [isBare]("GI.Ggit.Objects.Repository#g:method:isBare"), [isEmpty]("GI.Ggit.Objects.Repository#g:method:isEmpty"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isHeadDetached]("GI.Ggit.Objects.Repository#g:method:isHeadDetached"), [isHeadUnborn]("GI.Ggit.Objects.Repository#g:method:isHeadUnborn"), [listRemotes]("GI.Ggit.Objects.Repository#g:method:listRemotes"), [listTags]("GI.Ggit.Objects.Repository#g:method:listTags"), [listTagsMatch]("GI.Ggit.Objects.Repository#g:method:listTagsMatch"), [lookup]("GI.Ggit.Objects.Repository#g:method:lookup"), [lookupBlob]("GI.Ggit.Objects.Repository#g:method:lookupBlob"), [lookupBranch]("GI.Ggit.Objects.Repository#g:method:lookupBranch"), [lookupCommit]("GI.Ggit.Objects.Repository#g:method:lookupCommit"), [lookupReference]("GI.Ggit.Objects.Repository#g:method:lookupReference"), [lookupReferenceDwim]("GI.Ggit.Objects.Repository#g:method:lookupReferenceDwim"), [lookupRemote]("GI.Ggit.Objects.Repository#g:method:lookupRemote"), [lookupSubmodule]("GI.Ggit.Objects.Repository#g:method:lookupSubmodule"), [lookupTag]("GI.Ggit.Objects.Repository#g:method:lookupTag"), [lookupTree]("GI.Ggit.Objects.Repository#g:method:lookupTree"), [merge]("GI.Ggit.Objects.Repository#g:method:merge"), [mergeBase]("GI.Ggit.Objects.Repository#g:method:mergeBase"), [mergeCommits]("GI.Ggit.Objects.Repository#g:method:mergeCommits"), [mergeTrees]("GI.Ggit.Objects.Repository#g:method:mergeTrees"), [noteForeach]("GI.Ggit.Objects.Repository#g:method:noteForeach"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [pathIsIgnored]("GI.Ggit.Objects.Repository#g:method:pathIsIgnored"), [readNote]("GI.Ggit.Objects.Repository#g:method:readNote"), [rebaseInit]("GI.Ggit.Objects.Repository#g:method:rebaseInit"), [rebaseOpen]("GI.Ggit.Objects.Repository#g:method:rebaseOpen"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [referencesForeach]("GI.Ggit.Objects.Repository#g:method:referencesForeach"), [referencesForeachName]("GI.Ggit.Objects.Repository#g:method:referencesForeachName"), [removeNote]("GI.Ggit.Objects.Repository#g:method:removeNote"), [removeRemote]("GI.Ggit.Objects.Repository#g:method:removeRemote"), [renameRemote]("GI.Ggit.Objects.Repository#g:method:renameRemote"), [reset]("GI.Ggit.Objects.Repository#g:method:reset"), [resetDefault]("GI.Ggit.Objects.Repository#g:method:resetDefault"), [revert]("GI.Ggit.Objects.Repository#g:method:revert"), [revparse]("GI.Ggit.Objects.Repository#g:method:revparse"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [saveStash]("GI.Ggit.Objects.Repository#g:method:saveStash"), [stashForeach]("GI.Ggit.Objects.Repository#g:method:stashForeach"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [submoduleForeach]("GI.Ggit.Objects.Repository#g:method:submoduleForeach"), [tagForeach]("GI.Ggit.Objects.Repository#g:method:tagForeach"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getAheadBehind]("GI.Ggit.Objects.Repository#g:method:getAheadBehind"), [getAttribute]("GI.Ggit.Objects.Repository#g:method:getAttribute"), [getConfig]("GI.Ggit.Objects.Repository#g:method:getConfig"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDefaultNotesRef]("GI.Ggit.Objects.Repository#g:method:getDefaultNotesRef"), [getDescendantOf]("GI.Ggit.Objects.Repository#g:method:getDescendantOf"), [getHead]("GI.Ggit.Objects.Repository#g:method:getHead"), [getIndex]("GI.Ggit.Objects.Repository#g:method:getIndex"), [getLocation]("GI.Ggit.Objects.Repository#g:method:getLocation"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getSubmoduleStatus]("GI.Ggit.Objects.Repository#g:method:getSubmoduleStatus"), [getWorkdir]("GI.Ggit.Objects.Repository#g:method:getWorkdir").
-- 
-- ==== Setters
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setHead]("GI.Ggit.Objects.Repository#g:method:setHead"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setRemoteUrl]("GI.Ggit.Objects.Repository#g:method:setRemoteUrl"), [setSubmoduleFetchRecurse]("GI.Ggit.Objects.Repository#g:method:setSubmoduleFetchRecurse"), [setSubmoduleIgnore]("GI.Ggit.Objects.Repository#g:method:setSubmoduleIgnore"), [setSubmoduleUpdate]("GI.Ggit.Objects.Repository#g:method:setSubmoduleUpdate"), [setSubmoduleUrl]("GI.Ggit.Objects.Repository#g:method:setSubmoduleUrl"), [setWorkdir]("GI.Ggit.Objects.Repository#g:method:setWorkdir").

#if defined(ENABLE_OVERLOADING)
    ResolveRepositoryMethod                 ,
#endif

-- ** addRemoteFetch #method:addRemoteFetch#

#if defined(ENABLE_OVERLOADING)
    RepositoryAddRemoteFetchMethodInfo      ,
#endif
    repositoryAddRemoteFetch                ,


-- ** addRemotePush #method:addRemotePush#

#if defined(ENABLE_OVERLOADING)
    RepositoryAddRemotePushMethodInfo       ,
#endif
    repositoryAddRemotePush                 ,


-- ** blameFile #method:blameFile#

#if defined(ENABLE_OVERLOADING)
    RepositoryBlameFileMethodInfo           ,
#endif
    repositoryBlameFile                     ,


-- ** checkoutHead #method:checkoutHead#

#if defined(ENABLE_OVERLOADING)
    RepositoryCheckoutHeadMethodInfo        ,
#endif
    repositoryCheckoutHead                  ,


-- ** checkoutIndex #method:checkoutIndex#

#if defined(ENABLE_OVERLOADING)
    RepositoryCheckoutIndexMethodInfo       ,
#endif
    repositoryCheckoutIndex                 ,


-- ** checkoutTree #method:checkoutTree#

#if defined(ENABLE_OVERLOADING)
    RepositoryCheckoutTreeMethodInfo        ,
#endif
    repositoryCheckoutTree                  ,


-- ** cherryPick #method:cherryPick#

#if defined(ENABLE_OVERLOADING)
    RepositoryCherryPickMethodInfo          ,
#endif
    repositoryCherryPick                    ,


-- ** cherryPickCommit #method:cherryPickCommit#

#if defined(ENABLE_OVERLOADING)
    RepositoryCherryPickCommitMethodInfo    ,
#endif
    repositoryCherryPickCommit              ,


-- ** clone #method:clone#

    repositoryClone                         ,


-- ** createBlob #method:createBlob#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateBlobMethodInfo          ,
#endif
    repositoryCreateBlob                    ,


-- ** createBlobFromBuffer #method:createBlobFromBuffer#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateBlobFromBufferMethodInfo,
#endif
    repositoryCreateBlobFromBuffer          ,


-- ** createBlobFromFile #method:createBlobFromFile#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateBlobFromFileMethodInfo  ,
#endif
    repositoryCreateBlobFromFile            ,


-- ** createBlobFromPath #method:createBlobFromPath#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateBlobFromPathMethodInfo  ,
#endif
    repositoryCreateBlobFromPath            ,


-- ** createBranch #method:createBranch#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateBranchMethodInfo        ,
#endif
    repositoryCreateBranch                  ,


-- ** createCommit #method:createCommit#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateCommitMethodInfo        ,
#endif
    repositoryCreateCommit                  ,


-- ** createCommitFromIds #method:createCommitFromIds#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateCommitFromIdsMethodInfo ,
#endif
    repositoryCreateCommitFromIds           ,


-- ** createIndexEntryForFile #method:createIndexEntryForFile#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateIndexEntryForFileMethodInfo,
#endif
    repositoryCreateIndexEntryForFile       ,


-- ** createIndexEntryForPath #method:createIndexEntryForPath#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateIndexEntryForPathMethodInfo,
#endif
    repositoryCreateIndexEntryForPath       ,


-- ** createNote #method:createNote#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateNoteMethodInfo          ,
#endif
    repositoryCreateNote                    ,


-- ** createReference #method:createReference#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateReferenceMethodInfo     ,
#endif
    repositoryCreateReference               ,


-- ** createRemote #method:createRemote#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateRemoteMethodInfo        ,
#endif
    repositoryCreateRemote                  ,


-- ** createSymbolicReference #method:createSymbolicReference#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateSymbolicReferenceMethodInfo,
#endif
    repositoryCreateSymbolicReference       ,


-- ** createTag #method:createTag#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateTagMethodInfo           ,
#endif
    repositoryCreateTag                     ,


-- ** createTagAnnotation #method:createTagAnnotation#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateTagAnnotationMethodInfo ,
#endif
    repositoryCreateTagAnnotation           ,


-- ** createTagFromBuffer #method:createTagFromBuffer#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateTagFromBufferMethodInfo ,
#endif
    repositoryCreateTagFromBuffer           ,


-- ** createTagLightweight #method:createTagLightweight#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateTagLightweightMethodInfo,
#endif
    repositoryCreateTagLightweight          ,


-- ** createTreeBuilder #method:createTreeBuilder#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateTreeBuilderMethodInfo   ,
#endif
    repositoryCreateTreeBuilder             ,


-- ** createTreeBuilderFromTree #method:createTreeBuilderFromTree#

#if defined(ENABLE_OVERLOADING)
    RepositoryCreateTreeBuilderFromTreeMethodInfo,
#endif
    repositoryCreateTreeBuilderFromTree     ,


-- ** deleteTag #method:deleteTag#

#if defined(ENABLE_OVERLOADING)
    RepositoryDeleteTagMethodInfo           ,
#endif
    repositoryDeleteTag                     ,


-- ** discover #method:discover#

    repositoryDiscover                      ,


-- ** discoverFull #method:discoverFull#

    repositoryDiscoverFull                  ,


-- ** dropStash #method:dropStash#

#if defined(ENABLE_OVERLOADING)
    RepositoryDropStashMethodInfo           ,
#endif
    repositoryDropStash                     ,


-- ** enumerateBranches #method:enumerateBranches#

#if defined(ENABLE_OVERLOADING)
    RepositoryEnumerateBranchesMethodInfo   ,
#endif
    repositoryEnumerateBranches             ,


-- ** fileStatus #method:fileStatus#

#if defined(ENABLE_OVERLOADING)
    RepositoryFileStatusMethodInfo          ,
#endif
    repositoryFileStatus                    ,


-- ** fileStatusForeach #method:fileStatusForeach#

#if defined(ENABLE_OVERLOADING)
    RepositoryFileStatusForeachMethodInfo   ,
#endif
    repositoryFileStatusForeach             ,


-- ** getAheadBehind #method:getAheadBehind#

#if defined(ENABLE_OVERLOADING)
    RepositoryGetAheadBehindMethodInfo      ,
#endif
    repositoryGetAheadBehind                ,


-- ** getAttribute #method:getAttribute#

#if defined(ENABLE_OVERLOADING)
    RepositoryGetAttributeMethodInfo        ,
#endif
    repositoryGetAttribute                  ,


-- ** getConfig #method:getConfig#

#if defined(ENABLE_OVERLOADING)
    RepositoryGetConfigMethodInfo           ,
#endif
    repositoryGetConfig                     ,


-- ** getDefaultNotesRef #method:getDefaultNotesRef#

#if defined(ENABLE_OVERLOADING)
    RepositoryGetDefaultNotesRefMethodInfo  ,
#endif
    repositoryGetDefaultNotesRef            ,


-- ** getDescendantOf #method:getDescendantOf#

#if defined(ENABLE_OVERLOADING)
    RepositoryGetDescendantOfMethodInfo     ,
#endif
    repositoryGetDescendantOf               ,


-- ** getHead #method:getHead#

#if defined(ENABLE_OVERLOADING)
    RepositoryGetHeadMethodInfo             ,
#endif
    repositoryGetHead                       ,


-- ** getIndex #method:getIndex#

#if defined(ENABLE_OVERLOADING)
    RepositoryGetIndexMethodInfo            ,
#endif
    repositoryGetIndex                      ,


-- ** getLocation #method:getLocation#

#if defined(ENABLE_OVERLOADING)
    RepositoryGetLocationMethodInfo         ,
#endif
    repositoryGetLocation                   ,


-- ** getSubmoduleStatus #method:getSubmoduleStatus#

#if defined(ENABLE_OVERLOADING)
    RepositoryGetSubmoduleStatusMethodInfo  ,
#endif
    repositoryGetSubmoduleStatus            ,


-- ** getWorkdir #method:getWorkdir#

#if defined(ENABLE_OVERLOADING)
    RepositoryGetWorkdirMethodInfo          ,
#endif
    repositoryGetWorkdir                    ,


-- ** initRepository #method:initRepository#

    repositoryInitRepository                ,


-- ** isBare #method:isBare#

#if defined(ENABLE_OVERLOADING)
    RepositoryIsBareMethodInfo              ,
#endif
    repositoryIsBare                        ,


-- ** isEmpty #method:isEmpty#

#if defined(ENABLE_OVERLOADING)
    RepositoryIsEmptyMethodInfo             ,
#endif
    repositoryIsEmpty                       ,


-- ** isHeadDetached #method:isHeadDetached#

#if defined(ENABLE_OVERLOADING)
    RepositoryIsHeadDetachedMethodInfo      ,
#endif
    repositoryIsHeadDetached                ,


-- ** isHeadUnborn #method:isHeadUnborn#

#if defined(ENABLE_OVERLOADING)
    RepositoryIsHeadUnbornMethodInfo        ,
#endif
    repositoryIsHeadUnborn                  ,


-- ** listRemotes #method:listRemotes#

#if defined(ENABLE_OVERLOADING)
    RepositoryListRemotesMethodInfo         ,
#endif
    repositoryListRemotes                   ,


-- ** listTags #method:listTags#

#if defined(ENABLE_OVERLOADING)
    RepositoryListTagsMethodInfo            ,
#endif
    repositoryListTags                      ,


-- ** listTagsMatch #method:listTagsMatch#

#if defined(ENABLE_OVERLOADING)
    RepositoryListTagsMatchMethodInfo       ,
#endif
    repositoryListTagsMatch                 ,


-- ** lookup #method:lookup#

#if defined(ENABLE_OVERLOADING)
    RepositoryLookupMethodInfo              ,
#endif
    repositoryLookup                        ,


-- ** lookupBlob #method:lookupBlob#

#if defined(ENABLE_OVERLOADING)
    RepositoryLookupBlobMethodInfo          ,
#endif
    repositoryLookupBlob                    ,


-- ** lookupBranch #method:lookupBranch#

#if defined(ENABLE_OVERLOADING)
    RepositoryLookupBranchMethodInfo        ,
#endif
    repositoryLookupBranch                  ,


-- ** lookupCommit #method:lookupCommit#

#if defined(ENABLE_OVERLOADING)
    RepositoryLookupCommitMethodInfo        ,
#endif
    repositoryLookupCommit                  ,


-- ** lookupReference #method:lookupReference#

#if defined(ENABLE_OVERLOADING)
    RepositoryLookupReferenceMethodInfo     ,
#endif
    repositoryLookupReference               ,


-- ** lookupReferenceDwim #method:lookupReferenceDwim#

#if defined(ENABLE_OVERLOADING)
    RepositoryLookupReferenceDwimMethodInfo ,
#endif
    repositoryLookupReferenceDwim           ,


-- ** lookupRemote #method:lookupRemote#

#if defined(ENABLE_OVERLOADING)
    RepositoryLookupRemoteMethodInfo        ,
#endif
    repositoryLookupRemote                  ,


-- ** lookupSubmodule #method:lookupSubmodule#

#if defined(ENABLE_OVERLOADING)
    RepositoryLookupSubmoduleMethodInfo     ,
#endif
    repositoryLookupSubmodule               ,


-- ** lookupTag #method:lookupTag#

#if defined(ENABLE_OVERLOADING)
    RepositoryLookupTagMethodInfo           ,
#endif
    repositoryLookupTag                     ,


-- ** lookupTree #method:lookupTree#

#if defined(ENABLE_OVERLOADING)
    RepositoryLookupTreeMethodInfo          ,
#endif
    repositoryLookupTree                    ,


-- ** merge #method:merge#

#if defined(ENABLE_OVERLOADING)
    RepositoryMergeMethodInfo               ,
#endif
    repositoryMerge                         ,


-- ** mergeBase #method:mergeBase#

#if defined(ENABLE_OVERLOADING)
    RepositoryMergeBaseMethodInfo           ,
#endif
    repositoryMergeBase                     ,


-- ** mergeCommits #method:mergeCommits#

#if defined(ENABLE_OVERLOADING)
    RepositoryMergeCommitsMethodInfo        ,
#endif
    repositoryMergeCommits                  ,


-- ** mergeTrees #method:mergeTrees#

#if defined(ENABLE_OVERLOADING)
    RepositoryMergeTreesMethodInfo          ,
#endif
    repositoryMergeTrees                    ,


-- ** noteForeach #method:noteForeach#

#if defined(ENABLE_OVERLOADING)
    RepositoryNoteForeachMethodInfo         ,
#endif
    repositoryNoteForeach                   ,


-- ** open #method:open#

    repositoryOpen                          ,


-- ** pathIsIgnored #method:pathIsIgnored#

#if defined(ENABLE_OVERLOADING)
    RepositoryPathIsIgnoredMethodInfo       ,
#endif
    repositoryPathIsIgnored                 ,


-- ** readNote #method:readNote#

#if defined(ENABLE_OVERLOADING)
    RepositoryReadNoteMethodInfo            ,
#endif
    repositoryReadNote                      ,


-- ** rebaseInit #method:rebaseInit#

#if defined(ENABLE_OVERLOADING)
    RepositoryRebaseInitMethodInfo          ,
#endif
    repositoryRebaseInit                    ,


-- ** rebaseOpen #method:rebaseOpen#

#if defined(ENABLE_OVERLOADING)
    RepositoryRebaseOpenMethodInfo          ,
#endif
    repositoryRebaseOpen                    ,


-- ** referencesForeach #method:referencesForeach#

#if defined(ENABLE_OVERLOADING)
    RepositoryReferencesForeachMethodInfo   ,
#endif
    repositoryReferencesForeach             ,


-- ** referencesForeachName #method:referencesForeachName#

#if defined(ENABLE_OVERLOADING)
    RepositoryReferencesForeachNameMethodInfo,
#endif
    repositoryReferencesForeachName         ,


-- ** removeNote #method:removeNote#

#if defined(ENABLE_OVERLOADING)
    RepositoryRemoveNoteMethodInfo          ,
#endif
    repositoryRemoveNote                    ,


-- ** removeRemote #method:removeRemote#

#if defined(ENABLE_OVERLOADING)
    RepositoryRemoveRemoteMethodInfo        ,
#endif
    repositoryRemoveRemote                  ,


-- ** renameRemote #method:renameRemote#

#if defined(ENABLE_OVERLOADING)
    RepositoryRenameRemoteMethodInfo        ,
#endif
    repositoryRenameRemote                  ,


-- ** reset #method:reset#

#if defined(ENABLE_OVERLOADING)
    RepositoryResetMethodInfo               ,
#endif
    repositoryReset                         ,


-- ** resetDefault #method:resetDefault#

#if defined(ENABLE_OVERLOADING)
    RepositoryResetDefaultMethodInfo        ,
#endif
    repositoryResetDefault                  ,


-- ** revert #method:revert#

#if defined(ENABLE_OVERLOADING)
    RepositoryRevertMethodInfo              ,
#endif
    repositoryRevert                        ,


-- ** revparse #method:revparse#

#if defined(ENABLE_OVERLOADING)
    RepositoryRevparseMethodInfo            ,
#endif
    repositoryRevparse                      ,


-- ** saveStash #method:saveStash#

#if defined(ENABLE_OVERLOADING)
    RepositorySaveStashMethodInfo           ,
#endif
    repositorySaveStash                     ,


-- ** setHead #method:setHead#

#if defined(ENABLE_OVERLOADING)
    RepositorySetHeadMethodInfo             ,
#endif
    repositorySetHead                       ,


-- ** setRemoteUrl #method:setRemoteUrl#

#if defined(ENABLE_OVERLOADING)
    RepositorySetRemoteUrlMethodInfo        ,
#endif
    repositorySetRemoteUrl                  ,


-- ** setSubmoduleFetchRecurse #method:setSubmoduleFetchRecurse#

#if defined(ENABLE_OVERLOADING)
    RepositorySetSubmoduleFetchRecurseMethodInfo,
#endif
    repositorySetSubmoduleFetchRecurse      ,


-- ** setSubmoduleIgnore #method:setSubmoduleIgnore#

#if defined(ENABLE_OVERLOADING)
    RepositorySetSubmoduleIgnoreMethodInfo  ,
#endif
    repositorySetSubmoduleIgnore            ,


-- ** setSubmoduleUpdate #method:setSubmoduleUpdate#

#if defined(ENABLE_OVERLOADING)
    RepositorySetSubmoduleUpdateMethodInfo  ,
#endif
    repositorySetSubmoduleUpdate            ,


-- ** setSubmoduleUrl #method:setSubmoduleUrl#

#if defined(ENABLE_OVERLOADING)
    RepositorySetSubmoduleUrlMethodInfo     ,
#endif
    repositorySetSubmoduleUrl               ,


-- ** setWorkdir #method:setWorkdir#

#if defined(ENABLE_OVERLOADING)
    RepositorySetWorkdirMethodInfo          ,
#endif
    repositorySetWorkdir                    ,


-- ** stashForeach #method:stashForeach#

#if defined(ENABLE_OVERLOADING)
    RepositoryStashForeachMethodInfo        ,
#endif
    repositoryStashForeach                  ,


-- ** submoduleForeach #method:submoduleForeach#

#if defined(ENABLE_OVERLOADING)
    RepositorySubmoduleForeachMethodInfo    ,
#endif
    repositorySubmoduleForeach              ,


-- ** tagForeach #method:tagForeach#

#if defined(ENABLE_OVERLOADING)
    RepositoryTagForeachMethodInfo          ,
#endif
    repositoryTagForeach                    ,




 -- * Properties


-- ** cloneOptions #attr:cloneOptions#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    RepositoryCloneOptionsPropertyInfo      ,
#endif
    constructRepositoryCloneOptions         ,
    getRepositoryCloneOptions               ,
#if defined(ENABLE_OVERLOADING)
    repositoryCloneOptions                  ,
#endif


-- ** head #attr:head#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    RepositoryHeadPropertyInfo              ,
#endif
    getRepositoryHead                       ,
#if defined(ENABLE_OVERLOADING)
    repositoryHead                          ,
#endif


-- ** init #attr:init#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    RepositoryInitPropertyInfo              ,
#endif
    constructRepositoryInit                 ,
    getRepositoryInit                       ,
#if defined(ENABLE_OVERLOADING)
    repositoryInit                          ,
#endif


-- ** isBare #attr:isBare#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    RepositoryIsBarePropertyInfo            ,
#endif
    constructRepositoryIsBare               ,
    getRepositoryIsBare                     ,


-- ** location #attr:location#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    RepositoryLocationPropertyInfo          ,
#endif
    constructRepositoryLocation             ,
    getRepositoryLocation                   ,
#if defined(ENABLE_OVERLOADING)
    repositoryLocation                      ,
#endif


-- ** url #attr:url#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    RepositoryUrlPropertyInfo               ,
#endif
    constructRepositoryUrl                  ,
    getRepositoryUrl                        ,
#if defined(ENABLE_OVERLOADING)
    repositoryUrl                           ,
#endif


-- ** workdir #attr:workdir#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    RepositoryWorkdirPropertyInfo           ,
#endif
    clearRepositoryWorkdir                  ,
    constructRepositoryWorkdir              ,
    getRepositoryWorkdir                    ,
#if defined(ENABLE_OVERLOADING)
    repositoryWorkdir                       ,
#endif
    setRepositoryWorkdir                    ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
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 GHC.Records as R

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 (SP.ManagedPtr Repository)
    deriving (Repository -> Repository -> Bool
(Repository -> Repository -> Bool)
-> (Repository -> Repository -> Bool) -> Eq Repository
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Repository -> Repository -> Bool
$c/= :: Repository -> Repository -> Bool
== :: Repository -> Repository -> Bool
$c== :: Repository -> Repository -> Bool
Eq)

instance SP.ManagedPtrNewtype Repository where
    toManagedPtr :: Repository -> ManagedPtr Repository
toManagedPtr (Repository ManagedPtr Repository
p) = ManagedPtr Repository
p

foreign import ccall "ggit_repository_get_type"
    c_ggit_repository_get_type :: IO B.Types.GType

instance B.Types.TypedObject Repository where
    glibType :: IO GType
glibType = IO GType
c_ggit_repository_get_type

instance B.Types.GObject Repository

-- | Type class for types which can be safely cast to `Repository`, for instance with `toRepository`.
class (SP.GObject o, O.IsDescendantOf Repository o) => IsRepository o
instance (SP.GObject o, O.IsDescendantOf Repository o) => IsRepository o

instance O.HasParentTypes Repository
type instance O.ParentTypes Repository = '[Ggit.Native.Native, Ggit.ObjectFactoryBase.ObjectFactoryBase, GObject.Object.Object, Gio.Initable.Initable]

-- | Cast to `Repository`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toRepository :: (MIO.MonadIO m, IsRepository o) => o -> m Repository
toRepository :: forall (m :: * -> *) o.
(MonadIO m, IsRepository o) =>
o -> m Repository
toRepository = IO Repository -> m Repository
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Repository -> m Repository)
-> (o -> IO Repository) -> o -> m Repository
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Repository -> Repository) -> o -> IO Repository
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Repository -> Repository
Repository

-- | Convert 'Repository' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe Repository) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ggit_repository_get_type
    gvalueSet_ :: Ptr GValue -> Maybe Repository -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Repository
P.Nothing = Ptr GValue -> Ptr Repository -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Repository
forall a. Ptr a
FP.nullPtr :: FP.Ptr Repository)
    gvalueSet_ Ptr GValue
gv (P.Just Repository
obj) = Repository -> (Ptr Repository -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Repository
obj (Ptr GValue -> Ptr Repository -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe Repository)
gvalueGet_ Ptr GValue
gv = do
        Ptr Repository
ptr <- Ptr GValue -> IO (Ptr Repository)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Repository)
        if Ptr Repository
ptr Ptr Repository -> Ptr Repository -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Repository
forall a. Ptr a
FP.nullPtr
        then Repository -> Maybe Repository
forall a. a -> Maybe a
P.Just (Repository -> Maybe Repository)
-> IO Repository -> IO (Maybe Repository)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Repository -> Repository)
-> Ptr Repository -> IO Repository
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Repository -> Repository
Repository Ptr Repository
ptr
        else Maybe Repository -> IO (Maybe Repository)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Repository
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveRepositoryMethod (t :: Symbol) (o :: *) :: * where
    ResolveRepositoryMethod "addRemoteFetch" o = RepositoryAddRemoteFetchMethodInfo
    ResolveRepositoryMethod "addRemotePush" o = RepositoryAddRemotePushMethodInfo
    ResolveRepositoryMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveRepositoryMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveRepositoryMethod "blameFile" o = RepositoryBlameFileMethodInfo
    ResolveRepositoryMethod "checkoutHead" o = RepositoryCheckoutHeadMethodInfo
    ResolveRepositoryMethod "checkoutIndex" o = RepositoryCheckoutIndexMethodInfo
    ResolveRepositoryMethod "checkoutTree" o = RepositoryCheckoutTreeMethodInfo
    ResolveRepositoryMethod "cherryPick" o = RepositoryCherryPickMethodInfo
    ResolveRepositoryMethod "cherryPickCommit" o = RepositoryCherryPickCommitMethodInfo
    ResolveRepositoryMethod "createBlob" o = RepositoryCreateBlobMethodInfo
    ResolveRepositoryMethod "createBlobFromBuffer" o = RepositoryCreateBlobFromBufferMethodInfo
    ResolveRepositoryMethod "createBlobFromFile" o = RepositoryCreateBlobFromFileMethodInfo
    ResolveRepositoryMethod "createBlobFromPath" o = RepositoryCreateBlobFromPathMethodInfo
    ResolveRepositoryMethod "createBranch" o = RepositoryCreateBranchMethodInfo
    ResolveRepositoryMethod "createCommit" o = RepositoryCreateCommitMethodInfo
    ResolveRepositoryMethod "createCommitFromIds" o = RepositoryCreateCommitFromIdsMethodInfo
    ResolveRepositoryMethod "createIndexEntryForFile" o = RepositoryCreateIndexEntryForFileMethodInfo
    ResolveRepositoryMethod "createIndexEntryForPath" o = RepositoryCreateIndexEntryForPathMethodInfo
    ResolveRepositoryMethod "createNote" o = RepositoryCreateNoteMethodInfo
    ResolveRepositoryMethod "createReference" o = RepositoryCreateReferenceMethodInfo
    ResolveRepositoryMethod "createRemote" o = RepositoryCreateRemoteMethodInfo
    ResolveRepositoryMethod "createSymbolicReference" o = RepositoryCreateSymbolicReferenceMethodInfo
    ResolveRepositoryMethod "createTag" o = RepositoryCreateTagMethodInfo
    ResolveRepositoryMethod "createTagAnnotation" o = RepositoryCreateTagAnnotationMethodInfo
    ResolveRepositoryMethod "createTagFromBuffer" o = RepositoryCreateTagFromBufferMethodInfo
    ResolveRepositoryMethod "createTagLightweight" o = RepositoryCreateTagLightweightMethodInfo
    ResolveRepositoryMethod "createTreeBuilder" o = RepositoryCreateTreeBuilderMethodInfo
    ResolveRepositoryMethod "createTreeBuilderFromTree" o = RepositoryCreateTreeBuilderFromTreeMethodInfo
    ResolveRepositoryMethod "deleteTag" o = RepositoryDeleteTagMethodInfo
    ResolveRepositoryMethod "dropStash" o = RepositoryDropStashMethodInfo
    ResolveRepositoryMethod "enumerateBranches" o = RepositoryEnumerateBranchesMethodInfo
    ResolveRepositoryMethod "fileStatus" o = RepositoryFileStatusMethodInfo
    ResolveRepositoryMethod "fileStatusForeach" o = RepositoryFileStatusForeachMethodInfo
    ResolveRepositoryMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveRepositoryMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveRepositoryMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveRepositoryMethod "init" o = Gio.Initable.InitableInitMethodInfo
    ResolveRepositoryMethod "isBare" o = RepositoryIsBareMethodInfo
    ResolveRepositoryMethod "isEmpty" o = RepositoryIsEmptyMethodInfo
    ResolveRepositoryMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveRepositoryMethod "isHeadDetached" o = RepositoryIsHeadDetachedMethodInfo
    ResolveRepositoryMethod "isHeadUnborn" o = RepositoryIsHeadUnbornMethodInfo
    ResolveRepositoryMethod "listRemotes" o = RepositoryListRemotesMethodInfo
    ResolveRepositoryMethod "listTags" o = RepositoryListTagsMethodInfo
    ResolveRepositoryMethod "listTagsMatch" o = RepositoryListTagsMatchMethodInfo
    ResolveRepositoryMethod "lookup" o = RepositoryLookupMethodInfo
    ResolveRepositoryMethod "lookupBlob" o = RepositoryLookupBlobMethodInfo
    ResolveRepositoryMethod "lookupBranch" o = RepositoryLookupBranchMethodInfo
    ResolveRepositoryMethod "lookupCommit" o = RepositoryLookupCommitMethodInfo
    ResolveRepositoryMethod "lookupReference" o = RepositoryLookupReferenceMethodInfo
    ResolveRepositoryMethod "lookupReferenceDwim" o = RepositoryLookupReferenceDwimMethodInfo
    ResolveRepositoryMethod "lookupRemote" o = RepositoryLookupRemoteMethodInfo
    ResolveRepositoryMethod "lookupSubmodule" o = RepositoryLookupSubmoduleMethodInfo
    ResolveRepositoryMethod "lookupTag" o = RepositoryLookupTagMethodInfo
    ResolveRepositoryMethod "lookupTree" o = RepositoryLookupTreeMethodInfo
    ResolveRepositoryMethod "merge" o = RepositoryMergeMethodInfo
    ResolveRepositoryMethod "mergeBase" o = RepositoryMergeBaseMethodInfo
    ResolveRepositoryMethod "mergeCommits" o = RepositoryMergeCommitsMethodInfo
    ResolveRepositoryMethod "mergeTrees" o = RepositoryMergeTreesMethodInfo
    ResolveRepositoryMethod "noteForeach" o = RepositoryNoteForeachMethodInfo
    ResolveRepositoryMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveRepositoryMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveRepositoryMethod "pathIsIgnored" o = RepositoryPathIsIgnoredMethodInfo
    ResolveRepositoryMethod "readNote" o = RepositoryReadNoteMethodInfo
    ResolveRepositoryMethod "rebaseInit" o = RepositoryRebaseInitMethodInfo
    ResolveRepositoryMethod "rebaseOpen" o = RepositoryRebaseOpenMethodInfo
    ResolveRepositoryMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveRepositoryMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveRepositoryMethod "referencesForeach" o = RepositoryReferencesForeachMethodInfo
    ResolveRepositoryMethod "referencesForeachName" o = RepositoryReferencesForeachNameMethodInfo
    ResolveRepositoryMethod "removeNote" o = RepositoryRemoveNoteMethodInfo
    ResolveRepositoryMethod "removeRemote" o = RepositoryRemoveRemoteMethodInfo
    ResolveRepositoryMethod "renameRemote" o = RepositoryRenameRemoteMethodInfo
    ResolveRepositoryMethod "reset" o = RepositoryResetMethodInfo
    ResolveRepositoryMethod "resetDefault" o = RepositoryResetDefaultMethodInfo
    ResolveRepositoryMethod "revert" o = RepositoryRevertMethodInfo
    ResolveRepositoryMethod "revparse" o = RepositoryRevparseMethodInfo
    ResolveRepositoryMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveRepositoryMethod "saveStash" o = RepositorySaveStashMethodInfo
    ResolveRepositoryMethod "stashForeach" o = RepositoryStashForeachMethodInfo
    ResolveRepositoryMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveRepositoryMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveRepositoryMethod "submoduleForeach" o = RepositorySubmoduleForeachMethodInfo
    ResolveRepositoryMethod "tagForeach" o = RepositoryTagForeachMethodInfo
    ResolveRepositoryMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveRepositoryMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveRepositoryMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveRepositoryMethod "getAheadBehind" o = RepositoryGetAheadBehindMethodInfo
    ResolveRepositoryMethod "getAttribute" o = RepositoryGetAttributeMethodInfo
    ResolveRepositoryMethod "getConfig" o = RepositoryGetConfigMethodInfo
    ResolveRepositoryMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveRepositoryMethod "getDefaultNotesRef" o = RepositoryGetDefaultNotesRefMethodInfo
    ResolveRepositoryMethod "getDescendantOf" o = RepositoryGetDescendantOfMethodInfo
    ResolveRepositoryMethod "getHead" o = RepositoryGetHeadMethodInfo
    ResolveRepositoryMethod "getIndex" o = RepositoryGetIndexMethodInfo
    ResolveRepositoryMethod "getLocation" o = RepositoryGetLocationMethodInfo
    ResolveRepositoryMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveRepositoryMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveRepositoryMethod "getSubmoduleStatus" o = RepositoryGetSubmoduleStatusMethodInfo
    ResolveRepositoryMethod "getWorkdir" o = RepositoryGetWorkdirMethodInfo
    ResolveRepositoryMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveRepositoryMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveRepositoryMethod "setHead" o = RepositorySetHeadMethodInfo
    ResolveRepositoryMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveRepositoryMethod "setRemoteUrl" o = RepositorySetRemoteUrlMethodInfo
    ResolveRepositoryMethod "setSubmoduleFetchRecurse" o = RepositorySetSubmoduleFetchRecurseMethodInfo
    ResolveRepositoryMethod "setSubmoduleIgnore" o = RepositorySetSubmoduleIgnoreMethodInfo
    ResolveRepositoryMethod "setSubmoduleUpdate" o = RepositorySetSubmoduleUpdateMethodInfo
    ResolveRepositoryMethod "setSubmoduleUrl" o = RepositorySetSubmoduleUrlMethodInfo
    ResolveRepositoryMethod "setWorkdir" o = RepositorySetWorkdirMethodInfo
    ResolveRepositoryMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveRepositoryMethod t Repository, O.OverloadedMethod info Repository p) => OL.IsLabel t (Repository -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveRepositoryMethod t Repository, O.OverloadedMethod info Repository p, R.HasField t Repository p) => R.HasField t Repository p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveRepositoryMethod t Repository, O.OverloadedMethodInfo info Repository) => OL.IsLabel t (O.MethodProxy info Repository) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#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 <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> 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 :: forall (m :: * -> *) o.
(MonadIO m, IsRepository o) =>
o -> m (Maybe CloneOptions)
getRepositoryCloneOptions o
obj = IO (Maybe CloneOptions) -> m (Maybe CloneOptions)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe CloneOptions) -> m (Maybe CloneOptions))
-> IO (Maybe CloneOptions) -> m (Maybe CloneOptions)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr CloneOptions -> CloneOptions)
-> IO (Maybe CloneOptions)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"clone-options" ManagedPtr CloneOptions -> CloneOptions
Ggit.CloneOptions.CloneOptions

-- | 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, MIO.MonadIO m, Ggit.CloneOptions.IsCloneOptions a) => a -> m (GValueConstruct o)
constructRepositoryCloneOptions :: forall o (m :: * -> *) a.
(IsRepository o, MonadIO m, IsCloneOptions a) =>
a -> m (GValueConstruct o)
constructRepositoryCloneOptions a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"clone-options" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

#if defined(ENABLE_OVERLOADING)
data RepositoryCloneOptionsPropertyInfo
instance AttrInfo RepositoryCloneOptionsPropertyInfo where
    type AttrAllowedOps RepositoryCloneOptionsPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint RepositoryCloneOptionsPropertyInfo = IsRepository
    type AttrSetTypeConstraint RepositoryCloneOptionsPropertyInfo = Ggit.CloneOptions.IsCloneOptions
    type AttrTransferTypeConstraint RepositoryCloneOptionsPropertyInfo = Ggit.CloneOptions.IsCloneOptions
    type AttrTransferType RepositoryCloneOptionsPropertyInfo = Ggit.CloneOptions.CloneOptions
    type AttrGetType RepositoryCloneOptionsPropertyInfo = (Maybe Ggit.CloneOptions.CloneOptions)
    type AttrLabel RepositoryCloneOptionsPropertyInfo = "clone-options"
    type AttrOrigin RepositoryCloneOptionsPropertyInfo = Repository
    attrGet = getRepositoryCloneOptions
    attrSet = undefined
    attrTransfer _ v = do
        unsafeCastTo Ggit.CloneOptions.CloneOptions v
    attrConstruct = constructRepositoryCloneOptions
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.cloneOptions"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#g:attr:cloneOptions"
        })
#endif

-- VVV Prop "head"
   -- Type: TInterface (Name {namespace = "Ggit", name = "Ref"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@head@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> 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 :: forall (m :: * -> *) o.
(MonadIO m, IsRepository o) =>
o -> m (Maybe Ref)
getRepositoryHead o
obj = IO (Maybe Ref) -> m (Maybe Ref)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Ref) -> m (Maybe Ref))
-> IO (Maybe Ref) -> m (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Ref -> Ref) -> IO (Maybe Ref)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"head" ManagedPtr Ref -> Ref
Ggit.Ref.Ref

#if defined(ENABLE_OVERLOADING)
data RepositoryHeadPropertyInfo
instance AttrInfo RepositoryHeadPropertyInfo where
    type AttrAllowedOps RepositoryHeadPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint RepositoryHeadPropertyInfo = IsRepository
    type AttrSetTypeConstraint RepositoryHeadPropertyInfo = (~) ()
    type AttrTransferTypeConstraint RepositoryHeadPropertyInfo = (~) ()
    type AttrTransferType RepositoryHeadPropertyInfo = ()
    type AttrGetType RepositoryHeadPropertyInfo = (Maybe Ggit.Ref.Ref)
    type AttrLabel RepositoryHeadPropertyInfo = "head"
    type AttrOrigin RepositoryHeadPropertyInfo = Repository
    attrGet = getRepositoryHead
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.head"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#g:attr:head"
        })
#endif

-- VVV Prop "init"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@init@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' repository #init
-- @
getRepositoryInit :: (MonadIO m, IsRepository o) => o -> m Bool
getRepositoryInit :: forall (m :: * -> *) o. (MonadIO m, IsRepository o) => o -> m Bool
getRepositoryInit o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"init"

-- | 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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructRepositoryInit :: forall o (m :: * -> *).
(IsRepository o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructRepositoryInit Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"init" Bool
val

#if defined(ENABLE_OVERLOADING)
data RepositoryInitPropertyInfo
instance AttrInfo RepositoryInitPropertyInfo where
    type AttrAllowedOps RepositoryInitPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint RepositoryInitPropertyInfo = IsRepository
    type AttrSetTypeConstraint RepositoryInitPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint RepositoryInitPropertyInfo = (~) Bool
    type AttrTransferType RepositoryInitPropertyInfo = Bool
    type AttrGetType RepositoryInitPropertyInfo = Bool
    type AttrLabel RepositoryInitPropertyInfo = "init"
    type AttrOrigin RepositoryInitPropertyInfo = Repository
    attrGet = getRepositoryInit
    attrSet = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructRepositoryInit
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.init"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#g:attr:init"
        })
#endif

-- VVV Prop "is-bare"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@is-bare@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' repository #isBare
-- @
getRepositoryIsBare :: (MonadIO m, IsRepository o) => o -> m Bool
getRepositoryIsBare :: forall (m :: * -> *) o. (MonadIO m, IsRepository o) => o -> m Bool
getRepositoryIsBare o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"is-bare"

-- | 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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructRepositoryIsBare :: forall o (m :: * -> *).
(IsRepository o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructRepositoryIsBare Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"is-bare" Bool
val

#if defined(ENABLE_OVERLOADING)
data RepositoryIsBarePropertyInfo
instance AttrInfo RepositoryIsBarePropertyInfo where
    type AttrAllowedOps RepositoryIsBarePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint RepositoryIsBarePropertyInfo = IsRepository
    type AttrSetTypeConstraint RepositoryIsBarePropertyInfo = (~) Bool
    type AttrTransferTypeConstraint RepositoryIsBarePropertyInfo = (~) Bool
    type AttrTransferType RepositoryIsBarePropertyInfo = Bool
    type AttrGetType RepositoryIsBarePropertyInfo = Bool
    type AttrLabel RepositoryIsBarePropertyInfo = "is-bare"
    type AttrOrigin RepositoryIsBarePropertyInfo = Repository
    attrGet = getRepositoryIsBare
    attrSet = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructRepositoryIsBare
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.isBare"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#g:attr:isBare"
        })
#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 <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> 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 :: forall (m :: * -> *) o.
(MonadIO m, IsRepository o) =>
o -> m (Maybe File)
getRepositoryLocation o
obj = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr File -> File) -> IO (Maybe File)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"location" ManagedPtr File -> File
Gio.File.File

-- | 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, MIO.MonadIO m, Gio.File.IsFile a) => a -> m (GValueConstruct o)
constructRepositoryLocation :: forall o (m :: * -> *) a.
(IsRepository o, MonadIO m, IsFile a) =>
a -> m (GValueConstruct o)
constructRepositoryLocation a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"location" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

#if defined(ENABLE_OVERLOADING)
data RepositoryLocationPropertyInfo
instance AttrInfo RepositoryLocationPropertyInfo where
    type AttrAllowedOps RepositoryLocationPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint RepositoryLocationPropertyInfo = IsRepository
    type AttrSetTypeConstraint RepositoryLocationPropertyInfo = Gio.File.IsFile
    type AttrTransferTypeConstraint RepositoryLocationPropertyInfo = Gio.File.IsFile
    type AttrTransferType RepositoryLocationPropertyInfo = Gio.File.File
    type AttrGetType RepositoryLocationPropertyInfo = (Maybe Gio.File.File)
    type AttrLabel RepositoryLocationPropertyInfo = "location"
    type AttrOrigin RepositoryLocationPropertyInfo = Repository
    attrGet = getRepositoryLocation
    attrSet = undefined
    attrTransfer _ v = do
        unsafeCastTo Gio.File.File v
    attrConstruct = constructRepositoryLocation
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.location"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#g:attr:location"
        })
#endif

-- VVV Prop "url"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@url@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' repository #url
-- @
getRepositoryUrl :: (MonadIO m, IsRepository o) => o -> m (Maybe T.Text)
getRepositoryUrl :: forall (m :: * -> *) o.
(MonadIO m, IsRepository o) =>
o -> m (Maybe Text)
getRepositoryUrl o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"url"

-- | 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, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructRepositoryUrl :: forall o (m :: * -> *).
(IsRepository o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructRepositoryUrl Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"url" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)

#if defined(ENABLE_OVERLOADING)
data RepositoryUrlPropertyInfo
instance AttrInfo RepositoryUrlPropertyInfo where
    type AttrAllowedOps RepositoryUrlPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint RepositoryUrlPropertyInfo = IsRepository
    type AttrSetTypeConstraint RepositoryUrlPropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint RepositoryUrlPropertyInfo = (~) T.Text
    type AttrTransferType RepositoryUrlPropertyInfo = T.Text
    type AttrGetType RepositoryUrlPropertyInfo = (Maybe T.Text)
    type AttrLabel RepositoryUrlPropertyInfo = "url"
    type AttrOrigin RepositoryUrlPropertyInfo = Repository
    attrGet = getRepositoryUrl
    attrSet = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructRepositoryUrl
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.url"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#g:attr:url"
        })
#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 <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> 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 :: forall (m :: * -> *) o.
(MonadIO m, IsRepository o) =>
o -> m (Maybe File)
getRepositoryWorkdir o
obj = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr File -> File) -> IO (Maybe File)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"workdir" ManagedPtr File -> File
Gio.File.File

-- | Set the value of the “@workdir@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> 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 :: forall (m :: * -> *) o a.
(MonadIO m, IsRepository o, IsFile a) =>
o -> a -> m ()
setRepositoryWorkdir o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"workdir" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | 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, MIO.MonadIO m, Gio.File.IsFile a) => a -> m (GValueConstruct o)
constructRepositoryWorkdir :: forall o (m :: * -> *) a.
(IsRepository o, MonadIO m, IsFile a) =>
a -> m (GValueConstruct o)
constructRepositoryWorkdir a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"workdir" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

-- | Set the value of the “@workdir@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #workdir
-- @
clearRepositoryWorkdir :: (MonadIO m, IsRepository o) => o -> m ()
clearRepositoryWorkdir :: forall (m :: * -> *) o. (MonadIO m, IsRepository o) => o -> m ()
clearRepositoryWorkdir o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe File -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"workdir" (Maybe File
forall a. Maybe a
Nothing :: Maybe Gio.File.File)

#if defined(ENABLE_OVERLOADING)
data RepositoryWorkdirPropertyInfo
instance AttrInfo RepositoryWorkdirPropertyInfo where
    type AttrAllowedOps RepositoryWorkdirPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint RepositoryWorkdirPropertyInfo = IsRepository
    type AttrSetTypeConstraint RepositoryWorkdirPropertyInfo = Gio.File.IsFile
    type AttrTransferTypeConstraint RepositoryWorkdirPropertyInfo = Gio.File.IsFile
    type AttrTransferType RepositoryWorkdirPropertyInfo = Gio.File.File
    type AttrGetType RepositoryWorkdirPropertyInfo = (Maybe Gio.File.File)
    type AttrLabel RepositoryWorkdirPropertyInfo = "workdir"
    type AttrOrigin RepositoryWorkdirPropertyInfo = Repository
    attrGet = getRepositoryWorkdir
    attrSet = setRepositoryWorkdir
    attrTransfer _ v = do
        unsafeCastTo Gio.File.File v
    attrConstruct = constructRepositoryWorkdir
    attrClear = clearRepositoryWorkdir
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.workdir"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#g:attr:workdir"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Repository
type instance O.AttributeList Repository = RepositoryAttributeList
type RepositoryAttributeList = ('[ '("cloneOptions", RepositoryCloneOptionsPropertyInfo), '("head", RepositoryHeadPropertyInfo), '("init", RepositoryInitPropertyInfo), '("isBare", RepositoryIsBarePropertyInfo), '("location", RepositoryLocationPropertyInfo), '("native", Ggit.Native.NativeNativePropertyInfo), '("url", RepositoryUrlPropertyInfo), '("workdir", RepositoryWorkdirPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
repositoryCloneOptions :: AttrLabelProxy "cloneOptions"
repositoryCloneOptions = AttrLabelProxy

repositoryHead :: AttrLabelProxy "head"
repositoryHead = AttrLabelProxy

repositoryInit :: AttrLabelProxy "init"
repositoryInit = AttrLabelProxy

repositoryLocation :: AttrLabelProxy "location"
repositoryLocation = AttrLabelProxy

repositoryUrl :: AttrLabelProxy "url"
repositoryUrl = AttrLabelProxy

repositoryWorkdir :: AttrLabelProxy "workdir"
repositoryWorkdir = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Repository = RepositorySignalList
type RepositorySignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- 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 t'GI.Ggit.Objects.Repository.Repository'.
    -> b
    -- ^ /@remote@/: a t'GI.Ggit.Objects.Remote.Remote'.
    -> T.Text
    -- ^ /@refspec@/: the fetch refspec.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryAddRemoteFetch :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsRemote b) =>
a -> b -> Text -> m ()
repositoryAddRemoteFetch a
repository b
remote Text
refspec = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Remote
remote' <- b -> IO (Ptr Remote)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
remote
    CString
refspec' <- Text -> IO CString
textToCString Text
refspec
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Remote -> CString -> Ptr (Ptr GError) -> IO ()
ggit_repository_add_remote_fetch Ptr Repository
repository' Ptr Remote
remote' CString
refspec'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
remote
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refspec'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refspec'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryAddRemoteFetchMethodInfo
instance (signature ~ (b -> T.Text -> m ()), MonadIO m, IsRepository a, Ggit.Remote.IsRemote b) => O.OverloadedMethod RepositoryAddRemoteFetchMethodInfo a signature where
    overloadedMethod = repositoryAddRemoteFetch

instance O.OverloadedMethodInfo RepositoryAddRemoteFetchMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryAddRemoteFetch",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> b
    -- ^ /@remote@/: a t'GI.Ggit.Objects.Remote.Remote'.
    -> T.Text
    -- ^ /@refspec@/: the push refspec.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryAddRemotePush :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsRemote b) =>
a -> b -> Text -> m ()
repositoryAddRemotePush a
repository b
remote Text
refspec = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Remote
remote' <- b -> IO (Ptr Remote)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
remote
    CString
refspec' <- Text -> IO CString
textToCString Text
refspec
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Remote -> CString -> Ptr (Ptr GError) -> IO ()
ggit_repository_add_remote_push Ptr Repository
repository' Ptr Remote
remote' CString
refspec'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
remote
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refspec'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refspec'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryAddRemotePushMethodInfo
instance (signature ~ (b -> T.Text -> m ()), MonadIO m, IsRepository a, Ggit.Remote.IsRemote b) => O.OverloadedMethod RepositoryAddRemotePushMethodInfo a signature where
    overloadedMethod = repositoryAddRemotePush

instance O.OverloadedMethodInfo RepositoryAddRemotePushMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryAddRemotePush",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 t'GI.Ggit.Objects.Blame.Blame'. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryBlameFile :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsFile b) =>
a -> b -> Maybe BlameOptions -> m (Maybe Blame)
repositoryBlameFile a
repository b
file Maybe BlameOptions
blameOptions = IO (Maybe Blame) -> m (Maybe Blame)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Blame) -> m (Maybe Blame))
-> IO (Maybe Blame) -> m (Maybe Blame)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr File
file' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
file
    Ptr BlameOptions
maybeBlameOptions <- case Maybe BlameOptions
blameOptions of
        Maybe BlameOptions
Nothing -> Ptr BlameOptions -> IO (Ptr BlameOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr BlameOptions
forall a. Ptr a
nullPtr
        Just BlameOptions
jBlameOptions -> do
            Ptr BlameOptions
jBlameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
jBlameOptions
            Ptr BlameOptions -> IO (Ptr BlameOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr BlameOptions
jBlameOptions'
    IO (Maybe Blame) -> IO () -> IO (Maybe Blame)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Blame
result <- (Ptr (Ptr GError) -> IO (Ptr Blame)) -> IO (Ptr Blame)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Blame)) -> IO (Ptr Blame))
-> (Ptr (Ptr GError) -> IO (Ptr Blame)) -> IO (Ptr Blame)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr File
-> Ptr BlameOptions
-> Ptr (Ptr GError)
-> IO (Ptr Blame)
ggit_repository_blame_file Ptr Repository
repository' Ptr File
file' Ptr BlameOptions
maybeBlameOptions
        Maybe Blame
maybeResult <- Ptr Blame -> (Ptr Blame -> IO Blame) -> IO (Maybe Blame)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Blame
result ((Ptr Blame -> IO Blame) -> IO (Maybe Blame))
-> (Ptr Blame -> IO Blame) -> IO (Maybe Blame)
forall a b. (a -> b) -> a -> b
$ \Ptr Blame
result' -> do
            Blame
result'' <- ((ManagedPtr Blame -> Blame) -> Ptr Blame -> IO Blame
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Blame -> Blame
Ggit.Blame.Blame) Ptr Blame
result'
            Blame -> IO Blame
forall (m :: * -> *) a. Monad m => a -> m a
return Blame
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
file
        Maybe BlameOptions -> (BlameOptions -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe BlameOptions
blameOptions BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        Maybe Blame -> IO (Maybe Blame)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Blame
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryBlameFileMethodInfo
instance (signature ~ (b -> Maybe (Ggit.BlameOptions.BlameOptions) -> m (Maybe Ggit.Blame.Blame)), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.OverloadedMethod RepositoryBlameFileMethodInfo a signature where
    overloadedMethod = repositoryBlameFile

instance O.OverloadedMethodInfo RepositoryBlameFileMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryBlameFile",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 'P.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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Maybe (b)
    -- ^ /@options@/: a t'GI.Ggit.Objects.CheckoutOptions.CheckoutOptions' or 'P.Nothing'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCheckoutHead :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsCheckoutOptions b) =>
a -> Maybe b -> m ()
repositoryCheckoutHead a
repository Maybe b
options = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr CheckoutOptions
maybeOptions <- case Maybe b
options of
        Maybe b
Nothing -> Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
forall a. Ptr a
nullPtr
        Just b
jOptions -> do
            Ptr CheckoutOptions
jOptions' <- b -> IO (Ptr CheckoutOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jOptions
            Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
jOptions'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr CheckoutOptions -> Ptr (Ptr GError) -> IO CInt
ggit_repository_checkout_head Ptr Repository
repository' Ptr CheckoutOptions
maybeOptions
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
options b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCheckoutHeadMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsRepository a, Ggit.CheckoutOptions.IsCheckoutOptions b) => O.OverloadedMethod RepositoryCheckoutHeadMethodInfo a signature where
    overloadedMethod = repositoryCheckoutHead

instance O.OverloadedMethodInfo RepositoryCheckoutHeadMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCheckoutHead",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 'P.Nothing', then the current index of the repository will be used. If
-- /@options@/ is 'P.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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Maybe (b)
    -- ^ /@index@/: a t'GI.Ggit.Objects.Index.Index' or 'P.Nothing'.
    -> Maybe (c)
    -- ^ /@options@/: a t'GI.Ggit.Objects.CheckoutOptions.CheckoutOptions' or 'P.Nothing'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCheckoutIndex :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepository a, IsIndex b,
 IsCheckoutOptions c) =>
a -> Maybe b -> Maybe c -> m ()
repositoryCheckoutIndex a
repository Maybe b
index Maybe c
options = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Index
maybeIndex <- case Maybe b
index of
        Maybe b
Nothing -> Ptr Index -> IO (Ptr Index)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Index
forall a. Ptr a
nullPtr
        Just b
jIndex -> do
            Ptr Index
jIndex' <- b -> IO (Ptr Index)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jIndex
            Ptr Index -> IO (Ptr Index)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Index
jIndex'
    Ptr CheckoutOptions
maybeOptions <- case Maybe c
options of
        Maybe c
Nothing -> Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
forall a. Ptr a
nullPtr
        Just c
jOptions -> do
            Ptr CheckoutOptions
jOptions' <- c -> IO (Ptr CheckoutOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jOptions
            Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
jOptions'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Index -> Ptr CheckoutOptions -> Ptr (Ptr GError) -> IO CInt
ggit_repository_checkout_index Ptr Repository
repository' Ptr Index
maybeIndex Ptr CheckoutOptions
maybeOptions
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
index b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
options c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCheckoutIndexMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (c) -> m ()), MonadIO m, IsRepository a, Ggit.Index.IsIndex b, Ggit.CheckoutOptions.IsCheckoutOptions c) => O.OverloadedMethod RepositoryCheckoutIndexMethodInfo a signature where
    overloadedMethod = repositoryCheckoutIndex

instance O.OverloadedMethodInfo RepositoryCheckoutIndexMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCheckoutIndex",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 'P.Nothing', then the current HEAD of the
-- repository will be used. If /@options@/ is 'P.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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Maybe (b)
    -- ^ /@tree@/: a t'GI.Ggit.Objects.Object.Object' or 'P.Nothing'.
    -> Maybe (c)
    -- ^ /@options@/: a t'GI.Ggit.Objects.CheckoutOptions.CheckoutOptions' or 'P.Nothing'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCheckoutTree :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepository a, IsObject b,
 IsCheckoutOptions c) =>
a -> Maybe b -> Maybe c -> m ()
repositoryCheckoutTree a
repository Maybe b
tree Maybe c
options = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Object
maybeTree <- case Maybe b
tree of
        Maybe b
Nothing -> Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
forall a. Ptr a
nullPtr
        Just b
jTree -> do
            Ptr Object
jTree' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jTree
            Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jTree'
    Ptr CheckoutOptions
maybeOptions <- case Maybe c
options of
        Maybe c
Nothing -> Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
forall a. Ptr a
nullPtr
        Just c
jOptions -> do
            Ptr CheckoutOptions
jOptions' <- c -> IO (Ptr CheckoutOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jOptions
            Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
jOptions'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Object -> Ptr CheckoutOptions -> Ptr (Ptr GError) -> IO CInt
ggit_repository_checkout_tree Ptr Repository
repository' Ptr Object
maybeTree Ptr CheckoutOptions
maybeOptions
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
tree b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
options c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCheckoutTreeMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (c) -> m ()), MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.CheckoutOptions.IsCheckoutOptions c) => O.OverloadedMethod RepositoryCheckoutTreeMethodInfo a signature where
    overloadedMethod = repositoryCheckoutTree

instance O.OverloadedMethodInfo RepositoryCheckoutTreeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCheckoutTree",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> b
    -- ^ /@commit@/: a t'GI.Ggit.Objects.Commit.Commit'.
    -> c
    -- ^ /@options@/: a t'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCherryPick :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepository a, IsCommit b,
 IsCherryPickOptions c) =>
a -> b -> c -> m ()
repositoryCherryPick a
repository b
commit c
options = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Commit
commit' <- b -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
commit
    Ptr CherryPickOptions
options' <- c -> IO (Ptr CherryPickOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
options
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Commit
-> Ptr CherryPickOptions
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_cherry_pick Ptr Repository
repository' Ptr Commit
commit' Ptr CherryPickOptions
options'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
commit
        c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
options
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCherryPickMethodInfo
instance (signature ~ (b -> c -> m ()), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.CherryPickOptions.IsCherryPickOptions c) => O.OverloadedMethod RepositoryCherryPickMethodInfo a signature where
    overloadedMethod = repositoryCherryPick

instance O.OverloadedMethodInfo RepositoryCherryPickMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCherryPick",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> b
    -- ^ /@commit@/: a t'GI.Ggit.Objects.Commit.Commit' to cherry-pick.
    -> c
    -- ^ /@ourCommit@/: a t'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 t'GI.Ggit.Structs.MergeOptions.MergeOptions'.
    -> m (Maybe Ggit.Index.Index)
    -- ^ __Returns:__ a t'GI.Ggit.Objects.Index.Index'. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCherryPickCommit :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepository a, IsCommit b,
 IsCommit c) =>
a -> b -> c -> Word32 -> Maybe MergeOptions -> m (Maybe Index)
repositoryCherryPickCommit a
repository b
commit c
ourCommit Word32
mainline Maybe MergeOptions
mergeOptions = IO (Maybe Index) -> m (Maybe Index)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Index) -> m (Maybe Index))
-> IO (Maybe Index) -> m (Maybe Index)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Commit
commit' <- b -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
commit
    Ptr Commit
ourCommit' <- c -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
ourCommit
    Ptr MergeOptions
maybeMergeOptions <- case Maybe MergeOptions
mergeOptions of
        Maybe MergeOptions
Nothing -> Ptr MergeOptions -> IO (Ptr MergeOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr MergeOptions
forall a. Ptr a
nullPtr
        Just MergeOptions
jMergeOptions -> do
            Ptr MergeOptions
jMergeOptions' <- MergeOptions -> IO (Ptr MergeOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MergeOptions
jMergeOptions
            Ptr MergeOptions -> IO (Ptr MergeOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr MergeOptions
jMergeOptions'
    IO (Maybe Index) -> IO () -> IO (Maybe Index)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Index
result <- (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index))
-> (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Commit
-> Ptr Commit
-> Word32
-> Ptr MergeOptions
-> Ptr (Ptr GError)
-> IO (Ptr Index)
ggit_repository_cherry_pick_commit Ptr Repository
repository' Ptr Commit
commit' Ptr Commit
ourCommit' Word32
mainline Ptr MergeOptions
maybeMergeOptions
        Maybe Index
maybeResult <- Ptr Index -> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Index
result ((Ptr Index -> IO Index) -> IO (Maybe Index))
-> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. (a -> b) -> a -> b
$ \Ptr Index
result' -> do
            Index
result'' <- ((ManagedPtr Index -> Index) -> Ptr Index -> IO Index
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Index -> Index
Ggit.Index.Index) Ptr Index
result'
            Index -> IO Index
forall (m :: * -> *) a. Monad m => a -> m a
return Index
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
commit
        c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
ourCommit
        Maybe MergeOptions -> (MergeOptions -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe MergeOptions
mergeOptions MergeOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        Maybe Index -> IO (Maybe Index)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Index
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCherryPickCommitMethodInfo
instance (signature ~ (b -> c -> Word32 -> Maybe (Ggit.MergeOptions.MergeOptions) -> m (Maybe Ggit.Index.Index)), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.Commit.IsCommit c) => O.OverloadedMethod RepositoryCherryPickCommitMethodInfo a signature where
    overloadedMethod = repositoryCherryPickCommit

instance O.OverloadedMethodInfo RepositoryCherryPickCommitMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCherryPickCommit",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 t'GI.Ggit.Objects.Repository.Repository'.
    -> m (Maybe Ggit.BlobOutputStream.BlobOutputStream)
    -- ^ __Returns:__ a t'GI.Ggit.Objects.BlobOutputStream.BlobOutputStream'.
repositoryCreateBlob :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m (Maybe BlobOutputStream)
repositoryCreateBlob a
repository = IO (Maybe BlobOutputStream) -> m (Maybe BlobOutputStream)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BlobOutputStream) -> m (Maybe BlobOutputStream))
-> IO (Maybe BlobOutputStream) -> m (Maybe BlobOutputStream)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr BlobOutputStream
result <- Ptr Repository -> IO (Ptr BlobOutputStream)
ggit_repository_create_blob Ptr Repository
repository'
    Maybe BlobOutputStream
maybeResult <- Ptr BlobOutputStream
-> (Ptr BlobOutputStream -> IO BlobOutputStream)
-> IO (Maybe BlobOutputStream)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr BlobOutputStream
result ((Ptr BlobOutputStream -> IO BlobOutputStream)
 -> IO (Maybe BlobOutputStream))
-> (Ptr BlobOutputStream -> IO BlobOutputStream)
-> IO (Maybe BlobOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr BlobOutputStream
result' -> do
        BlobOutputStream
result'' <- ((ManagedPtr BlobOutputStream -> BlobOutputStream)
-> Ptr BlobOutputStream -> IO BlobOutputStream
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr BlobOutputStream -> BlobOutputStream
Ggit.BlobOutputStream.BlobOutputStream) Ptr BlobOutputStream
result'
        BlobOutputStream -> IO BlobOutputStream
forall (m :: * -> *) a. Monad m => a -> m a
return BlobOutputStream
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
    Maybe BlobOutputStream -> IO (Maybe BlobOutputStream)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BlobOutputStream
maybeResult

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateBlobMethodInfo
instance (signature ~ (m (Maybe Ggit.BlobOutputStream.BlobOutputStream)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryCreateBlobMethodInfo a signature where
    overloadedMethod = repositoryCreateBlob

instance O.OverloadedMethodInfo RepositoryCreateBlobMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateBlob",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> ByteString
    -- ^ /@buffer@/: the data.
    -> m (Maybe Ggit.OId.OId)
    -- ^ __Returns:__ the new @/GgitOid/@ of the written blob,
    -- or 'P.Nothing' if writing the blob failed. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateBlobFromBuffer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> ByteString -> m (Maybe OId)
repositoryCreateBlobFromBuffer a
repository ByteString
buffer = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
    let size :: Word64
size = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
buffer
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Word8
buffer' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
buffer
    IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Word8 -> Word64 -> Ptr (Ptr GError) -> IO (Ptr OId)
ggit_repository_create_blob_from_buffer Ptr Repository
repository' Ptr Word8
buffer' Word64
size
        Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
            OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
            OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
buffer'
        Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
     ) (do
        Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
buffer'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateBlobFromBufferMethodInfo
instance (signature ~ (ByteString -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryCreateBlobFromBufferMethodInfo a signature where
    overloadedMethod = repositoryCreateBlobFromBuffer

instance O.OverloadedMethodInfo RepositoryCreateBlobFromBufferMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateBlobFromBuffer",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 'P.Nothing' if writing the blob failed.
repositoryCreateBlobFromFile ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Gio.File.IsFile b) =>
    a
    -- ^ /@repository@/: a t'GI.Ggit.Objects.Repository.Repository'.
    -> b
    -- ^ /@file@/: a t'GI.Gio.Interfaces.File.File'.
    -> m Ggit.OId.OId
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateBlobFromFile :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsFile b) =>
a -> b -> m OId
repositoryCreateBlobFromFile a
repository b
file = IO OId -> m OId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO OId -> m OId) -> IO OId -> m OId
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr File
file' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
file
    IO OId -> IO () -> IO OId
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr File -> Ptr (Ptr GError) -> IO (Ptr OId)
ggit_repository_create_blob_from_file Ptr Repository
repository' Ptr File
file'
        Text -> Ptr OId -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repositoryCreateBlobFromFile" Ptr OId
result
        OId
result' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
file
        OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result'
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateBlobFromFileMethodInfo
instance (signature ~ (b -> m Ggit.OId.OId), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.OverloadedMethod RepositoryCreateBlobFromFileMethodInfo a signature where
    overloadedMethod = repositoryCreateBlobFromFile

instance O.OverloadedMethodInfo RepositoryCreateBlobFromFileMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateBlobFromFile",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 'P.Nothing' if writing the blob failed. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateBlobFromPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> m (Maybe OId)
repositoryCreateBlobFromPath a
repository Text
path = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
path' <- Text -> IO CString
textToCString Text
path
    IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr OId)
ggit_repository_create_blob_from_path Ptr Repository
repository' CString
path'
        Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
            OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
            OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
        Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateBlobFromPathMethodInfo
instance (signature ~ (T.Text -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryCreateBlobFromPathMethodInfo a signature where
    overloadedMethod = repositoryCreateBlobFromPath

instance O.OverloadedMethodInfo RepositoryCreateBlobFromPathMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateBlobFromPath",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@branchName@/: the name of the branch.
    -> b
    -- ^ /@target@/: a t'GI.Ggit.Objects.Object.Object'.
    -> [Ggit.Flags.CreateFlags]
    -- ^ /@flags@/: a t'GI.Ggit.Flags.CreateFlags'.
    -> m (Maybe Ggit.Branch.Branch)
    -- ^ __Returns:__ the reference to which the branch
    --                                        points, or 'P.Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateBranch :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsObject b) =>
a -> Text -> b -> [CreateFlags] -> m (Maybe Branch)
repositoryCreateBranch a
repository Text
branchName b
target [CreateFlags]
flags = IO (Maybe Branch) -> m (Maybe Branch)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Branch) -> m (Maybe Branch))
-> IO (Maybe Branch) -> m (Maybe Branch)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
branchName' <- Text -> IO CString
textToCString Text
branchName
    Ptr Object
target' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
    let flags' :: CUInt
flags' = [CreateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [CreateFlags]
flags
    IO (Maybe Branch) -> IO () -> IO (Maybe Branch)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Branch
result <- (Ptr (Ptr GError) -> IO (Ptr Branch)) -> IO (Ptr Branch)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Branch)) -> IO (Ptr Branch))
-> (Ptr (Ptr GError) -> IO (Ptr Branch)) -> IO (Ptr Branch)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Object
-> CUInt
-> Ptr (Ptr GError)
-> IO (Ptr Branch)
ggit_repository_create_branch Ptr Repository
repository' CString
branchName' Ptr Object
target' CUInt
flags'
        Maybe Branch
maybeResult <- Ptr Branch -> (Ptr Branch -> IO Branch) -> IO (Maybe Branch)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Branch
result ((Ptr Branch -> IO Branch) -> IO (Maybe Branch))
-> (Ptr Branch -> IO Branch) -> IO (Maybe Branch)
forall a b. (a -> b) -> a -> b
$ \Ptr Branch
result' -> do
            Branch
result'' <- ((ManagedPtr Branch -> Branch) -> Ptr Branch -> IO Branch
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Branch -> Branch
Ggit.Branch.Branch) Ptr Branch
result'
            Branch -> IO Branch
forall (m :: * -> *) a. Monad m => a -> m a
return Branch
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
branchName'
        Maybe Branch -> IO (Maybe Branch)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Branch
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
branchName'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateBranchMethodInfo
instance (signature ~ (T.Text -> b -> [Ggit.Flags.CreateFlags] -> m (Maybe Ggit.Branch.Branch)), MonadIO m, IsRepository a, Ggit.Object.IsObject b) => O.OverloadedMethod RepositoryCreateBranchMethodInfo a signature where
    overloadedMethod = repositoryCreateBranch

instance O.OverloadedMethodInfo RepositoryCreateBranchMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateBranch",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 'P.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 'P.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 t'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 t'GI.Ggit.Structs.OId.OId' of the created commit object,
    -- or 'P.Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateCommit :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsRepository a, IsSignature b,
 IsSignature c, IsTree d) =>
a
-> Maybe Text
-> b
-> c
-> Maybe Text
-> Text
-> d
-> [Commit]
-> m (Maybe OId)
repositoryCreateCommit a
repository Maybe Text
updateRef b
author c
committer Maybe Text
messageEncoding Text
message d
tree [Commit]
parents = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
    let parentCount :: Int32
parentCount = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Commit] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Commit]
parents
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
maybeUpdateRef <- case Maybe Text
updateRef of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jUpdateRef -> do
            CString
jUpdateRef' <- Text -> IO CString
textToCString Text
jUpdateRef
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jUpdateRef'
    Ptr Signature
author' <- b -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
author
    Ptr Signature
committer' <- c -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
committer
    CString
maybeMessageEncoding <- case Maybe Text
messageEncoding of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jMessageEncoding -> do
            CString
jMessageEncoding' <- Text -> IO CString
textToCString Text
jMessageEncoding
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jMessageEncoding'
    CString
message' <- Text -> IO CString
textToCString Text
message
    Ptr Tree
tree' <- d -> IO (Ptr Tree)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
tree
    [Ptr Commit]
parents' <- (Commit -> IO (Ptr Commit)) -> [Commit] -> IO [Ptr Commit]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM Commit -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [Commit]
parents
    Ptr (Ptr Commit)
parents'' <- [Ptr Commit] -> IO (Ptr (Ptr Commit))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packPtrArray [Ptr Commit]
parents'
    IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Signature
-> Ptr Signature
-> CString
-> CString
-> Ptr Tree
-> Ptr (Ptr Commit)
-> Int32
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_create_commit Ptr Repository
repository' CString
maybeUpdateRef Ptr Signature
author' Ptr Signature
committer' CString
maybeMessageEncoding CString
message' Ptr Tree
tree' Ptr (Ptr Commit)
parents'' Int32
parentCount
        Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
            OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
            OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
author
        c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
committer
        d -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr d
tree
        (Commit -> IO ()) -> [Commit] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Commit -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [Commit]
parents
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeUpdateRef
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeMessageEncoding
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
        Ptr (Ptr Commit) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Commit)
parents''
        Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeUpdateRef
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeMessageEncoding
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
        Ptr (Ptr Commit) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Commit)
parents''
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateCommitMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> c -> Maybe (T.Text) -> T.Text -> d -> [Ggit.Commit.Commit] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c, Ggit.Tree.IsTree d) => O.OverloadedMethod RepositoryCreateCommitMethodInfo a signature where
    overloadedMethod = repositoryCreateCommit

instance O.OverloadedMethodInfo RepositoryCreateCommitMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateCommit",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 'P.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 'P.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 t'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 t'GI.Ggit.Structs.OId.OId' of the created commit object,
    -- or 'P.Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateCommitFromIds :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepository a, IsSignature b,
 IsSignature c) =>
a
-> Maybe Text
-> b
-> c
-> Maybe Text
-> Text
-> OId
-> [OId]
-> m (Maybe OId)
repositoryCreateCommitFromIds a
repository Maybe Text
updateRef b
author c
committer Maybe Text
messageEncoding Text
message OId
tree [OId]
parents = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
    let parentCount :: Int32
parentCount = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [OId] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [OId]
parents
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
maybeUpdateRef <- case Maybe Text
updateRef of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jUpdateRef -> do
            CString
jUpdateRef' <- Text -> IO CString
textToCString Text
jUpdateRef
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jUpdateRef'
    Ptr Signature
author' <- b -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
author
    Ptr Signature
committer' <- c -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
committer
    CString
maybeMessageEncoding <- case Maybe Text
messageEncoding of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jMessageEncoding -> do
            CString
jMessageEncoding' <- Text -> IO CString
textToCString Text
jMessageEncoding
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jMessageEncoding'
    CString
message' <- Text -> IO CString
textToCString Text
message
    Ptr OId
tree' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
tree
    [Ptr OId]
parents' <- (OId -> IO (Ptr OId)) -> [OId] -> IO [Ptr OId]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [OId]
parents
    Ptr (Ptr OId)
parents'' <- [Ptr OId] -> IO (Ptr (Ptr OId))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packPtrArray [Ptr OId]
parents'
    IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Signature
-> Ptr Signature
-> CString
-> CString
-> Ptr OId
-> Ptr (Ptr OId)
-> Int32
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_create_commit_from_ids Ptr Repository
repository' CString
maybeUpdateRef Ptr Signature
author' Ptr Signature
committer' CString
maybeMessageEncoding CString
message' Ptr OId
tree' Ptr (Ptr OId)
parents'' Int32
parentCount
        Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
            OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
            OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
author
        c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
committer
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
tree
        (OId -> IO ()) -> [OId] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [OId]
parents
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeUpdateRef
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeMessageEncoding
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
        Ptr (Ptr OId) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr OId)
parents''
        Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeUpdateRef
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeMessageEncoding
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
        Ptr (Ptr OId) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr OId)
parents''
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateCommitFromIdsMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> c -> Maybe (T.Text) -> T.Text -> Ggit.OId.OId -> [Ggit.OId.OId] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => O.OverloadedMethod RepositoryCreateCommitFromIdsMethodInfo a signature where
    overloadedMethod = repositoryCreateCommitFromIds

instance O.OverloadedMethodInfo RepositoryCreateCommitFromIdsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateCommitFromIds",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 'P.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 'P.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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Maybe (b)
    -- ^ /@file@/: a t'GI.Gio.Interfaces.File.File'.
    -> Maybe (Ggit.OId.OId)
    -- ^ /@id@/: a t'GI.Ggit.Structs.OId.OId'.
    -> m (Maybe Ggit.IndexEntry.IndexEntry)
    -- ^ __Returns:__ a t'GI.Ggit.Structs.IndexEntry.IndexEntry' or 'P.Nothing' when an error occurred. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateIndexEntryForFile :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsFile b) =>
a -> Maybe b -> Maybe OId -> m (Maybe IndexEntry)
repositoryCreateIndexEntryForFile a
repository Maybe b
file Maybe OId
id = IO (Maybe IndexEntry) -> m (Maybe IndexEntry)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe IndexEntry) -> m (Maybe IndexEntry))
-> IO (Maybe IndexEntry) -> m (Maybe IndexEntry)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr File
maybeFile <- case Maybe b
file of
        Maybe b
Nothing -> Ptr File -> IO (Ptr File)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
forall a. Ptr a
nullPtr
        Just b
jFile -> do
            Ptr File
jFile' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jFile
            Ptr File -> IO (Ptr File)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jFile'
    Ptr OId
maybeId <- case Maybe OId
id of
        Maybe OId
Nothing -> Ptr OId -> IO (Ptr OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OId
forall a. Ptr a
nullPtr
        Just OId
jId -> do
            Ptr OId
jId' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
jId
            Ptr OId -> IO (Ptr OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OId
jId'
    IO (Maybe IndexEntry) -> IO () -> IO (Maybe IndexEntry)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr IndexEntry
result <- (Ptr (Ptr GError) -> IO (Ptr IndexEntry)) -> IO (Ptr IndexEntry)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr IndexEntry)) -> IO (Ptr IndexEntry))
-> (Ptr (Ptr GError) -> IO (Ptr IndexEntry)) -> IO (Ptr IndexEntry)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr File -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr IndexEntry)
ggit_repository_create_index_entry_for_file Ptr Repository
repository' Ptr File
maybeFile Ptr OId
maybeId
        Maybe IndexEntry
maybeResult <- Ptr IndexEntry
-> (Ptr IndexEntry -> IO IndexEntry) -> IO (Maybe IndexEntry)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr IndexEntry
result ((Ptr IndexEntry -> IO IndexEntry) -> IO (Maybe IndexEntry))
-> (Ptr IndexEntry -> IO IndexEntry) -> IO (Maybe IndexEntry)
forall a b. (a -> b) -> a -> b
$ \Ptr IndexEntry
result' -> do
            IndexEntry
result'' <- ((ManagedPtr IndexEntry -> IndexEntry)
-> Ptr IndexEntry -> IO IndexEntry
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr IndexEntry -> IndexEntry
Ggit.IndexEntry.IndexEntry) Ptr IndexEntry
result'
            IndexEntry -> IO IndexEntry
forall (m :: * -> *) a. Monad m => a -> m a
return IndexEntry
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
file b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        Maybe OId -> (OId -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe OId
id OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        Maybe IndexEntry -> IO (Maybe IndexEntry)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe IndexEntry
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateIndexEntryForFileMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (Ggit.OId.OId) -> m (Maybe Ggit.IndexEntry.IndexEntry)), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.OverloadedMethod RepositoryCreateIndexEntryForFileMethodInfo a signature where
    overloadedMethod = repositoryCreateIndexEntryForFile

instance O.OverloadedMethodInfo RepositoryCreateIndexEntryForFileMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateIndexEntryForFile",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 'P.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 'P.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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Maybe (T.Text)
    -- ^ /@path@/: a path.
    -> Maybe (Ggit.OId.OId)
    -- ^ /@id@/: a t'GI.Ggit.Structs.OId.OId'.
    -> m (Maybe Ggit.IndexEntry.IndexEntry)
    -- ^ __Returns:__ a t'GI.Ggit.Structs.IndexEntry.IndexEntry' or 'P.Nothing' when an error occurred. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateIndexEntryForPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Maybe Text -> Maybe OId -> m (Maybe IndexEntry)
repositoryCreateIndexEntryForPath a
repository Maybe Text
path Maybe OId
id = IO (Maybe IndexEntry) -> m (Maybe IndexEntry)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe IndexEntry) -> m (Maybe IndexEntry))
-> IO (Maybe IndexEntry) -> m (Maybe IndexEntry)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
maybePath <- case Maybe Text
path of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jPath -> do
            CString
jPath' <- Text -> IO CString
textToCString Text
jPath
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jPath'
    Ptr OId
maybeId <- case Maybe OId
id of
        Maybe OId
Nothing -> Ptr OId -> IO (Ptr OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OId
forall a. Ptr a
nullPtr
        Just OId
jId -> do
            Ptr OId
jId' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
jId
            Ptr OId -> IO (Ptr OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OId
jId'
    IO (Maybe IndexEntry) -> IO () -> IO (Maybe IndexEntry)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr IndexEntry
result <- (Ptr (Ptr GError) -> IO (Ptr IndexEntry)) -> IO (Ptr IndexEntry)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr IndexEntry)) -> IO (Ptr IndexEntry))
-> (Ptr (Ptr GError) -> IO (Ptr IndexEntry)) -> IO (Ptr IndexEntry)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr IndexEntry)
ggit_repository_create_index_entry_for_path Ptr Repository
repository' CString
maybePath Ptr OId
maybeId
        Maybe IndexEntry
maybeResult <- Ptr IndexEntry
-> (Ptr IndexEntry -> IO IndexEntry) -> IO (Maybe IndexEntry)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr IndexEntry
result ((Ptr IndexEntry -> IO IndexEntry) -> IO (Maybe IndexEntry))
-> (Ptr IndexEntry -> IO IndexEntry) -> IO (Maybe IndexEntry)
forall a b. (a -> b) -> a -> b
$ \Ptr IndexEntry
result' -> do
            IndexEntry
result'' <- ((ManagedPtr IndexEntry -> IndexEntry)
-> Ptr IndexEntry -> IO IndexEntry
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr IndexEntry -> IndexEntry
Ggit.IndexEntry.IndexEntry) Ptr IndexEntry
result'
            IndexEntry -> IO IndexEntry
forall (m :: * -> *) a. Monad m => a -> m a
return IndexEntry
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe OId -> (OId -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe OId
id OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePath
        Maybe IndexEntry -> IO (Maybe IndexEntry)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe IndexEntry
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePath
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateIndexEntryForPathMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (Ggit.OId.OId) -> m (Maybe Ggit.IndexEntry.IndexEntry)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryCreateIndexEntryForPathMethodInfo a signature where
    overloadedMethod = repositoryCreateIndexEntryForPath

instance O.OverloadedMethodInfo RepositoryCreateIndexEntryForPathMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateIndexEntryForPath",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Maybe (T.Text)
    -- ^ /@notesRef@/: canonical name of the reference to use, or 'P.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 'P.Nothing' in case of error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateNote :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepository a, IsSignature b,
 IsSignature c) =>
a -> Maybe Text -> b -> c -> OId -> Text -> Bool -> m (Maybe OId)
repositoryCreateNote a
repository Maybe Text
notesRef b
author c
committer OId
id Text
note Bool
force = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
maybeNotesRef <- case Maybe Text
notesRef of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jNotesRef -> do
            CString
jNotesRef' <- Text -> IO CString
textToCString Text
jNotesRef
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jNotesRef'
    Ptr Signature
author' <- b -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
author
    Ptr Signature
committer' <- c -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
committer
    Ptr OId
id' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
id
    CString
note' <- Text -> IO CString
textToCString Text
note
    let force' :: CInt
force' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
force
    IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Signature
-> Ptr Signature
-> Ptr OId
-> CString
-> CInt
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_create_note Ptr Repository
repository' CString
maybeNotesRef Ptr Signature
author' Ptr Signature
committer' Ptr OId
id' CString
note' CInt
force'
        Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
            OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
            OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
author
        c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
committer
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
id
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
note'
        Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
note'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateNoteMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> c -> Ggit.OId.OId -> T.Text -> Bool -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => O.OverloadedMethod RepositoryCreateNoteMethodInfo a signature where
    overloadedMethod = repositoryCreateNote

instance O.OverloadedMethodInfo RepositoryCreateNoteMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateNote",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@name@/: the name for the new t'GI.Ggit.Objects.Ref.Ref'.
    -> Ggit.OId.OId
    -- ^ /@oid@/: the t'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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> OId -> Text -> m (Maybe Ref)
repositoryCreateReference a
repository Text
name OId
oid Text
logMessage = IO (Maybe Ref) -> m (Maybe Ref)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Ref) -> m (Maybe Ref))
-> IO (Maybe Ref) -> m (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr OId
oid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oid
    CString
logMessage' <- Text -> IO CString
textToCString Text
logMessage
    IO (Maybe Ref) -> IO () -> IO (Maybe Ref)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Ref
result <- (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref))
-> (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr OId
-> CString
-> Ptr (Ptr GError)
-> IO (Ptr Ref)
ggit_repository_create_reference Ptr Repository
repository' CString
name' Ptr OId
oid' CString
logMessage'
        Maybe Ref
maybeResult <- Ptr Ref -> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Ref
result ((Ptr Ref -> IO Ref) -> IO (Maybe Ref))
-> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ \Ptr Ref
result' -> do
            Ref
result'' <- ((ManagedPtr Ref -> Ref) -> Ptr Ref -> IO Ref
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Ref -> Ref
Ggit.Ref.Ref) Ptr Ref
result'
            Ref -> IO Ref
forall (m :: * -> *) a. Monad m => a -> m a
return Ref
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oid
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
logMessage'
        Maybe Ref -> IO (Maybe Ref)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Ref
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
logMessage'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateReferenceMethodInfo
instance (signature ~ (T.Text -> Ggit.OId.OId -> T.Text -> m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryCreateReferenceMethodInfo a signature where
    overloadedMethod = repositoryCreateReference

instance O.OverloadedMethodInfo RepositoryCreateReferenceMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateReference",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 t'GI.Ggit.Objects.Remote.Remote' or 'P.Nothing' if there is an error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateRemote :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> Text -> m (Maybe Remote)
repositoryCreateRemote a
repository Text
name Text
url = IO (Maybe Remote) -> m (Maybe Remote)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Remote) -> m (Maybe Remote))
-> IO (Maybe Remote) -> m (Maybe Remote)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    CString
url' <- Text -> IO CString
textToCString Text
url
    IO (Maybe Remote) -> IO () -> IO (Maybe Remote)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Remote
result <- (Ptr (Ptr GError) -> IO (Ptr Remote)) -> IO (Ptr Remote)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Remote)) -> IO (Ptr Remote))
-> (Ptr (Ptr GError) -> IO (Ptr Remote)) -> IO (Ptr Remote)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> CString -> Ptr (Ptr GError) -> IO (Ptr Remote)
ggit_repository_create_remote Ptr Repository
repository' CString
name' CString
url'
        Maybe Remote
maybeResult <- Ptr Remote -> (Ptr Remote -> IO Remote) -> IO (Maybe Remote)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Remote
result ((Ptr Remote -> IO Remote) -> IO (Maybe Remote))
-> (Ptr Remote -> IO Remote) -> IO (Maybe Remote)
forall a b. (a -> b) -> a -> b
$ \Ptr Remote
result' -> do
            Remote
result'' <- ((ManagedPtr Remote -> Remote) -> Ptr Remote -> IO Remote
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Remote -> Remote
Ggit.Remote.Remote) Ptr Remote
result'
            Remote -> IO Remote
forall (m :: * -> *) a. Monad m => a -> m a
return Remote
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
        Maybe Remote -> IO (Maybe Remote)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Remote
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateRemoteMethodInfo
instance (signature ~ (T.Text -> T.Text -> m (Maybe Ggit.Remote.Remote)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryCreateRemoteMethodInfo a signature where
    overloadedMethod = repositoryCreateRemote

instance O.OverloadedMethodInfo RepositoryCreateRemoteMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateRemote",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@name@/: the name for the new t'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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> Text -> Text -> m (Maybe Ref)
repositoryCreateSymbolicReference a
repository Text
name Text
target Text
logMessage = IO (Maybe Ref) -> m (Maybe Ref)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Ref) -> m (Maybe Ref))
-> IO (Maybe Ref) -> m (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    CString
target' <- Text -> IO CString
textToCString Text
target
    CString
logMessage' <- Text -> IO CString
textToCString Text
logMessage
    IO (Maybe Ref) -> IO () -> IO (Maybe Ref)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Ref
result <- (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref))
-> (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> CString
-> CString
-> Ptr (Ptr GError)
-> IO (Ptr Ref)
ggit_repository_create_symbolic_reference Ptr Repository
repository' CString
name' CString
target' CString
logMessage'
        Maybe Ref
maybeResult <- Ptr Ref -> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Ref
result ((Ptr Ref -> IO Ref) -> IO (Maybe Ref))
-> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ \Ptr Ref
result' -> do
            Ref
result'' <- ((ManagedPtr Ref -> Ref) -> Ptr Ref -> IO Ref
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Ref -> Ref
Ggit.Ref.Ref) Ptr Ref
result'
            Ref -> IO Ref
forall (m :: * -> *) a. Monad m => a -> m a
return Ref
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
target'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
logMessage'
        Maybe Ref -> IO (Maybe Ref)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Ref
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
target'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
logMessage'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateSymbolicReferenceMethodInfo
instance (signature ~ (T.Text -> T.Text -> T.Text -> m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryCreateSymbolicReferenceMethodInfo a signature where
    overloadedMethod = repositoryCreateSymbolicReference

instance O.OverloadedMethodInfo RepositoryCreateSymbolicReferenceMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateSymbolicReference",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@tagName@/: the tag name.
    -> b
    -- ^ /@target@/: a t'GI.Ggit.Objects.Object.Object'.
    -> c
    -- ^ /@tagger@/: a t'GI.Ggit.Objects.Signature.Signature'.
    -> T.Text
    -- ^ /@message@/: the tag message.
    -> [Ggit.Flags.CreateFlags]
    -- ^ /@flags@/: a t'GI.Ggit.Flags.CreateFlags'.
    -> m (Maybe Ggit.OId.OId)
    -- ^ __Returns:__ the id to which the tag points, or
    --                                        'P.Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateTag :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepository a, IsObject b,
 IsSignature c) =>
a -> Text -> b -> c -> Text -> [CreateFlags] -> m (Maybe OId)
repositoryCreateTag a
repository Text
tagName b
target c
tagger Text
message [CreateFlags]
flags = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
tagName' <- Text -> IO CString
textToCString Text
tagName
    Ptr Object
target' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
    Ptr Signature
tagger' <- c -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
tagger
    CString
message' <- Text -> IO CString
textToCString Text
message
    let flags' :: CUInt
flags' = [CreateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [CreateFlags]
flags
    IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Object
-> Ptr Signature
-> CString
-> CUInt
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_create_tag Ptr Repository
repository' CString
tagName' Ptr Object
target' Ptr Signature
tagger' CString
message' CUInt
flags'
        Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
            OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
            OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
        c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
tagger
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tagName'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
        Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tagName'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateTagMethodInfo
instance (signature ~ (T.Text -> b -> c -> T.Text -> [Ggit.Flags.CreateFlags] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.Signature.IsSignature c) => O.OverloadedMethod RepositoryCreateTagMethodInfo a signature where
    overloadedMethod = repositoryCreateTag

instance O.OverloadedMethodInfo RepositoryCreateTagMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateTag",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@tagName@/: the name of the tag.
    -> b
    -- ^ /@target@/: a t'GI.Ggit.Objects.Object.Object'.
    -> c
    -- ^ /@signature@/: a t'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
    --                                        'P.Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateTagAnnotation :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepository a, IsObject b,
 IsSignature c) =>
a -> Text -> b -> c -> Text -> m (Maybe OId)
repositoryCreateTagAnnotation a
repository Text
tagName b
target c
signature Text
message = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
tagName' <- Text -> IO CString
textToCString Text
tagName
    Ptr Object
target' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
    Ptr Signature
signature' <- c -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
signature
    CString
message' <- Text -> IO CString
textToCString Text
message
    IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Object
-> Ptr Signature
-> CString
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_create_tag_annotation Ptr Repository
repository' CString
tagName' Ptr Object
target' Ptr Signature
signature' CString
message'
        Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
            OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
            OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
        c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
signature
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tagName'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
        Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tagName'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateTagAnnotationMethodInfo
instance (signature ~ (T.Text -> b -> c -> T.Text -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.Signature.IsSignature c) => O.OverloadedMethod RepositoryCreateTagAnnotationMethodInfo a signature where
    overloadedMethod = repositoryCreateTagAnnotation

instance O.OverloadedMethodInfo RepositoryCreateTagAnnotationMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateTagAnnotation",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@tag@/: the tag buffer.
    -> [Ggit.Flags.CreateFlags]
    -- ^ /@flags@/: a t'GI.Ggit.Flags.CreateFlags'.
    -> m (Maybe Ggit.OId.OId)
    -- ^ __Returns:__ the id to which the tag points, or
    --                                        'P.Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateTagFromBuffer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> [CreateFlags] -> m (Maybe OId)
repositoryCreateTagFromBuffer a
repository Text
tag [CreateFlags]
flags = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
tag' <- Text -> IO CString
textToCString Text
tag
    let flags' :: CUInt
flags' = [CreateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [CreateFlags]
flags
    IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> CUInt -> Ptr (Ptr GError) -> IO (Ptr OId)
ggit_repository_create_tag_from_buffer Ptr Repository
repository' CString
tag' CUInt
flags'
        Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
            OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
            OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tag'
        Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tag'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateTagFromBufferMethodInfo
instance (signature ~ (T.Text -> [Ggit.Flags.CreateFlags] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryCreateTagFromBufferMethodInfo a signature where
    overloadedMethod = repositoryCreateTagFromBuffer

instance O.OverloadedMethodInfo RepositoryCreateTagFromBufferMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateTagFromBuffer",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@tagName@/: the name of the tag.
    -> b
    -- ^ /@target@/: a t'GI.Ggit.Objects.Object.Object'.
    -> [Ggit.Flags.CreateFlags]
    -- ^ /@flags@/: a t'GI.Ggit.Flags.CreateFlags'.
    -> m (Maybe Ggit.OId.OId)
    -- ^ __Returns:__ the id to which the tag points, or
    --                                        'P.Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateTagLightweight :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsObject b) =>
a -> Text -> b -> [CreateFlags] -> m (Maybe OId)
repositoryCreateTagLightweight a
repository Text
tagName b
target [CreateFlags]
flags = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
tagName' <- Text -> IO CString
textToCString Text
tagName
    Ptr Object
target' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
    let flags' :: CUInt
flags' = [CreateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [CreateFlags]
flags
    IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Object
-> CUInt
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_create_tag_lightweight Ptr Repository
repository' CString
tagName' Ptr Object
target' CUInt
flags'
        Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
            OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
            OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tagName'
        Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
tagName'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateTagLightweightMethodInfo
instance (signature ~ (T.Text -> b -> [Ggit.Flags.CreateFlags] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Object.IsObject b) => O.OverloadedMethod RepositoryCreateTagLightweightMethodInfo a signature where
    overloadedMethod = repositoryCreateTagLightweight

instance O.OverloadedMethodInfo RepositoryCreateTagLightweightMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateTagLightweight",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> m (Maybe Ggit.TreeBuilder.TreeBuilder)
    -- ^ __Returns:__ a new t'GI.Ggit.Objects.TreeBuilder.TreeBuilder',
    -- or 'P.Nothing' if there was an error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateTreeBuilder :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m (Maybe TreeBuilder)
repositoryCreateTreeBuilder a
repository = IO (Maybe TreeBuilder) -> m (Maybe TreeBuilder)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TreeBuilder) -> m (Maybe TreeBuilder))
-> IO (Maybe TreeBuilder) -> m (Maybe TreeBuilder)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    IO (Maybe TreeBuilder) -> IO () -> IO (Maybe TreeBuilder)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr TreeBuilder
result <- (Ptr (Ptr GError) -> IO (Ptr TreeBuilder)) -> IO (Ptr TreeBuilder)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr TreeBuilder))
 -> IO (Ptr TreeBuilder))
-> (Ptr (Ptr GError) -> IO (Ptr TreeBuilder))
-> IO (Ptr TreeBuilder)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO (Ptr TreeBuilder)
ggit_repository_create_tree_builder Ptr Repository
repository'
        Maybe TreeBuilder
maybeResult <- Ptr TreeBuilder
-> (Ptr TreeBuilder -> IO TreeBuilder) -> IO (Maybe TreeBuilder)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr TreeBuilder
result ((Ptr TreeBuilder -> IO TreeBuilder) -> IO (Maybe TreeBuilder))
-> (Ptr TreeBuilder -> IO TreeBuilder) -> IO (Maybe TreeBuilder)
forall a b. (a -> b) -> a -> b
$ \Ptr TreeBuilder
result' -> do
            TreeBuilder
result'' <- ((ManagedPtr TreeBuilder -> TreeBuilder)
-> Ptr TreeBuilder -> IO TreeBuilder
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr TreeBuilder -> TreeBuilder
Ggit.TreeBuilder.TreeBuilder) Ptr TreeBuilder
result'
            TreeBuilder -> IO TreeBuilder
forall (m :: * -> *) a. Monad m => a -> m a
return TreeBuilder
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe TreeBuilder -> IO (Maybe TreeBuilder)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TreeBuilder
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateTreeBuilderMethodInfo
instance (signature ~ (m (Maybe Ggit.TreeBuilder.TreeBuilder)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryCreateTreeBuilderMethodInfo a signature where
    overloadedMethod = repositoryCreateTreeBuilder

instance O.OverloadedMethodInfo RepositoryCreateTreeBuilderMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateTreeBuilder",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Tree.Tree'.
    -> m (Maybe Ggit.TreeBuilder.TreeBuilder)
    -- ^ __Returns:__ a new t'GI.Ggit.Objects.TreeBuilder.TreeBuilder' object,
    -- or 'P.Nothing' if there was an error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryCreateTreeBuilderFromTree :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsTree b) =>
a -> b -> m (Maybe TreeBuilder)
repositoryCreateTreeBuilderFromTree a
repository b
tree = IO (Maybe TreeBuilder) -> m (Maybe TreeBuilder)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TreeBuilder) -> m (Maybe TreeBuilder))
-> IO (Maybe TreeBuilder) -> m (Maybe TreeBuilder)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Tree
tree' <- b -> IO (Ptr Tree)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
tree
    IO (Maybe TreeBuilder) -> IO () -> IO (Maybe TreeBuilder)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr TreeBuilder
result <- (Ptr (Ptr GError) -> IO (Ptr TreeBuilder)) -> IO (Ptr TreeBuilder)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr TreeBuilder))
 -> IO (Ptr TreeBuilder))
-> (Ptr (Ptr GError) -> IO (Ptr TreeBuilder))
-> IO (Ptr TreeBuilder)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Tree -> Ptr (Ptr GError) -> IO (Ptr TreeBuilder)
ggit_repository_create_tree_builder_from_tree Ptr Repository
repository' Ptr Tree
tree'
        Maybe TreeBuilder
maybeResult <- Ptr TreeBuilder
-> (Ptr TreeBuilder -> IO TreeBuilder) -> IO (Maybe TreeBuilder)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr TreeBuilder
result ((Ptr TreeBuilder -> IO TreeBuilder) -> IO (Maybe TreeBuilder))
-> (Ptr TreeBuilder -> IO TreeBuilder) -> IO (Maybe TreeBuilder)
forall a b. (a -> b) -> a -> b
$ \Ptr TreeBuilder
result' -> do
            TreeBuilder
result'' <- ((ManagedPtr TreeBuilder -> TreeBuilder)
-> Ptr TreeBuilder -> IO TreeBuilder
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr TreeBuilder -> TreeBuilder
Ggit.TreeBuilder.TreeBuilder) Ptr TreeBuilder
result'
            TreeBuilder -> IO TreeBuilder
forall (m :: * -> *) a. Monad m => a -> m a
return TreeBuilder
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
tree
        Maybe TreeBuilder -> IO (Maybe TreeBuilder)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TreeBuilder
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryCreateTreeBuilderFromTreeMethodInfo
instance (signature ~ (b -> m (Maybe Ggit.TreeBuilder.TreeBuilder)), MonadIO m, IsRepository a, Ggit.Tree.IsTree b) => O.OverloadedMethod RepositoryCreateTreeBuilderFromTreeMethodInfo a signature where
    overloadedMethod = repositoryCreateTreeBuilderFromTree

instance O.OverloadedMethodInfo RepositoryCreateTreeBuilderFromTreeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryCreateTreeBuilderFromTree",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@name@/: the name of the tag.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryDeleteTag :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> m ()
repositoryDeleteTag a
repository Text
name = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO CInt
ggit_repository_delete_tag Ptr Repository
repository' CString
name'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryDeleteTagMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryDeleteTagMethodInfo a signature where
    overloadedMethod = repositoryDeleteTag

instance O.OverloadedMethodInfo RepositoryDeleteTagMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryDeleteTag",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Word64 -> m ()
repositoryDropStash a
repository Word64
index = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Word64 -> Ptr (Ptr GError) -> IO ()
ggit_repository_drop_stash Ptr Repository
repository' Word64
index
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryDropStashMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryDropStashMethodInfo a signature where
    overloadedMethod = repositoryDropStash

instance O.OverloadedMethodInfo RepositoryDropStashMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryDropStash",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Ggit.Enums.BranchType
    -- ^ /@listType@/: a t'GI.Ggit.Enums.BranchType'.
    -> m (Maybe Ggit.BranchEnumerator.BranchEnumerator)
    -- ^ __Returns:__ a branch enumerator. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryEnumerateBranches :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> BranchType -> m (Maybe BranchEnumerator)
repositoryEnumerateBranches a
repository BranchType
listType = IO (Maybe BranchEnumerator) -> m (Maybe BranchEnumerator)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BranchEnumerator) -> m (Maybe BranchEnumerator))
-> IO (Maybe BranchEnumerator) -> m (Maybe BranchEnumerator)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    let listType' :: CUInt
listType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (BranchType -> Int) -> BranchType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BranchType -> Int
forall a. Enum a => a -> Int
fromEnum) BranchType
listType
    IO (Maybe BranchEnumerator) -> IO () -> IO (Maybe BranchEnumerator)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr BranchEnumerator
result <- (Ptr (Ptr GError) -> IO (Ptr BranchEnumerator))
-> IO (Ptr BranchEnumerator)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr BranchEnumerator))
 -> IO (Ptr BranchEnumerator))
-> (Ptr (Ptr GError) -> IO (Ptr BranchEnumerator))
-> IO (Ptr BranchEnumerator)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CUInt -> Ptr (Ptr GError) -> IO (Ptr BranchEnumerator)
ggit_repository_enumerate_branches Ptr Repository
repository' CUInt
listType'
        Maybe BranchEnumerator
maybeResult <- Ptr BranchEnumerator
-> (Ptr BranchEnumerator -> IO BranchEnumerator)
-> IO (Maybe BranchEnumerator)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr BranchEnumerator
result ((Ptr BranchEnumerator -> IO BranchEnumerator)
 -> IO (Maybe BranchEnumerator))
-> (Ptr BranchEnumerator -> IO BranchEnumerator)
-> IO (Maybe BranchEnumerator)
forall a b. (a -> b) -> a -> b
$ \Ptr BranchEnumerator
result' -> do
            BranchEnumerator
result'' <- ((ManagedPtr BranchEnumerator -> BranchEnumerator)
-> Ptr BranchEnumerator -> IO BranchEnumerator
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BranchEnumerator -> BranchEnumerator
Ggit.BranchEnumerator.BranchEnumerator) Ptr BranchEnumerator
result'
            BranchEnumerator -> IO BranchEnumerator
forall (m :: * -> *) a. Monad m => a -> m a
return BranchEnumerator
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe BranchEnumerator -> IO (Maybe BranchEnumerator)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BranchEnumerator
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryEnumerateBranchesMethodInfo
instance (signature ~ (Ggit.Enums.BranchType -> m (Maybe Ggit.BranchEnumerator.BranchEnumerator)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryEnumerateBranchesMethodInfo a signature where
    overloadedMethod = repositoryEnumerateBranches

instance O.OverloadedMethodInfo RepositoryEnumerateBranchesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryEnumerateBranches",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsFile b) =>
a -> b -> m [StatusFlags]
repositoryFileStatus a
repository b
location = IO [StatusFlags] -> m [StatusFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [StatusFlags] -> m [StatusFlags])
-> IO [StatusFlags] -> m [StatusFlags]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr File
location' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
location
    IO [StatusFlags] -> IO () -> IO [StatusFlags]
forall a b. IO a -> IO b -> IO a
onException (do
        CUInt
result <- (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CUInt) -> IO CUInt)
-> (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr File -> Ptr (Ptr GError) -> IO CUInt
ggit_repository_file_status Ptr Repository
repository' Ptr File
location'
        let result' :: [StatusFlags]
result' = CUInt -> [StatusFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
location
        [StatusFlags] -> IO [StatusFlags]
forall (m :: * -> *) a. Monad m => a -> m a
return [StatusFlags]
result'
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryFileStatusMethodInfo
instance (signature ~ (b -> m [Ggit.Flags.StatusFlags]), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.OverloadedMethod RepositoryFileStatusMethodInfo a signature where
    overloadedMethod = repositoryFileStatus

instance O.OverloadedMethodInfo RepositoryFileStatusMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryFileStatus",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 'P.Nothing' to get the default status options.
repositoryFileStatusForeach ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
    a
    -- ^ /@repository@/: a t'GI.Ggit.Objects.Repository.Repository'.
    -> Maybe (Ggit.StatusOptions.StatusOptions)
    -- ^ /@options@/: status options, or 'P.Nothing'.
    -> Ggit.Callbacks.StatusCallback
    -- ^ /@callback@/: a t'GI.Ggit.Callbacks.StatusCallback'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryFileStatusForeach :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Maybe StatusOptions -> StatusCallback -> m ()
repositoryFileStatusForeach a
repository Maybe StatusOptions
options StatusCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr StatusOptions
maybeOptions <- case Maybe StatusOptions
options of
        Maybe StatusOptions
Nothing -> Ptr StatusOptions -> IO (Ptr StatusOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr StatusOptions
forall a. Ptr a
nullPtr
        Just StatusOptions
jOptions -> do
            Ptr StatusOptions
jOptions' <- StatusOptions -> IO (Ptr StatusOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr StatusOptions
jOptions
            Ptr StatusOptions -> IO (Ptr StatusOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr StatusOptions
jOptions'
    FunPtr C_StatusCallback
callback' <- C_StatusCallback -> IO (FunPtr C_StatusCallback)
Ggit.Callbacks.mk_StatusCallback (Maybe (Ptr (FunPtr C_StatusCallback))
-> StatusCallback_WithClosures -> C_StatusCallback
Ggit.Callbacks.wrap_StatusCallback Maybe (Ptr (FunPtr C_StatusCallback))
forall a. Maybe a
Nothing (StatusCallback -> StatusCallback_WithClosures
Ggit.Callbacks.drop_closures_StatusCallback StatusCallback
callback))
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr StatusOptions
-> FunPtr C_StatusCallback
-> Ptr ()
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_file_status_foreach Ptr Repository
repository' Ptr StatusOptions
maybeOptions FunPtr C_StatusCallback
callback' Ptr ()
forall a. Ptr a
userData
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_StatusCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_StatusCallback
callback'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe StatusOptions -> (StatusOptions -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe StatusOptions
options StatusOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_StatusCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_StatusCallback
callback'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryFileStatusForeachMethodInfo
instance (signature ~ (Maybe (Ggit.StatusOptions.StatusOptions) -> Ggit.Callbacks.StatusCallback -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryFileStatusForeachMethodInfo a signature where
    overloadedMethod = repositoryFileStatusForeach

instance O.OverloadedMethodInfo RepositoryFileStatusForeachMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryFileStatusForeach",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> OId -> OId -> m (Word64, Word64)
repositoryGetAheadBehind a
repository OId
local OId
upstream = IO (Word64, Word64) -> m (Word64, Word64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word64, Word64) -> m (Word64, Word64))
-> IO (Word64, Word64) -> m (Word64, Word64)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr OId
local' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
local
    Ptr OId
upstream' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
upstream
    Ptr Word64
ahead <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
    Ptr Word64
behind <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
    IO (Word64, Word64) -> IO () -> IO (Word64, Word64)
forall a b. IO a -> IO b -> IO a
onException (do
        (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr OId
-> Ptr OId
-> Ptr Word64
-> Ptr Word64
-> Ptr (Ptr GError)
-> IO ()
ggit_repository_get_ahead_behind Ptr Repository
repository' Ptr OId
local' Ptr OId
upstream' Ptr Word64
ahead Ptr Word64
behind
        Word64
ahead' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
ahead
        Word64
behind' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
behind
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
local
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
upstream
        Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
ahead
        Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
behind
        (Word64, Word64) -> IO (Word64, Word64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Word64
ahead', Word64
behind')
     ) (do
        Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
ahead
        Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
behind
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryGetAheadBehindMethodInfo
instance (signature ~ (Ggit.OId.OId -> Ggit.OId.OId -> m ((Word64, Word64))), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryGetAheadBehindMethodInfo a signature where
    overloadedMethod = repositoryGetAheadBehind

instance O.OverloadedMethodInfo RepositoryGetAheadBehindMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryGetAheadBehind",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 t'GI.Ggit.Flags.AttributeCheckFlags'.
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the attribute value, or 'P.Nothing'. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryGetAttribute :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> Text -> [AttributeCheckFlags] -> m (Maybe Text)
repositoryGetAttribute a
repository Text
path Text
name [AttributeCheckFlags]
flags = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
path' <- Text -> IO CString
textToCString Text
path
    CString
name' <- Text -> IO CString
textToCString Text
name
    let flags' :: CUInt
flags' = [AttributeCheckFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [AttributeCheckFlags]
flags
    IO (Maybe Text) -> IO () -> IO (Maybe Text)
forall a b. IO a -> IO b -> IO a
onException (do
        CString
result <- (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CString) -> IO CString)
-> (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> CString -> CUInt -> Ptr (Ptr GError) -> IO CString
ggit_repository_get_attribute Ptr Repository
repository' CString
path' CString
name' CUInt
flags'
        Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
            Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
            Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryGetAttributeMethodInfo
instance (signature ~ (T.Text -> T.Text -> [Ggit.Flags.AttributeCheckFlags] -> m (Maybe T.Text)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryGetAttributeMethodInfo a signature where
    overloadedMethod = repositoryGetAttribute

instance O.OverloadedMethodInfo RepositoryGetAttributeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryGetAttribute",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> m (Maybe Ggit.Config.Config)
    -- ^ __Returns:__ a t'GI.Ggit.Objects.Config.Config'. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryGetConfig :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m (Maybe Config)
repositoryGetConfig a
repository = IO (Maybe Config) -> m (Maybe Config)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Config) -> m (Maybe Config))
-> IO (Maybe Config) -> m (Maybe Config)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    IO (Maybe Config) -> IO () -> IO (Maybe Config)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Config
result <- (Ptr (Ptr GError) -> IO (Ptr Config)) -> IO (Ptr Config)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Config)) -> IO (Ptr Config))
-> (Ptr (Ptr GError) -> IO (Ptr Config)) -> IO (Ptr Config)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO (Ptr Config)
ggit_repository_get_config Ptr Repository
repository'
        Maybe Config
maybeResult <- Ptr Config -> (Ptr Config -> IO Config) -> IO (Maybe Config)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Config
result ((Ptr Config -> IO Config) -> IO (Maybe Config))
-> (Ptr Config -> IO Config) -> IO (Maybe Config)
forall a b. (a -> b) -> a -> b
$ \Ptr Config
result' -> do
            Config
result'' <- ((ManagedPtr Config -> Config) -> Ptr Config -> IO Config
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Config -> Config
Ggit.Config.Config) Ptr Config
result'
            Config -> IO Config
forall (m :: * -> *) a. Monad m => a -> m a
return Config
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe Config -> IO (Maybe Config)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Config
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryGetConfigMethodInfo
instance (signature ~ (m (Maybe Ggit.Config.Config)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryGetConfigMethodInfo a signature where
    overloadedMethod = repositoryGetConfig

instance O.OverloadedMethodInfo RepositoryGetConfigMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryGetConfig",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the default notes reference for /@repository@/. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryGetDefaultNotesRef :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m (Maybe Text)
repositoryGetDefaultNotesRef a
repository = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    IO (Maybe Text) -> IO () -> IO (Maybe Text)
forall a b. IO a -> IO b -> IO a
onException (do
        CString
result <- (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CString) -> IO CString)
-> (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO CString
ggit_repository_get_default_notes_ref Ptr Repository
repository'
        Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
            Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
            CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
            Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryGetDefaultNotesRefMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryGetDefaultNotesRefMethodInfo a signature where
    overloadedMethod = repositoryGetDefaultNotesRef

instance O.OverloadedMethodInfo RepositoryGetDefaultNotesRefMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryGetDefaultNotesRef",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 'P.False', an error might have occurred. If so, /@error@/ will
-- be set appropriately.
repositoryGetDescendantOf ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
    a
    -- ^ /@repository@/: a t'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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> OId -> OId -> m ()
repositoryGetDescendantOf a
repository OId
commit OId
ancestor = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr OId
commit' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
commit
    Ptr OId
ancestor' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
ancestor
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr OId -> Ptr OId -> Ptr (Ptr GError) -> IO CInt
ggit_repository_get_descendant_of Ptr Repository
repository' Ptr OId
commit' Ptr OId
ancestor'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
commit
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
ancestor
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryGetDescendantOfMethodInfo
instance (signature ~ (Ggit.OId.OId -> Ggit.OId.OId -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryGetDescendantOfMethodInfo a signature where
    overloadedMethod = repositoryGetDescendantOf

instance O.OverloadedMethodInfo RepositoryGetDescendantOfMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryGetDescendantOf",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> m (Maybe Ggit.Ref.Ref)
    -- ^ __Returns:__ a t'GI.Ggit.Objects.Ref.Ref' /(Can throw 'Data.GI.Base.GError.GError')/
repositoryGetHead :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m (Maybe Ref)
repositoryGetHead a
repository = IO (Maybe Ref) -> m (Maybe Ref)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Ref) -> m (Maybe Ref))
-> IO (Maybe Ref) -> m (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    IO (Maybe Ref) -> IO () -> IO (Maybe Ref)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Ref
result <- (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref))
-> (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO (Ptr Ref)
ggit_repository_get_head Ptr Repository
repository'
        Maybe Ref
maybeResult <- Ptr Ref -> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Ref
result ((Ptr Ref -> IO Ref) -> IO (Maybe Ref))
-> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ \Ptr Ref
result' -> do
            Ref
result'' <- ((ManagedPtr Ref -> Ref) -> Ptr Ref -> IO Ref
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Ref -> Ref
Ggit.Ref.Ref) Ptr Ref
result'
            Ref -> IO Ref
forall (m :: * -> *) a. Monad m => a -> m a
return Ref
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe Ref -> IO (Maybe Ref)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Ref
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryGetHeadMethodInfo
instance (signature ~ (m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryGetHeadMethodInfo a signature where
    overloadedMethod = repositoryGetHead

instance O.OverloadedMethodInfo RepositoryGetHeadMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryGetHead",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> m (Maybe Ggit.Index.Index)
    -- ^ __Returns:__ a t'GI.Ggit.Objects.Index.Index'. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryGetIndex :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m (Maybe Index)
repositoryGetIndex a
repository = IO (Maybe Index) -> m (Maybe Index)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Index) -> m (Maybe Index))
-> IO (Maybe Index) -> m (Maybe Index)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    IO (Maybe Index) -> IO () -> IO (Maybe Index)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Index
result <- (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index))
-> (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO (Ptr Index)
ggit_repository_get_index Ptr Repository
repository'
        Maybe Index
maybeResult <- Ptr Index -> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Index
result ((Ptr Index -> IO Index) -> IO (Maybe Index))
-> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. (a -> b) -> a -> b
$ \Ptr Index
result' -> do
            Index
result'' <- ((ManagedPtr Index -> Index) -> Ptr Index -> IO Index
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Index -> Index
Ggit.Index.Index) Ptr Index
result'
            Index -> IO Index
forall (m :: * -> *) a. Monad m => a -> m a
return Index
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe Index -> IO (Maybe Index)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Index
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryGetIndexMethodInfo
instance (signature ~ (m (Maybe Ggit.Index.Index)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryGetIndexMethodInfo a signature where
    overloadedMethod = repositoryGetIndex

instance O.OverloadedMethodInfo RepositoryGetIndexMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryGetIndex",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> m (Maybe Gio.File.File)
    -- ^ __Returns:__ the location of the gitdir of the repository.
repositoryGetLocation :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m (Maybe File)
repositoryGetLocation a
repository = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr File
result <- Ptr Repository -> IO (Ptr File)
ggit_repository_get_location Ptr Repository
repository'
    Maybe File
maybeResult <- Ptr File -> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr File
result ((Ptr File -> IO File) -> IO (Maybe File))
-> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
result' -> do
        File
result'' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result'
        File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
    Maybe File -> IO (Maybe File)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
maybeResult

#if defined(ENABLE_OVERLOADING)
data RepositoryGetLocationMethodInfo
instance (signature ~ (m (Maybe Gio.File.File)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryGetLocationMethodInfo a signature where
    overloadedMethod = repositoryGetLocation

instance O.OverloadedMethodInfo RepositoryGetLocationMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryGetLocation",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 t'GI.Ggit.Flags.SubmoduleStatus' for /@submodule@/. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryGetSubmoduleStatus :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> SubmoduleIgnore -> m [SubmoduleStatus]
repositoryGetSubmoduleStatus a
repository Text
name SubmoduleIgnore
ignore = IO [SubmoduleStatus] -> m [SubmoduleStatus]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [SubmoduleStatus] -> m [SubmoduleStatus])
-> IO [SubmoduleStatus] -> m [SubmoduleStatus]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    let ignore' :: CInt
ignore' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> (SubmoduleIgnore -> Int) -> SubmoduleIgnore -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SubmoduleIgnore -> Int
forall a. Enum a => a -> Int
fromEnum) SubmoduleIgnore
ignore
    IO [SubmoduleStatus] -> IO () -> IO [SubmoduleStatus]
forall a b. IO a -> IO b -> IO a
onException (do
        CUInt
result <- (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CUInt) -> IO CUInt)
-> (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> CInt -> Ptr (Ptr GError) -> IO CUInt
ggit_repository_get_submodule_status Ptr Repository
repository' CString
name' CInt
ignore'
        let result' :: [SubmoduleStatus]
result' = CUInt -> [SubmoduleStatus]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        [SubmoduleStatus] -> IO [SubmoduleStatus]
forall (m :: * -> *) a. Monad m => a -> m a
return [SubmoduleStatus]
result'
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryGetSubmoduleStatusMethodInfo
instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleIgnore -> m [Ggit.Flags.SubmoduleStatus]), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryGetSubmoduleStatusMethodInfo a signature where
    overloadedMethod = repositoryGetSubmoduleStatus

instance O.OverloadedMethodInfo RepositoryGetSubmoduleStatusMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryGetSubmoduleStatus",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> m (Maybe Gio.File.File)
    -- ^ __Returns:__ the location of the working directory of the repository.
repositoryGetWorkdir :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m (Maybe File)
repositoryGetWorkdir a
repository = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr File
result <- Ptr Repository -> IO (Ptr File)
ggit_repository_get_workdir Ptr Repository
repository'
    Maybe File
maybeResult <- Ptr File -> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr File
result ((Ptr File -> IO File) -> IO (Maybe File))
-> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
result' -> do
        File
result'' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result'
        File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
    Maybe File -> IO (Maybe File)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
maybeResult

#if defined(ENABLE_OVERLOADING)
data RepositoryGetWorkdirMethodInfo
instance (signature ~ (m (Maybe Gio.File.File)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryGetWorkdirMethodInfo a signature where
    overloadedMethod = repositoryGetWorkdir

instance O.OverloadedMethodInfo RepositoryGetWorkdirMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryGetWorkdir",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the repository is empty.
repositoryIsBare :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m Bool
repositoryIsBare a
repository = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CInt
result <- Ptr Repository -> IO CInt
ggit_repository_is_bare Ptr Repository
repository'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data RepositoryIsBareMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryIsBareMethodInfo a signature where
    overloadedMethod = repositoryIsBare

instance O.OverloadedMethodInfo RepositoryIsBareMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryIsBare",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryIsEmpty :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m ()
repositoryIsEmpty a
repository = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO CInt
ggit_repository_is_empty Ptr Repository
repository'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryIsEmptyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryIsEmptyMethodInfo a signature where
    overloadedMethod = repositoryIsEmpty

instance O.OverloadedMethodInfo RepositoryIsEmptyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryIsEmpty",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryIsHeadDetached :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m ()
repositoryIsHeadDetached a
repository = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO CInt
ggit_repository_is_head_detached Ptr Repository
repository'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryIsHeadDetachedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryIsHeadDetachedMethodInfo a signature where
    overloadedMethod = repositoryIsHeadDetached

instance O.OverloadedMethodInfo RepositoryIsHeadDetachedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryIsHeadDetached",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryIsHeadUnborn :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m ()
repositoryIsHeadUnborn a
repository = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO CInt
ggit_repository_is_head_unborn Ptr Repository
repository'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryIsHeadUnbornMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryIsHeadUnbornMethodInfo a signature where
    overloadedMethod = repositoryIsHeadUnborn

instance O.OverloadedMethodInfo RepositoryIsHeadUnbornMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryIsHeadUnborn",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> m (Maybe [T.Text])
    -- ^ __Returns:__ a list with the remotes. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryListRemotes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m (Maybe [Text])
repositoryListRemotes a
repository = IO (Maybe [Text]) -> m (Maybe [Text])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Text]) -> m (Maybe [Text]))
-> IO (Maybe [Text]) -> m (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    IO (Maybe [Text]) -> IO () -> IO (Maybe [Text])
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO (Ptr CString)
ggit_repository_list_remotes Ptr Repository
repository'
        Maybe [Text]
maybeResult <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CString
result ((Ptr CString -> IO [Text]) -> IO (Maybe [Text]))
-> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr CString
result' -> do
            [Text]
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
            (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
            Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
            [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe [Text] -> IO (Maybe [Text])
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Text]
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryListRemotesMethodInfo
instance (signature ~ (m (Maybe [T.Text])), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryListRemotesMethodInfo a signature where
    overloadedMethod = repositoryListRemotes

instance O.OverloadedMethodInfo RepositoryListRemotesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryListRemotes",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> m (Maybe [Text])
repositoryListTags a
repository = IO (Maybe [Text]) -> m (Maybe [Text])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Text]) -> m (Maybe [Text]))
-> IO (Maybe [Text]) -> m (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    IO (Maybe [Text]) -> IO () -> IO (Maybe [Text])
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr (Ptr GError) -> IO (Ptr CString)
ggit_repository_list_tags Ptr Repository
repository'
        Maybe [Text]
maybeResult <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CString
result ((Ptr CString -> IO [Text]) -> IO (Maybe [Text]))
-> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr CString
result' -> do
            [Text]
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
            (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
            Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
            [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe [Text] -> IO (Maybe [Text])
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Text]
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryListTagsMethodInfo
instance (signature ~ (m (Maybe [T.Text])), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryListTagsMethodInfo a signature where
    overloadedMethod = repositoryListTags

instance O.OverloadedMethodInfo RepositoryListTagsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryListTags",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Maybe Text -> m (Maybe [Text])
repositoryListTagsMatch a
repository Maybe Text
pattern = IO (Maybe [Text]) -> m (Maybe [Text])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Text]) -> m (Maybe [Text]))
-> IO (Maybe [Text]) -> m (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
maybePattern <- case Maybe Text
pattern of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jPattern -> do
            CString
jPattern' <- Text -> IO CString
textToCString Text
jPattern
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jPattern'
    IO (Maybe [Text]) -> IO () -> IO (Maybe [Text])
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr CString)
ggit_repository_list_tags_match Ptr Repository
repository' CString
maybePattern
        Maybe [Text]
maybeResult <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CString
result ((Ptr CString -> IO [Text]) -> IO (Maybe [Text]))
-> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr CString
result' -> do
            [Text]
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
            (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
            Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
            [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePattern
        Maybe [Text] -> IO (Maybe [Text])
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Text]
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePattern
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryListTagsMatchMethodInfo
instance (signature ~ (Maybe (T.Text) -> m (Maybe [T.Text])), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryListTagsMatchMethodInfo a signature where
    overloadedMethod = repositoryListTagsMatch

instance O.OverloadedMethodInfo RepositoryListTagsMatchMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryListTagsMatch",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Ggit.OId.OId
    -- ^ /@oid@/: a t'GI.Ggit.Structs.OId.OId'.
    -> GType
    -- ^ /@gtype@/: a t'GType'.
    -> m (Maybe Ggit.Object.Object)
    -- ^ __Returns:__ the found t'GI.Ggit.Objects.Object.Object', or 'P.Nothing' on error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryLookup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> OId -> GType -> m (Maybe Object)
repositoryLookup a
repository OId
oid GType
gtype = IO (Maybe Object) -> m (Maybe Object)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Object) -> m (Maybe Object))
-> IO (Maybe Object) -> m (Maybe Object)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr OId
oid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oid
    let gtype' :: Word64
gtype' = GType -> Word64
gtypeToCGType GType
gtype
    IO (Maybe Object) -> IO () -> IO (Maybe Object)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Object
result <- (Ptr (Ptr GError) -> IO (Ptr Object)) -> IO (Ptr Object)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Object)) -> IO (Ptr Object))
-> (Ptr (Ptr GError) -> IO (Ptr Object)) -> IO (Ptr Object)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr OId -> Word64 -> Ptr (Ptr GError) -> IO (Ptr Object)
ggit_repository_lookup Ptr Repository
repository' Ptr OId
oid' Word64
gtype'
        Maybe Object
maybeResult <- Ptr Object -> (Ptr Object -> IO Object) -> IO (Maybe Object)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Object
result ((Ptr Object -> IO Object) -> IO (Maybe Object))
-> (Ptr Object -> IO Object) -> IO (Maybe Object)
forall a b. (a -> b) -> a -> b
$ \Ptr Object
result' -> do
            Object
result'' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Object -> Object
Ggit.Object.Object) Ptr Object
result'
            Object -> IO Object
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oid
        Maybe Object -> IO (Maybe Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Object
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryLookupMethodInfo
instance (signature ~ (Ggit.OId.OId -> GType -> m (Maybe Ggit.Object.Object)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryLookupMethodInfo a signature where
    overloadedMethod = repositoryLookup

instance O.OverloadedMethodInfo RepositoryLookupMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryLookup",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Ggit.OId.OId
    -- ^ /@oid@/: a t'GI.Ggit.Structs.OId.OId'.
    -> m (Maybe Ggit.Blob.Blob)
    -- ^ __Returns:__ a @/GgitBlog/@ pointer. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryLookupBlob :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> OId -> m (Maybe Blob)
repositoryLookupBlob a
repository OId
oid = IO (Maybe Blob) -> m (Maybe Blob)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Blob) -> m (Maybe Blob))
-> IO (Maybe Blob) -> m (Maybe Blob)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr OId
oid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oid
    IO (Maybe Blob) -> IO () -> IO (Maybe Blob)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Blob
result <- (Ptr (Ptr GError) -> IO (Ptr Blob)) -> IO (Ptr Blob)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Blob)) -> IO (Ptr Blob))
-> (Ptr (Ptr GError) -> IO (Ptr Blob)) -> IO (Ptr Blob)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr Blob)
ggit_repository_lookup_blob Ptr Repository
repository' Ptr OId
oid'
        Maybe Blob
maybeResult <- Ptr Blob -> (Ptr Blob -> IO Blob) -> IO (Maybe Blob)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Blob
result ((Ptr Blob -> IO Blob) -> IO (Maybe Blob))
-> (Ptr Blob -> IO Blob) -> IO (Maybe Blob)
forall a b. (a -> b) -> a -> b
$ \Ptr Blob
result' -> do
            Blob
result'' <- ((ManagedPtr Blob -> Blob) -> Ptr Blob -> IO Blob
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Blob -> Blob
Ggit.Blob.Blob) Ptr Blob
result'
            Blob -> IO Blob
forall (m :: * -> *) a. Monad m => a -> m a
return Blob
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oid
        Maybe Blob -> IO (Maybe Blob)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Blob
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryLookupBlobMethodInfo
instance (signature ~ (Ggit.OId.OId -> m (Maybe Ggit.Blob.Blob)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryLookupBlobMethodInfo a signature where
    overloadedMethod = repositoryLookupBlob

instance O.OverloadedMethodInfo RepositoryLookupBlobMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryLookupBlob",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@branchName@/: the name of the branch.
    -> Ggit.Enums.BranchType
    -- ^ /@branchType@/: a t'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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> BranchType -> m (Maybe Branch)
repositoryLookupBranch a
repository Text
branchName BranchType
branchType = IO (Maybe Branch) -> m (Maybe Branch)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Branch) -> m (Maybe Branch))
-> IO (Maybe Branch) -> m (Maybe Branch)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
branchName' <- Text -> IO CString
textToCString Text
branchName
    let branchType' :: CUInt
branchType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (BranchType -> Int) -> BranchType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BranchType -> Int
forall a. Enum a => a -> Int
fromEnum) BranchType
branchType
    IO (Maybe Branch) -> IO () -> IO (Maybe Branch)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Branch
result <- (Ptr (Ptr GError) -> IO (Ptr Branch)) -> IO (Ptr Branch)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Branch)) -> IO (Ptr Branch))
-> (Ptr (Ptr GError) -> IO (Ptr Branch)) -> IO (Ptr Branch)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> CUInt -> Ptr (Ptr GError) -> IO (Ptr Branch)
ggit_repository_lookup_branch Ptr Repository
repository' CString
branchName' CUInt
branchType'
        Maybe Branch
maybeResult <- Ptr Branch -> (Ptr Branch -> IO Branch) -> IO (Maybe Branch)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Branch
result ((Ptr Branch -> IO Branch) -> IO (Maybe Branch))
-> (Ptr Branch -> IO Branch) -> IO (Maybe Branch)
forall a b. (a -> b) -> a -> b
$ \Ptr Branch
result' -> do
            Branch
result'' <- ((ManagedPtr Branch -> Branch) -> Ptr Branch -> IO Branch
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Branch -> Branch
Ggit.Branch.Branch) Ptr Branch
result'
            Branch -> IO Branch
forall (m :: * -> *) a. Monad m => a -> m a
return Branch
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
branchName'
        Maybe Branch -> IO (Maybe Branch)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Branch
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
branchName'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryLookupBranchMethodInfo
instance (signature ~ (T.Text -> Ggit.Enums.BranchType -> m (Maybe Ggit.Branch.Branch)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryLookupBranchMethodInfo a signature where
    overloadedMethod = repositoryLookupBranch

instance O.OverloadedMethodInfo RepositoryLookupBranchMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryLookupBranch",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Ggit.OId.OId
    -- ^ /@oid@/: a t'GI.Ggit.Structs.OId.OId'.
    -> m (Maybe Ggit.Commit.Commit)
    -- ^ __Returns:__ a t'GI.Ggit.Objects.Commit.Commit' pointer. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryLookupCommit :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> OId -> m (Maybe Commit)
repositoryLookupCommit a
repository OId
oid = IO (Maybe Commit) -> m (Maybe Commit)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Commit) -> m (Maybe Commit))
-> IO (Maybe Commit) -> m (Maybe Commit)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr OId
oid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oid
    IO (Maybe Commit) -> IO () -> IO (Maybe Commit)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Commit
result <- (Ptr (Ptr GError) -> IO (Ptr Commit)) -> IO (Ptr Commit)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Commit)) -> IO (Ptr Commit))
-> (Ptr (Ptr GError) -> IO (Ptr Commit)) -> IO (Ptr Commit)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr Commit)
ggit_repository_lookup_commit Ptr Repository
repository' Ptr OId
oid'
        Maybe Commit
maybeResult <- Ptr Commit -> (Ptr Commit -> IO Commit) -> IO (Maybe Commit)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Commit
result ((Ptr Commit -> IO Commit) -> IO (Maybe Commit))
-> (Ptr Commit -> IO Commit) -> IO (Maybe Commit)
forall a b. (a -> b) -> a -> b
$ \Ptr Commit
result' -> do
            Commit
result'' <- ((ManagedPtr Commit -> Commit) -> Ptr Commit -> IO Commit
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Commit -> Commit
Ggit.Commit.Commit) Ptr Commit
result'
            Commit -> IO Commit
forall (m :: * -> *) a. Monad m => a -> m a
return Commit
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oid
        Maybe Commit -> IO (Maybe Commit)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Commit
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryLookupCommitMethodInfo
instance (signature ~ (Ggit.OId.OId -> m (Maybe Ggit.Commit.Commit)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryLookupCommitMethodInfo a signature where
    overloadedMethod = repositoryLookupCommit

instance O.OverloadedMethodInfo RepositoryLookupCommitMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryLookupCommit",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 t'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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> m (Maybe Ref)
repositoryLookupReference a
repository Text
name = IO (Maybe Ref) -> m (Maybe Ref)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Ref) -> m (Maybe Ref))
-> IO (Maybe Ref) -> m (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    IO (Maybe Ref) -> IO () -> IO (Maybe Ref)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Ref
result <- (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref))
-> (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr Ref)
ggit_repository_lookup_reference Ptr Repository
repository' CString
name'
        Maybe Ref
maybeResult <- Ptr Ref -> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Ref
result ((Ptr Ref -> IO Ref) -> IO (Maybe Ref))
-> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ \Ptr Ref
result' -> do
            Ref
result'' <- ((ManagedPtr Ref -> Ref) -> Ptr Ref -> IO Ref
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Ref -> Ref
Ggit.Ref.Ref) Ptr Ref
result'
            Ref -> IO Ref
forall (m :: * -> *) a. Monad m => a -> m a
return Ref
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        Maybe Ref -> IO (Maybe Ref)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Ref
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryLookupReferenceMethodInfo
instance (signature ~ (T.Text -> m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryLookupReferenceMethodInfo a signature where
    overloadedMethod = repositoryLookupReference

instance O.OverloadedMethodInfo RepositoryLookupReferenceMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryLookupReference",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 t'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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> m (Maybe Ref)
repositoryLookupReferenceDwim a
repository Text
shortName = IO (Maybe Ref) -> m (Maybe Ref)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Ref) -> m (Maybe Ref))
-> IO (Maybe Ref) -> m (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
shortName' <- Text -> IO CString
textToCString Text
shortName
    IO (Maybe Ref) -> IO () -> IO (Maybe Ref)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Ref
result <- (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref))
-> (Ptr (Ptr GError) -> IO (Ptr Ref)) -> IO (Ptr Ref)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr Ref)
ggit_repository_lookup_reference_dwim Ptr Repository
repository' CString
shortName'
        Maybe Ref
maybeResult <- Ptr Ref -> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Ref
result ((Ptr Ref -> IO Ref) -> IO (Maybe Ref))
-> (Ptr Ref -> IO Ref) -> IO (Maybe Ref)
forall a b. (a -> b) -> a -> b
$ \Ptr Ref
result' -> do
            Ref
result'' <- ((ManagedPtr Ref -> Ref) -> Ptr Ref -> IO Ref
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Ref -> Ref
Ggit.Ref.Ref) Ptr Ref
result'
            Ref -> IO Ref
forall (m :: * -> *) a. Monad m => a -> m a
return Ref
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
shortName'
        Maybe Ref -> IO (Maybe Ref)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Ref
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
shortName'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryLookupReferenceDwimMethodInfo
instance (signature ~ (T.Text -> m (Maybe Ggit.Ref.Ref)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryLookupReferenceDwimMethodInfo a signature where
    overloadedMethod = repositoryLookupReferenceDwim

instance O.OverloadedMethodInfo RepositoryLookupReferenceDwimMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryLookupReferenceDwim",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@name@/: the remote\'s name.
    -> m (Maybe Ggit.Remote.Remote)
    -- ^ __Returns:__ a new t'GI.Ggit.Objects.Remote.Remote' or 'P.Nothing' if there is an error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryLookupRemote :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> m (Maybe Remote)
repositoryLookupRemote a
repository Text
name = IO (Maybe Remote) -> m (Maybe Remote)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Remote) -> m (Maybe Remote))
-> IO (Maybe Remote) -> m (Maybe Remote)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    IO (Maybe Remote) -> IO () -> IO (Maybe Remote)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Remote
result <- (Ptr (Ptr GError) -> IO (Ptr Remote)) -> IO (Ptr Remote)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Remote)) -> IO (Ptr Remote))
-> (Ptr (Ptr GError) -> IO (Ptr Remote)) -> IO (Ptr Remote)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr Remote)
ggit_repository_lookup_remote Ptr Repository
repository' CString
name'
        Maybe Remote
maybeResult <- Ptr Remote -> (Ptr Remote -> IO Remote) -> IO (Maybe Remote)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Remote
result ((Ptr Remote -> IO Remote) -> IO (Maybe Remote))
-> (Ptr Remote -> IO Remote) -> IO (Maybe Remote)
forall a b. (a -> b) -> a -> b
$ \Ptr Remote
result' -> do
            Remote
result'' <- ((ManagedPtr Remote -> Remote) -> Ptr Remote -> IO Remote
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Remote -> Remote
Ggit.Remote.Remote) Ptr Remote
result'
            Remote -> IO Remote
forall (m :: * -> *) a. Monad m => a -> m a
return Remote
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        Maybe Remote -> IO (Maybe Remote)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Remote
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryLookupRemoteMethodInfo
instance (signature ~ (T.Text -> m (Maybe Ggit.Remote.Remote)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryLookupRemoteMethodInfo a signature where
    overloadedMethod = repositoryLookupRemote

instance O.OverloadedMethodInfo RepositoryLookupRemoteMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryLookupRemote",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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, 'P.Nothing' is returned and a GGIT_ERROR_NOTFOUND error set.
repositoryLookupSubmodule ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
    a
    -- ^ /@repository@/: a t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@name@/: the name of the submodule.
    -> m (Maybe Ggit.Submodule.Submodule)
    -- ^ __Returns:__ a newly-allocated t'GI.Ggit.Structs.Submodule.Submodule'. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryLookupSubmodule :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> m (Maybe Submodule)
repositoryLookupSubmodule a
repository Text
name = IO (Maybe Submodule) -> m (Maybe Submodule)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Submodule) -> m (Maybe Submodule))
-> IO (Maybe Submodule) -> m (Maybe Submodule)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    IO (Maybe Submodule) -> IO () -> IO (Maybe Submodule)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Submodule
result <- (Ptr (Ptr GError) -> IO (Ptr Submodule)) -> IO (Ptr Submodule)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Submodule)) -> IO (Ptr Submodule))
-> (Ptr (Ptr GError) -> IO (Ptr Submodule)) -> IO (Ptr Submodule)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr Submodule)
ggit_repository_lookup_submodule Ptr Repository
repository' CString
name'
        Maybe Submodule
maybeResult <- Ptr Submodule
-> (Ptr Submodule -> IO Submodule) -> IO (Maybe Submodule)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Submodule
result ((Ptr Submodule -> IO Submodule) -> IO (Maybe Submodule))
-> (Ptr Submodule -> IO Submodule) -> IO (Maybe Submodule)
forall a b. (a -> b) -> a -> b
$ \Ptr Submodule
result' -> do
            Submodule
result'' <- ((ManagedPtr Submodule -> Submodule)
-> Ptr Submodule -> IO Submodule
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Submodule -> Submodule
Ggit.Submodule.Submodule) Ptr Submodule
result'
            Submodule -> IO Submodule
forall (m :: * -> *) a. Monad m => a -> m a
return Submodule
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        Maybe Submodule -> IO (Maybe Submodule)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Submodule
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryLookupSubmoduleMethodInfo
instance (signature ~ (T.Text -> m (Maybe Ggit.Submodule.Submodule)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryLookupSubmoduleMethodInfo a signature where
    overloadedMethod = repositoryLookupSubmodule

instance O.OverloadedMethodInfo RepositoryLookupSubmoduleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryLookupSubmodule",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Ggit.OId.OId
    -- ^ /@oid@/: a t'GI.Ggit.Structs.OId.OId'.
    -> m (Maybe Ggit.Tag.Tag)
    -- ^ __Returns:__ a t'GI.Ggit.Objects.Tag.Tag' pointer. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryLookupTag :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> OId -> m (Maybe Tag)
repositoryLookupTag a
repository OId
oid = IO (Maybe Tag) -> m (Maybe Tag)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Tag) -> m (Maybe Tag))
-> IO (Maybe Tag) -> m (Maybe Tag)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr OId
oid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oid
    IO (Maybe Tag) -> IO () -> IO (Maybe Tag)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Tag
result <- (Ptr (Ptr GError) -> IO (Ptr Tag)) -> IO (Ptr Tag)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Tag)) -> IO (Ptr Tag))
-> (Ptr (Ptr GError) -> IO (Ptr Tag)) -> IO (Ptr Tag)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr Tag)
ggit_repository_lookup_tag Ptr Repository
repository' Ptr OId
oid'
        Maybe Tag
maybeResult <- Ptr Tag -> (Ptr Tag -> IO Tag) -> IO (Maybe Tag)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Tag
result ((Ptr Tag -> IO Tag) -> IO (Maybe Tag))
-> (Ptr Tag -> IO Tag) -> IO (Maybe Tag)
forall a b. (a -> b) -> a -> b
$ \Ptr Tag
result' -> do
            Tag
result'' <- ((ManagedPtr Tag -> Tag) -> Ptr Tag -> IO Tag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Tag -> Tag
Ggit.Tag.Tag) Ptr Tag
result'
            Tag -> IO Tag
forall (m :: * -> *) a. Monad m => a -> m a
return Tag
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oid
        Maybe Tag -> IO (Maybe Tag)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Tag
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryLookupTagMethodInfo
instance (signature ~ (Ggit.OId.OId -> m (Maybe Ggit.Tag.Tag)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryLookupTagMethodInfo a signature where
    overloadedMethod = repositoryLookupTag

instance O.OverloadedMethodInfo RepositoryLookupTagMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryLookupTag",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Ggit.OId.OId
    -- ^ /@oid@/: a t'GI.Ggit.Structs.OId.OId'.
    -> m (Maybe Ggit.Tree.Tree)
    -- ^ __Returns:__ a t'GI.Ggit.Objects.Tree.Tree' pointer. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryLookupTree :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> OId -> m (Maybe Tree)
repositoryLookupTree a
repository OId
oid = IO (Maybe Tree) -> m (Maybe Tree)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Tree) -> m (Maybe Tree))
-> IO (Maybe Tree) -> m (Maybe Tree)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr OId
oid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oid
    IO (Maybe Tree) -> IO () -> IO (Maybe Tree)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Tree
result <- (Ptr (Ptr GError) -> IO (Ptr Tree)) -> IO (Ptr Tree)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Tree)) -> IO (Ptr Tree))
-> (Ptr (Ptr GError) -> IO (Ptr Tree)) -> IO (Ptr Tree)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr Tree)
ggit_repository_lookup_tree Ptr Repository
repository' Ptr OId
oid'
        Maybe Tree
maybeResult <- Ptr Tree -> (Ptr Tree -> IO Tree) -> IO (Maybe Tree)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Tree
result ((Ptr Tree -> IO Tree) -> IO (Maybe Tree))
-> (Ptr Tree -> IO Tree) -> IO (Maybe Tree)
forall a b. (a -> b) -> a -> b
$ \Ptr Tree
result' -> do
            Tree
result'' <- ((ManagedPtr Tree -> Tree) -> Ptr Tree -> IO Tree
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Tree -> Tree
Ggit.Tree.Tree) Ptr Tree
result'
            Tree -> IO Tree
forall (m :: * -> *) a. Monad m => a -> m a
return Tree
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oid
        Maybe Tree -> IO (Maybe Tree)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Tree
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryLookupTreeMethodInfo
instance (signature ~ (Ggit.OId.OId -> m (Maybe Ggit.Tree.Tree)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryLookupTreeMethodInfo a signature where
    overloadedMethod = repositoryLookupTree

instance O.OverloadedMethodInfo RepositoryLookupTreeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryLookupTree",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v:repositoryLookupTree"
        })


#endif

-- method Repository::merge
-- 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 = "their_heads"
--           , argType =
--               TCArray
--                 False
--                 (-1)
--                 2
--                 (TInterface Name { namespace = "Ggit" , name = "AnnotatedCommit" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the heads to merge into"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "their_heads_length"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the length of their_heads"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "merge_opts"
--           , argType =
--               TInterface Name { namespace = "Ggit" , name = "MergeOptions" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "merge options" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "checkout_opts"
--           , argType =
--               TInterface Name { namespace = "Ggit" , name = "CheckoutOptions" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "checkout options" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "their_heads_length"
--              , argType = TBasicType TUInt64
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "the length of their_heads"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : True
-- Skip return : False

foreign import ccall "ggit_repository_merge" ggit_repository_merge :: 
    Ptr Repository ->                       -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"})
    Ptr (Ptr Ggit.AnnotatedCommit.AnnotatedCommit) -> -- their_heads : TCArray False (-1) 2 (TInterface (Name {namespace = "Ggit", name = "AnnotatedCommit"}))
    Word64 ->                               -- their_heads_length : TBasicType TUInt64
    Ptr Ggit.MergeOptions.MergeOptions ->   -- merge_opts : TInterface (Name {namespace = "Ggit", name = "MergeOptions"})
    Ptr Ggit.CheckoutOptions.CheckoutOptions -> -- checkout_opts : TInterface (Name {namespace = "Ggit", name = "CheckoutOptions"})
    Ptr (Ptr GError) ->                     -- error
    IO ()

-- | Merges the given commit(s) into HEAD, writing the results into the working directory.
-- Any changes are staged for commit and any conflicts are written to the index.
-- 
-- Callers should inspect the repository\'s index after this completes, resolve any conflicts and prepare a commit.
repositoryMerge ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepository a, Ggit.CheckoutOptions.IsCheckoutOptions b) =>
    a
    -- ^ /@repository@/: a t'GI.Ggit.Objects.Repository.Repository'.
    -> [Ggit.AnnotatedCommit.AnnotatedCommit]
    -- ^ /@theirHeads@/: the heads to merge into
    -> Ggit.MergeOptions.MergeOptions
    -- ^ /@mergeOpts@/: merge options
    -> b
    -- ^ /@checkoutOpts@/: checkout options
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryMerge :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsCheckoutOptions b) =>
a -> [AnnotatedCommit] -> MergeOptions -> b -> m ()
repositoryMerge a
repository [AnnotatedCommit]
theirHeads MergeOptions
mergeOpts b
checkoutOpts = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let theirHeadsLength :: Word64
theirHeadsLength = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ [AnnotatedCommit] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [AnnotatedCommit]
theirHeads
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    [Ptr AnnotatedCommit]
theirHeads' <- (AnnotatedCommit -> IO (Ptr AnnotatedCommit))
-> [AnnotatedCommit] -> IO [Ptr AnnotatedCommit]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [AnnotatedCommit]
theirHeads
    Ptr (Ptr AnnotatedCommit)
theirHeads'' <- [Ptr AnnotatedCommit] -> IO (Ptr (Ptr AnnotatedCommit))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packPtrArray [Ptr AnnotatedCommit]
theirHeads'
    Ptr MergeOptions
mergeOpts' <- MergeOptions -> IO (Ptr MergeOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MergeOptions
mergeOpts
    Ptr CheckoutOptions
checkoutOpts' <- b -> IO (Ptr CheckoutOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
checkoutOpts
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr (Ptr AnnotatedCommit)
-> Word64
-> Ptr MergeOptions
-> Ptr CheckoutOptions
-> Ptr (Ptr GError)
-> IO ()
ggit_repository_merge Ptr Repository
repository' Ptr (Ptr AnnotatedCommit)
theirHeads'' Word64
theirHeadsLength Ptr MergeOptions
mergeOpts' Ptr CheckoutOptions
checkoutOpts'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        (AnnotatedCommit -> IO ()) -> [AnnotatedCommit] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ AnnotatedCommit -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [AnnotatedCommit]
theirHeads
        MergeOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MergeOptions
mergeOpts
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
checkoutOpts
        Ptr (Ptr AnnotatedCommit) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr AnnotatedCommit)
theirHeads''
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        Ptr (Ptr AnnotatedCommit) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr AnnotatedCommit)
theirHeads''
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryMergeMethodInfo
instance (signature ~ ([Ggit.AnnotatedCommit.AnnotatedCommit] -> Ggit.MergeOptions.MergeOptions -> b -> m ()), MonadIO m, IsRepository a, Ggit.CheckoutOptions.IsCheckoutOptions b) => O.OverloadedMethod RepositoryMergeMethodInfo a signature where
    overloadedMethod = repositoryMerge

instance O.OverloadedMethodInfo RepositoryMergeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryMerge",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v:repositoryMerge"
        })


#endif

-- method Repository::merge_base
-- 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_one"
--           , argType = TInterface Name { namespace = "Ggit" , name = "OId" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the oid of one of the commits."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "oid_two"
--           , argType = TInterface Name { namespace = "Ggit" , name = "OId" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the oid of the second of the commits"
--                 , 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_merge_base" ggit_repository_merge_base :: 
    Ptr Repository ->                       -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"})
    Ptr Ggit.OId.OId ->                     -- oid_one : TInterface (Name {namespace = "Ggit", name = "OId"})
    Ptr Ggit.OId.OId ->                     -- oid_two : TInterface (Name {namespace = "Ggit", name = "OId"})
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr Ggit.OId.OId)

-- | Find the merge base between two commits
repositoryMergeBase ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
    a
    -- ^ /@repository@/: a t'GI.Ggit.Objects.Repository.Repository'.
    -> Ggit.OId.OId
    -- ^ /@oidOne@/: the oid of one of the commits.
    -> Ggit.OId.OId
    -- ^ /@oidTwo@/: the oid of the second of the commits
    -> m (Maybe Ggit.OId.OId)
    -- ^ __Returns:__ a new t'GI.Ggit.Structs.OId.OId' or 'P.Nothing' if an error occurred. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryMergeBase :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> OId -> OId -> m (Maybe OId)
repositoryMergeBase a
repository OId
oidOne OId
oidTwo = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr OId
oidOne' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oidOne
    Ptr OId
oidTwo' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oidTwo
    IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr OId -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr OId)
ggit_repository_merge_base Ptr Repository
repository' Ptr OId
oidOne' Ptr OId
oidTwo'
        Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
            OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
            OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oidOne
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oidTwo
        Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryMergeBaseMethodInfo
instance (signature ~ (Ggit.OId.OId -> Ggit.OId.OId -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryMergeBaseMethodInfo a signature where
    overloadedMethod = repositoryMergeBase

instance O.OverloadedMethodInfo RepositoryMergeBaseMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryMergeBase",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v:repositoryMergeBase"
        })


#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 t'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 t'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 t'GI.Ggit.Objects.Index.Index' or 'P.Nothing' if an error occurred. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryMergeCommits :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepository a, IsCommit b,
 IsCommit c) =>
a -> b -> c -> MergeOptions -> m (Maybe Index)
repositoryMergeCommits a
repository b
ourCommit c
theirCommit MergeOptions
mergeOptions = IO (Maybe Index) -> m (Maybe Index)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Index) -> m (Maybe Index))
-> IO (Maybe Index) -> m (Maybe Index)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Commit
ourCommit' <- b -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
ourCommit
    Ptr Commit
theirCommit' <- c -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
theirCommit
    Ptr MergeOptions
mergeOptions' <- MergeOptions -> IO (Ptr MergeOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MergeOptions
mergeOptions
    IO (Maybe Index) -> IO () -> IO (Maybe Index)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Index
result <- (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index))
-> (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Commit
-> Ptr Commit
-> Ptr MergeOptions
-> Ptr (Ptr GError)
-> IO (Ptr Index)
ggit_repository_merge_commits Ptr Repository
repository' Ptr Commit
ourCommit' Ptr Commit
theirCommit' Ptr MergeOptions
mergeOptions'
        Maybe Index
maybeResult <- Ptr Index -> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Index
result ((Ptr Index -> IO Index) -> IO (Maybe Index))
-> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. (a -> b) -> a -> b
$ \Ptr Index
result' -> do
            Index
result'' <- ((ManagedPtr Index -> Index) -> Ptr Index -> IO Index
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Index -> Index
Ggit.Index.Index) Ptr Index
result'
            Index -> IO Index
forall (m :: * -> *) a. Monad m => a -> m a
return Index
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
ourCommit
        c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
theirCommit
        MergeOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MergeOptions
mergeOptions
        Maybe Index -> IO (Maybe Index)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Index
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryMergeCommitsMethodInfo
instance (signature ~ (b -> c -> Ggit.MergeOptions.MergeOptions -> m (Maybe Ggit.Index.Index)), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b, Ggit.Commit.IsCommit c) => O.OverloadedMethod RepositoryMergeCommitsMethodInfo a signature where
    overloadedMethod = repositoryMergeCommits

instance O.OverloadedMethodInfo RepositoryMergeCommitsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryMergeCommits",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 t'GI.Ggit.Objects.Repository.Repository'.
    -> b
    -- ^ /@ancestorTree@/: the common ancestor between the trees, or 'P.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 t'GI.Ggit.Objects.Index.Index' or 'P.Nothing' if an error occurred. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryMergeTrees :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsRepository a, IsTree b, IsTree c,
 IsTree d) =>
a -> b -> c -> d -> MergeOptions -> m (Maybe Index)
repositoryMergeTrees a
repository b
ancestorTree c
ourTree d
theirTree MergeOptions
mergeOptions = IO (Maybe Index) -> m (Maybe Index)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Index) -> m (Maybe Index))
-> IO (Maybe Index) -> m (Maybe Index)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Tree
ancestorTree' <- b -> IO (Ptr Tree)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
ancestorTree
    Ptr Tree
ourTree' <- c -> IO (Ptr Tree)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
ourTree
    Ptr Tree
theirTree' <- d -> IO (Ptr Tree)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
theirTree
    Ptr MergeOptions
mergeOptions' <- MergeOptions -> IO (Ptr MergeOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MergeOptions
mergeOptions
    IO (Maybe Index) -> IO () -> IO (Maybe Index)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Index
result <- (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index))
-> (Ptr (Ptr GError) -> IO (Ptr Index)) -> IO (Ptr Index)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Tree
-> Ptr Tree
-> Ptr Tree
-> Ptr MergeOptions
-> Ptr (Ptr GError)
-> IO (Ptr Index)
ggit_repository_merge_trees Ptr Repository
repository' Ptr Tree
ancestorTree' Ptr Tree
ourTree' Ptr Tree
theirTree' Ptr MergeOptions
mergeOptions'
        Maybe Index
maybeResult <- Ptr Index -> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Index
result ((Ptr Index -> IO Index) -> IO (Maybe Index))
-> (Ptr Index -> IO Index) -> IO (Maybe Index)
forall a b. (a -> b) -> a -> b
$ \Ptr Index
result' -> do
            Index
result'' <- ((ManagedPtr Index -> Index) -> Ptr Index -> IO Index
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Index -> Index
Ggit.Index.Index) Ptr Index
result'
            Index -> IO Index
forall (m :: * -> *) a. Monad m => a -> m a
return Index
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
ancestorTree
        c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
ourTree
        d -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr d
theirTree
        MergeOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MergeOptions
mergeOptions
        Maybe Index -> IO (Maybe Index)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Index
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryMergeTreesMethodInfo
instance (signature ~ (b -> c -> d -> Ggit.MergeOptions.MergeOptions -> m (Maybe Ggit.Index.Index)), MonadIO m, IsRepository a, Ggit.Tree.IsTree b, Ggit.Tree.IsTree c, Ggit.Tree.IsTree d) => O.OverloadedMethod RepositoryMergeTreesMethodInfo a signature where
    overloadedMethod = repositoryMergeTrees

instance O.OverloadedMethodInfo RepositoryMergeTreesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryMergeTrees",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Maybe (T.Text)
    -- ^ /@notesRef@/: canonical name of the reference to use, or 'P.Nothing' to use the default ref.
    -> Ggit.Callbacks.NoteCallback
    -- ^ /@callback@/: a t'GI.Ggit.Callbacks.NoteCallback'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryNoteForeach :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Maybe Text -> NoteCallback -> m ()
repositoryNoteForeach a
repository Maybe Text
notesRef NoteCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
maybeNotesRef <- case Maybe Text
notesRef of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jNotesRef -> do
            CString
jNotesRef' <- Text -> IO CString
textToCString Text
jNotesRef
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jNotesRef'
    FunPtr C_NoteCallback
callback' <- C_NoteCallback -> IO (FunPtr C_NoteCallback)
Ggit.Callbacks.mk_NoteCallback (Maybe (Ptr (FunPtr C_NoteCallback))
-> NoteCallback_WithClosures -> C_NoteCallback
Ggit.Callbacks.wrap_NoteCallback Maybe (Ptr (FunPtr C_NoteCallback))
forall a. Maybe a
Nothing (NoteCallback -> NoteCallback_WithClosures
Ggit.Callbacks.drop_closures_NoteCallback NoteCallback
callback))
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> FunPtr C_NoteCallback
-> Ptr ()
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_note_foreach Ptr Repository
repository' CString
maybeNotesRef FunPtr C_NoteCallback
callback' Ptr ()
forall a. Ptr a
userData
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_NoteCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_NoteCallback
callback'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_NoteCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_NoteCallback
callback'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryNoteForeachMethodInfo
instance (signature ~ (Maybe (T.Text) -> Ggit.Callbacks.NoteCallback -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryNoteForeachMethodInfo a signature where
    overloadedMethod = repositoryNoteForeach

instance O.OverloadedMethodInfo RepositoryNoteForeachMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryNoteForeach",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@path@/: A path within the repository.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryPathIsIgnored :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> m ()
repositoryPathIsIgnored a
repository Text
path = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
path' <- Text -> IO CString
textToCString Text
path
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO CInt
ggit_repository_path_is_ignored Ptr Repository
repository' CString
path'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryPathIsIgnoredMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryPathIsIgnoredMethodInfo a signature where
    overloadedMethod = repositoryPathIsIgnored

instance O.OverloadedMethodInfo RepositoryPathIsIgnoredMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryPathIsIgnored",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Maybe (T.Text)
    -- ^ /@notesRef@/: canonical name of the reference to use, or 'P.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 'P.Nothing' in case of an error. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryReadNote :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Maybe Text -> OId -> m (Maybe Note)
repositoryReadNote a
repository Maybe Text
notesRef OId
id = IO (Maybe Note) -> m (Maybe Note)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Note) -> m (Maybe Note))
-> IO (Maybe Note) -> m (Maybe Note)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
maybeNotesRef <- case Maybe Text
notesRef of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jNotesRef -> do
            CString
jNotesRef' <- Text -> IO CString
textToCString Text
jNotesRef
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jNotesRef'
    Ptr OId
id' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
id
    IO (Maybe Note) -> IO () -> IO (Maybe Note)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Note
result <- (Ptr (Ptr GError) -> IO (Ptr Note)) -> IO (Ptr Note)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Note)) -> IO (Ptr Note))
-> (Ptr (Ptr GError) -> IO (Ptr Note)) -> IO (Ptr Note)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> Ptr OId -> Ptr (Ptr GError) -> IO (Ptr Note)
ggit_repository_read_note Ptr Repository
repository' CString
maybeNotesRef Ptr OId
id'
        Maybe Note
maybeResult <- Ptr Note -> (Ptr Note -> IO Note) -> IO (Maybe Note)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Note
result ((Ptr Note -> IO Note) -> IO (Maybe Note))
-> (Ptr Note -> IO Note) -> IO (Maybe Note)
forall a b. (a -> b) -> a -> b
$ \Ptr Note
result' -> do
            Note
result'' <- ((ManagedPtr Note -> Note) -> Ptr Note -> IO Note
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Note -> Note
Ggit.Note.Note) Ptr Note
result'
            Note -> IO Note
forall (m :: * -> *) a. Monad m => a -> m a
return Note
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
id
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
        Maybe Note -> IO (Maybe Note)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Note
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryReadNoteMethodInfo
instance (signature ~ (Maybe (T.Text) -> Ggit.OId.OId -> m (Maybe Ggit.Note.Note)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryReadNoteMethodInfo a signature where
    overloadedMethod = repositoryReadNote

instance O.OverloadedMethodInfo RepositoryReadNoteMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryReadNote",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit)
    -- ^ /@branch@/: the terminal commit to rebase, or 'P.Nothing' to rebase the
    -- current branch.
    -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit)
    -- ^ /@upstream@/: the commit to begin rebasing from, or 'P.Nothing' to
    -- rebase all reachable commits.
    -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit)
    -- ^ /@onto@/: the branch to rebase onto, or 'P.Nothing' to rebase onto
    -- the given upstream.
    -> Ggit.RebaseOptions.RebaseOptions
    -- ^ /@options@/: a t'GI.Ggit.Structs.RebaseOptions.RebaseOptions' to specify how rebase is performed, or 'P.Nothing'.
    -> m (Maybe Ggit.Rebase.Rebase)
    -- ^ __Returns:__ a newly allocated t'GI.Ggit.Objects.Rebase.Rebase'. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryRebaseInit :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a
-> Maybe AnnotatedCommit
-> Maybe AnnotatedCommit
-> Maybe AnnotatedCommit
-> RebaseOptions
-> m (Maybe Rebase)
repositoryRebaseInit a
repository Maybe AnnotatedCommit
branch Maybe AnnotatedCommit
upstream Maybe AnnotatedCommit
onto RebaseOptions
options = IO (Maybe Rebase) -> m (Maybe Rebase)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Rebase) -> m (Maybe Rebase))
-> IO (Maybe Rebase) -> m (Maybe Rebase)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr AnnotatedCommit
maybeBranch <- case Maybe AnnotatedCommit
branch of
        Maybe AnnotatedCommit
Nothing -> Ptr AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AnnotatedCommit
forall a. Ptr a
nullPtr
        Just AnnotatedCommit
jBranch -> do
            Ptr AnnotatedCommit
jBranch' <- AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr AnnotatedCommit
jBranch
            Ptr AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AnnotatedCommit
jBranch'
    Ptr AnnotatedCommit
maybeUpstream <- case Maybe AnnotatedCommit
upstream of
        Maybe AnnotatedCommit
Nothing -> Ptr AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AnnotatedCommit
forall a. Ptr a
nullPtr
        Just AnnotatedCommit
jUpstream -> do
            Ptr AnnotatedCommit
jUpstream' <- AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr AnnotatedCommit
jUpstream
            Ptr AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AnnotatedCommit
jUpstream'
    Ptr AnnotatedCommit
maybeOnto <- case Maybe AnnotatedCommit
onto of
        Maybe AnnotatedCommit
Nothing -> Ptr AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AnnotatedCommit
forall a. Ptr a
nullPtr
        Just AnnotatedCommit
jOnto -> do
            Ptr AnnotatedCommit
jOnto' <- AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr AnnotatedCommit
jOnto
            Ptr AnnotatedCommit -> IO (Ptr AnnotatedCommit)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AnnotatedCommit
jOnto'
    Ptr RebaseOptions
options' <- RebaseOptions -> IO (Ptr RebaseOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RebaseOptions
options
    IO (Maybe Rebase) -> IO () -> IO (Maybe Rebase)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Rebase
result <- (Ptr (Ptr GError) -> IO (Ptr Rebase)) -> IO (Ptr Rebase)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Rebase)) -> IO (Ptr Rebase))
-> (Ptr (Ptr GError) -> IO (Ptr Rebase)) -> IO (Ptr Rebase)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr AnnotatedCommit
-> Ptr AnnotatedCommit
-> Ptr AnnotatedCommit
-> Ptr RebaseOptions
-> Ptr (Ptr GError)
-> IO (Ptr Rebase)
ggit_repository_rebase_init Ptr Repository
repository' Ptr AnnotatedCommit
maybeBranch Ptr AnnotatedCommit
maybeUpstream Ptr AnnotatedCommit
maybeOnto Ptr RebaseOptions
options'
        Maybe Rebase
maybeResult <- Ptr Rebase -> (Ptr Rebase -> IO Rebase) -> IO (Maybe Rebase)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Rebase
result ((Ptr Rebase -> IO Rebase) -> IO (Maybe Rebase))
-> (Ptr Rebase -> IO Rebase) -> IO (Maybe Rebase)
forall a b. (a -> b) -> a -> b
$ \Ptr Rebase
result' -> do
            Rebase
result'' <- ((ManagedPtr Rebase -> Rebase) -> Ptr Rebase -> IO Rebase
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Rebase -> Rebase
Ggit.Rebase.Rebase) Ptr Rebase
result'
            Rebase -> IO Rebase
forall (m :: * -> *) a. Monad m => a -> m a
return Rebase
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe AnnotatedCommit -> (AnnotatedCommit -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe AnnotatedCommit
branch AnnotatedCommit -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        Maybe AnnotatedCommit -> (AnnotatedCommit -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe AnnotatedCommit
upstream AnnotatedCommit -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        Maybe AnnotatedCommit -> (AnnotatedCommit -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe AnnotatedCommit
onto AnnotatedCommit -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        RebaseOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RebaseOptions
options
        Maybe Rebase -> IO (Maybe Rebase)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Rebase
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryRebaseInitMethodInfo
instance (signature ~ (Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) -> Maybe (Ggit.AnnotatedCommit.AnnotatedCommit) -> Ggit.RebaseOptions.RebaseOptions -> m (Maybe Ggit.Rebase.Rebase)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryRebaseInitMethodInfo a signature where
    overloadedMethod = repositoryRebaseInit

instance O.OverloadedMethodInfo RepositoryRebaseInitMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryRebaseInit",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Ggit.RebaseOptions.RebaseOptions
    -- ^ /@options@/: a t'GI.Ggit.Structs.RebaseOptions.RebaseOptions' to specify how rebase is performed, or 'P.Nothing'.
    -> m (Maybe Ggit.Rebase.Rebase)
    -- ^ __Returns:__ a newly allocated t'GI.Ggit.Objects.Rebase.Rebase'. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryRebaseOpen :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> RebaseOptions -> m (Maybe Rebase)
repositoryRebaseOpen a
repository RebaseOptions
options = IO (Maybe Rebase) -> m (Maybe Rebase)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Rebase) -> m (Maybe Rebase))
-> IO (Maybe Rebase) -> m (Maybe Rebase)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr RebaseOptions
options' <- RebaseOptions -> IO (Ptr RebaseOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RebaseOptions
options
    IO (Maybe Rebase) -> IO () -> IO (Maybe Rebase)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Rebase
result <- (Ptr (Ptr GError) -> IO (Ptr Rebase)) -> IO (Ptr Rebase)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Rebase)) -> IO (Ptr Rebase))
-> (Ptr (Ptr GError) -> IO (Ptr Rebase)) -> IO (Ptr Rebase)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr RebaseOptions -> Ptr (Ptr GError) -> IO (Ptr Rebase)
ggit_repository_rebase_open Ptr Repository
repository' Ptr RebaseOptions
options'
        Maybe Rebase
maybeResult <- Ptr Rebase -> (Ptr Rebase -> IO Rebase) -> IO (Maybe Rebase)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Rebase
result ((Ptr Rebase -> IO Rebase) -> IO (Maybe Rebase))
-> (Ptr Rebase -> IO Rebase) -> IO (Maybe Rebase)
forall a b. (a -> b) -> a -> b
$ \Ptr Rebase
result' -> do
            Rebase
result'' <- ((ManagedPtr Rebase -> Rebase) -> Ptr Rebase -> IO Rebase
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Rebase -> Rebase
Ggit.Rebase.Rebase) Ptr Rebase
result'
            Rebase -> IO Rebase
forall (m :: * -> *) a. Monad m => a -> m a
return Rebase
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        RebaseOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RebaseOptions
options
        Maybe Rebase -> IO (Maybe Rebase)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Rebase
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryRebaseOpenMethodInfo
instance (signature ~ (Ggit.RebaseOptions.RebaseOptions -> m (Maybe Ggit.Rebase.Rebase)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryRebaseOpenMethodInfo a signature where
    overloadedMethod = repositoryRebaseOpen

instance O.OverloadedMethodInfo RepositoryRebaseOpenMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryRebaseOpen",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Ggit.Callbacks.ReferencesCallback
    -- ^ /@callback@/: a t'GI.Ggit.Callbacks.ReferencesCallback'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryReferencesForeach :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> ReferencesCallback -> m ()
repositoryReferencesForeach a
repository ReferencesCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    FunPtr C_ReferencesCallback
callback' <- C_ReferencesCallback -> IO (FunPtr C_ReferencesCallback)
Ggit.Callbacks.mk_ReferencesCallback (Maybe (Ptr (FunPtr C_ReferencesCallback))
-> ReferencesCallback_WithClosures -> C_ReferencesCallback
Ggit.Callbacks.wrap_ReferencesCallback Maybe (Ptr (FunPtr C_ReferencesCallback))
forall a. Maybe a
Nothing (ReferencesCallback -> ReferencesCallback_WithClosures
Ggit.Callbacks.drop_closures_ReferencesCallback ReferencesCallback
callback))
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> FunPtr C_ReferencesCallback
-> Ptr ()
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_references_foreach Ptr Repository
repository' FunPtr C_ReferencesCallback
callback' Ptr ()
forall a. Ptr a
userData
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_ReferencesCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ReferencesCallback
callback'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_ReferencesCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ReferencesCallback
callback'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryReferencesForeachMethodInfo
instance (signature ~ (Ggit.Callbacks.ReferencesCallback -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryReferencesForeachMethodInfo a signature where
    overloadedMethod = repositoryReferencesForeach

instance O.OverloadedMethodInfo RepositoryReferencesForeachMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryReferencesForeach",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Ggit.Callbacks.ReferencesNameCallback
    -- ^ /@callback@/: a t'GI.Ggit.Callbacks.ReferencesNameCallback'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryReferencesForeachName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> ReferencesNameCallback -> m ()
repositoryReferencesForeachName a
repository ReferencesNameCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    FunPtr C_ReferencesNameCallback
callback' <- C_ReferencesNameCallback -> IO (FunPtr C_ReferencesNameCallback)
Ggit.Callbacks.mk_ReferencesNameCallback (Maybe (Ptr (FunPtr C_ReferencesNameCallback))
-> ReferencesNameCallback_WithClosures -> C_ReferencesNameCallback
Ggit.Callbacks.wrap_ReferencesNameCallback Maybe (Ptr (FunPtr C_ReferencesNameCallback))
forall a. Maybe a
Nothing (ReferencesNameCallback -> ReferencesNameCallback_WithClosures
Ggit.Callbacks.drop_closures_ReferencesNameCallback ReferencesNameCallback
callback))
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> FunPtr C_ReferencesNameCallback
-> Ptr ()
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_references_foreach_name Ptr Repository
repository' FunPtr C_ReferencesNameCallback
callback' Ptr ()
forall a. Ptr a
userData
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_ReferencesNameCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ReferencesNameCallback
callback'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_ReferencesNameCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ReferencesNameCallback
callback'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryReferencesForeachNameMethodInfo
instance (signature ~ (Ggit.Callbacks.ReferencesNameCallback -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryReferencesForeachNameMethodInfo a signature where
    overloadedMethod = repositoryReferencesForeachName

instance O.OverloadedMethodInfo RepositoryReferencesForeachNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryReferencesForeachName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Maybe (T.Text)
    -- ^ /@notesRef@/: canonical name of the reference to use, or 'P.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 :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepository a, IsSignature b,
 IsSignature c) =>
a -> Maybe Text -> b -> c -> OId -> m ()
repositoryRemoveNote a
repository Maybe Text
notesRef b
author c
committer OId
id = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
maybeNotesRef <- case Maybe Text
notesRef of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jNotesRef -> do
            CString
jNotesRef' <- Text -> IO CString
textToCString Text
jNotesRef
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jNotesRef'
    Ptr Signature
author' <- b -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
author
    Ptr Signature
committer' <- c -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
committer
    Ptr OId
id' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
id
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> Ptr Signature
-> Ptr Signature
-> Ptr OId
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_remove_note Ptr Repository
repository' CString
maybeNotesRef Ptr Signature
author' Ptr Signature
committer' Ptr OId
id'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
author
        c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
committer
        OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
id
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNotesRef
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryRemoveNoteMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> c -> Ggit.OId.OId -> m ()), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b, Ggit.Signature.IsSignature c) => O.OverloadedMethod RepositoryRemoveNoteMethodInfo a signature where
    overloadedMethod = repositoryRemoveNote

instance O.OverloadedMethodInfo RepositoryRemoveNoteMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryRemoveNote",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v:repositoryRemoveNote"
        })


#endif

-- method Repository::remove_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 (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ggit_repository_remove_remote" ggit_repository_remove_remote :: 
    Ptr Repository ->                       -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Removes /@remote@/ from the /@repository@/.
repositoryRemoveRemote ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
    a
    -- ^ /@repository@/: a t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@name@/: the remote\'s name.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryRemoveRemote :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> m ()
repositoryRemoveRemote a
repository Text
name = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO CInt
ggit_repository_remove_remote Ptr Repository
repository' CString
name'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryRemoveRemoteMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryRemoveRemoteMethodInfo a signature where
    overloadedMethod = repositoryRemoveRemote

instance O.OverloadedMethodInfo RepositoryRemoveRemoteMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryRemoveRemote",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v:repositoryRemoveRemote"
        })


#endif

-- method Repository::rename_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 name to be renamed."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "new_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "new name of the remote."
--                 , 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_rename_remote" ggit_repository_rename_remote :: 
    Ptr Repository ->                       -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"})
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- new_name : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr CString)

-- | Rename the remote of /@repository@/ from /@name@/ to /@newName@/.
repositoryRenameRemote ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
    a
    -- ^ /@repository@/: a t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@name@/: the remote name to be renamed.
    -> T.Text
    -- ^ /@newName@/: new name of the remote.
    -> m (Maybe [T.Text])
    -- ^ __Returns:__ non-default refspecs that
    -- cannot be renamed. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryRenameRemote :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> Text -> m (Maybe [Text])
repositoryRenameRemote a
repository Text
name Text
newName = IO (Maybe [Text]) -> m (Maybe [Text])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Text]) -> m (Maybe [Text]))
-> IO (Maybe [Text]) -> m (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    CString
newName' <- Text -> IO CString
textToCString Text
newName
    IO (Maybe [Text]) -> IO () -> IO (Maybe [Text])
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString -> CString -> Ptr (Ptr GError) -> IO (Ptr CString)
ggit_repository_rename_remote Ptr Repository
repository' CString
name' CString
newName'
        Maybe [Text]
maybeResult <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CString
result ((Ptr CString -> IO [Text]) -> IO (Maybe [Text]))
-> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr CString
result' -> do
            [Text]
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
            (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
            Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
            [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
newName'
        Maybe [Text] -> IO (Maybe [Text])
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Text]
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
newName'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryRenameRemoteMethodInfo
instance (signature ~ (T.Text -> T.Text -> m (Maybe [T.Text])), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryRenameRemoteMethodInfo a signature where
    overloadedMethod = repositoryRenameRemote

instance O.OverloadedMethodInfo RepositoryRenameRemoteMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryRenameRemote",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v:repositoryRenameRemote"
        })


#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 t'GI.Ggit.Objects.Repository.Repository'.
    -> b
    -- ^ /@target@/: the target t'GI.Ggit.Objects.Object.Object' which is a commit or a tag.
    -> Ggit.Enums.ResetType
    -- ^ /@resetType@/: the t'GI.Ggit.Enums.ResetType' to perform.
    -> c
    -- ^ /@checkoutOptions@/: the t'GI.Ggit.Objects.CheckoutOptions.CheckoutOptions' to be used for a HARD reset.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryReset :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepository a, IsObject b,
 IsCheckoutOptions c) =>
a -> b -> ResetType -> c -> m ()
repositoryReset a
repository b
target ResetType
resetType c
checkoutOptions = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Object
target' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
    let resetType' :: CUInt
resetType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (ResetType -> Int) -> ResetType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ResetType -> Int
forall a. Enum a => a -> Int
fromEnum) ResetType
resetType
    Ptr CheckoutOptions
checkoutOptions' <- c -> IO (Ptr CheckoutOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
checkoutOptions
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Object
-> CUInt
-> Ptr CheckoutOptions
-> Ptr (Ptr GError)
-> IO ()
ggit_repository_reset Ptr Repository
repository' Ptr Object
target' CUInt
resetType' Ptr CheckoutOptions
checkoutOptions'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
        c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
checkoutOptions
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryResetMethodInfo
instance (signature ~ (b -> Ggit.Enums.ResetType -> c -> m ()), MonadIO m, IsRepository a, Ggit.Object.IsObject b, Ggit.CheckoutOptions.IsCheckoutOptions c) => O.OverloadedMethod RepositoryResetMethodInfo a signature where
    overloadedMethod = repositoryReset

instance O.OverloadedMethodInfo RepositoryResetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryReset",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 'P.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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Maybe (b)
    -- ^ /@target@/: the target t'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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsObject b) =>
a -> Maybe b -> [Text] -> m ()
repositoryResetDefault a
repository Maybe b
target [Text]
pathspecs = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Object
maybeTarget <- case Maybe b
target of
        Maybe b
Nothing -> Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
forall a. Ptr a
nullPtr
        Just b
jTarget -> do
            Ptr Object
jTarget' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jTarget
            Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jTarget'
    Ptr CString
pathspecs' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
pathspecs
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Object -> Ptr CString -> Ptr (Ptr GError) -> IO ()
ggit_repository_reset_default Ptr Repository
repository' Ptr Object
maybeTarget Ptr CString
pathspecs'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
target b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
pathspecs'
        Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
pathspecs'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
pathspecs'
        Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
pathspecs'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryResetDefaultMethodInfo
instance (signature ~ (Maybe (b) -> [T.Text] -> m ()), MonadIO m, IsRepository a, Ggit.Object.IsObject b) => O.OverloadedMethod RepositoryResetDefaultMethodInfo a signature where
    overloadedMethod = repositoryResetDefault

instance O.OverloadedMethodInfo RepositoryResetDefaultMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryResetDefault",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> b
    -- ^ /@commit@/: a t'GI.Ggit.Objects.Commit.Commit'.
    -> Ggit.RevertOptions.RevertOptions
    -- ^ /@options@/: a t'GI.Ggit.Structs.RevertOptions.RevertOptions'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryRevert :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsCommit b) =>
a -> b -> RevertOptions -> m ()
repositoryRevert a
repository b
commit RevertOptions
options = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Commit
commit' <- b -> IO (Ptr Commit)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
commit
    Ptr RevertOptions
options' <- RevertOptions -> IO (Ptr RevertOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RevertOptions
options
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Commit -> Ptr RevertOptions -> Ptr (Ptr GError) -> IO CInt
ggit_repository_revert Ptr Repository
repository' Ptr Commit
commit' Ptr RevertOptions
options'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
commit
        RevertOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RevertOptions
options
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryRevertMethodInfo
instance (signature ~ (b -> Ggit.RevertOptions.RevertOptions -> m ()), MonadIO m, IsRepository a, Ggit.Commit.IsCommit b) => O.OverloadedMethod RepositoryRevertMethodInfo a signature where
    overloadedMethod = repositoryRevert

instance O.OverloadedMethodInfo RepositoryRevertMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryRevert",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@spec@/: the revision specification.
    -> m (Maybe Ggit.Object.Object)
    -- ^ __Returns:__ a t'GI.Ggit.Objects.Object.Object' or 'P.Nothing' if the revision could not be found. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryRevparse :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> m (Maybe Object)
repositoryRevparse a
repository Text
spec = IO (Maybe Object) -> m (Maybe Object)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Object) -> m (Maybe Object))
-> IO (Maybe Object) -> m (Maybe Object)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
spec' <- Text -> IO CString
textToCString Text
spec
    IO (Maybe Object) -> IO () -> IO (Maybe Object)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Object
result <- (Ptr (Ptr GError) -> IO (Ptr Object)) -> IO (Ptr Object)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Object)) -> IO (Ptr Object))
-> (Ptr (Ptr GError) -> IO (Ptr Object)) -> IO (Ptr Object)
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO (Ptr Object)
ggit_repository_revparse Ptr Repository
repository' CString
spec'
        Maybe Object
maybeResult <- Ptr Object -> (Ptr Object -> IO Object) -> IO (Maybe Object)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Object
result ((Ptr Object -> IO Object) -> IO (Maybe Object))
-> (Ptr Object -> IO Object) -> IO (Maybe Object)
forall a b. (a -> b) -> a -> b
$ \Ptr Object
result' -> do
            Object
result'' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Object -> Object
Ggit.Object.Object) Ptr Object
result'
            Object -> IO Object
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
spec'
        Maybe Object -> IO (Maybe Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Object
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
spec'
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryRevparseMethodInfo
instance (signature ~ (T.Text -> m (Maybe Ggit.Object.Object)), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryRevparseMethodInfo a signature where
    overloadedMethod = repositoryRevparse

instance O.OverloadedMethodInfo RepositoryRevparseMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryRevparse",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> b
    -- ^ /@stasher@/: a t'GI.Ggit.Objects.Signature.Signature'.
    -> T.Text
    -- ^ /@message@/: description along with the stashed state or 'P.Nothing' to be autogenerated.
    -> [Ggit.Flags.StashFlags]
    -- ^ /@flags@/: a t'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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsSignature b) =>
a -> b -> Text -> [StashFlags] -> m (Maybe OId)
repositorySaveStash a
repository b
stasher Text
message [StashFlags]
flags = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr Signature
stasher' <- b -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
stasher
    CString
message' <- Text -> IO CString
textToCString Text
message
    let flags' :: CUInt
flags' = [StashFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StashFlags]
flags
    IO (Maybe OId) -> IO () -> IO (Maybe OId)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr OId
result <- (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId))
-> (Ptr (Ptr GError) -> IO (Ptr OId)) -> IO (Ptr OId)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Signature
-> CString
-> CUInt
-> Ptr (Ptr GError)
-> IO (Ptr OId)
ggit_repository_save_stash Ptr Repository
repository' Ptr Signature
stasher' CString
message' CUInt
flags'
        Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
            OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
            OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
stasher
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
        Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
     )

#if defined(ENABLE_OVERLOADING)
data RepositorySaveStashMethodInfo
instance (signature ~ (b -> T.Text -> [Ggit.Flags.StashFlags] -> m (Maybe Ggit.OId.OId)), MonadIO m, IsRepository a, Ggit.Signature.IsSignature b) => O.OverloadedMethod RepositorySaveStashMethodInfo a signature where
    overloadedMethod = repositorySaveStash

instance O.OverloadedMethodInfo RepositorySaveStashMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositorySaveStash",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> m ()
repositorySetHead a
repository Text
refName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
refName' <- Text -> IO CString
textToCString Text
refName
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> Ptr (Ptr GError) -> IO CInt
ggit_repository_set_head Ptr Repository
repository' CString
refName'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refName'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refName'
     )

#if defined(ENABLE_OVERLOADING)
data RepositorySetHeadMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositorySetHeadMethodInfo a signature where
    overloadedMethod = repositorySetHead

instance O.OverloadedMethodInfo RepositorySetHeadMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositorySetHead",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v:repositorySetHead"
        })


#endif

-- method Repository::set_remote_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 = "remote"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the remote name who's url is to be set."
--                 , 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 of the remote." , 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_remote_url" ggit_repository_set_remote_url :: 
    Ptr Repository ->                       -- repository : TInterface (Name {namespace = "Ggit", name = "Repository"})
    CString ->                              -- remote : TBasicType TUTF8
    CString ->                              -- url : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Sets url for the /@remote@/ from the /@repository@/.
repositorySetRemoteUrl ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
    a
    -- ^ /@repository@/: a t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@remote@/: the remote name who\'s url is to be set.
    -> T.Text
    -- ^ /@url@/: url of the remote.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositorySetRemoteUrl :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> Text -> m ()
repositorySetRemoteUrl a
repository Text
remote Text
url = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
remote' <- Text -> IO CString
textToCString Text
remote
    CString
url' <- Text -> IO CString
textToCString Text
url
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> CString -> Ptr (Ptr GError) -> IO CInt
ggit_repository_set_remote_url Ptr Repository
repository' CString
remote' CString
url'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
remote'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
remote'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
     )

#if defined(ENABLE_OVERLOADING)
data RepositorySetRemoteUrlMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositorySetRemoteUrlMethodInfo a signature where
    overloadedMethod = repositorySetRemoteUrl

instance O.OverloadedMethodInfo RepositorySetRemoteUrlMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositorySetRemoteUrl",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v:repositorySetRemoteUrl"
        })


#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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@name@/: the name of the submodule.
    -> Ggit.Enums.SubmoduleRecurse
    -- ^ /@fetchRecurseSubmodules@/: a t'GI.Ggit.Enums.SubmoduleRecurse'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositorySetSubmoduleFetchRecurse :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> SubmoduleRecurse -> m ()
repositorySetSubmoduleFetchRecurse a
repository Text
name SubmoduleRecurse
fetchRecurseSubmodules = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    let fetchRecurseSubmodules' :: CUInt
fetchRecurseSubmodules' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (SubmoduleRecurse -> Int) -> SubmoduleRecurse -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SubmoduleRecurse -> Int
forall a. Enum a => a -> Int
fromEnum) SubmoduleRecurse
fetchRecurseSubmodules
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> CUInt -> Ptr (Ptr GError) -> IO ()
ggit_repository_set_submodule_fetch_recurse Ptr Repository
repository' CString
name' CUInt
fetchRecurseSubmodules'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
     )

#if defined(ENABLE_OVERLOADING)
data RepositorySetSubmoduleFetchRecurseMethodInfo
instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleRecurse -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositorySetSubmoduleFetchRecurseMethodInfo a signature where
    overloadedMethod = repositorySetSubmoduleFetchRecurse

instance O.OverloadedMethodInfo RepositorySetSubmoduleFetchRecurseMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositorySetSubmoduleFetchRecurse",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@name@/: the name of the submodule.
    -> Ggit.Enums.SubmoduleIgnore
    -- ^ /@ignore@/: a t'GI.Ggit.Enums.SubmoduleIgnore'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositorySetSubmoduleIgnore :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> SubmoduleIgnore -> m ()
repositorySetSubmoduleIgnore a
repository Text
name SubmoduleIgnore
ignore = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    let ignore' :: CInt
ignore' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> (SubmoduleIgnore -> Int) -> SubmoduleIgnore -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SubmoduleIgnore -> Int
forall a. Enum a => a -> Int
fromEnum) SubmoduleIgnore
ignore
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> CInt -> Ptr (Ptr GError) -> IO ()
ggit_repository_set_submodule_ignore Ptr Repository
repository' CString
name' CInt
ignore'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
     )

#if defined(ENABLE_OVERLOADING)
data RepositorySetSubmoduleIgnoreMethodInfo
instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleIgnore -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositorySetSubmoduleIgnoreMethodInfo a signature where
    overloadedMethod = repositorySetSubmoduleIgnore

instance O.OverloadedMethodInfo RepositorySetSubmoduleIgnoreMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositorySetSubmoduleIgnore",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> T.Text
    -- ^ /@name@/: the name of the submodule.
    -> Ggit.Enums.SubmoduleUpdate
    -- ^ /@update@/: a t'GI.Ggit.Enums.SubmoduleUpdate'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositorySetSubmoduleUpdate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> SubmoduleUpdate -> m ()
repositorySetSubmoduleUpdate a
repository Text
name SubmoduleUpdate
update = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    let update' :: CUInt
update' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (SubmoduleUpdate -> Int) -> SubmoduleUpdate -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SubmoduleUpdate -> Int
forall a. Enum a => a -> Int
fromEnum) SubmoduleUpdate
update
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> CUInt -> Ptr (Ptr GError) -> IO ()
ggit_repository_set_submodule_update Ptr Repository
repository' CString
name' CUInt
update'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
     )

#if defined(ENABLE_OVERLOADING)
data RepositorySetSubmoduleUpdateMethodInfo
instance (signature ~ (T.Text -> Ggit.Enums.SubmoduleUpdate -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositorySetSubmoduleUpdateMethodInfo a signature where
    overloadedMethod = repositorySetSubmoduleUpdate

instance O.OverloadedMethodInfo RepositorySetSubmoduleUpdateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositorySetSubmoduleUpdate",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> Text -> Text -> m ()
repositorySetSubmoduleUrl a
repository Text
name Text
url = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    CString
name' <- Text -> IO CString
textToCString Text
name
    CString
url' <- Text -> IO CString
textToCString Text
url
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Repository -> CString -> CString -> Ptr (Ptr GError) -> IO ()
ggit_repository_set_submodule_url Ptr Repository
repository' CString
name' CString
url'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
     )

#if defined(ENABLE_OVERLOADING)
data RepositorySetSubmoduleUrlMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositorySetSubmoduleUrlMethodInfo a signature where
    overloadedMethod = repositorySetSubmoduleUrl

instance O.OverloadedMethodInfo RepositorySetSubmoduleUrlMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositorySetSubmoduleUrl",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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
-- 'P.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 t'GI.Ggit.Objects.Repository.Repository'.
    -> b
    -- ^ /@workdir@/: the working directory.
    -> Bool
    -- ^ /@updateGitlink@/: create\/update gitlink in workdir.
    -> m ()
repositorySetWorkdir :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepository a, IsFile b) =>
a -> b -> Bool -> m ()
repositorySetWorkdir a
repository b
workdir Bool
updateGitlink = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    Ptr File
workdir' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
workdir
    let updateGitlink' :: CInt
updateGitlink' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
updateGitlink
    Ptr Repository -> Ptr File -> CInt -> IO ()
ggit_repository_set_workdir Ptr Repository
repository' Ptr File
workdir' CInt
updateGitlink'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
workdir
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RepositorySetWorkdirMethodInfo
instance (signature ~ (b -> Bool -> m ()), MonadIO m, IsRepository a, Gio.File.IsFile b) => O.OverloadedMethod RepositorySetWorkdirMethodInfo a signature where
    overloadedMethod = repositorySetWorkdir

instance O.OverloadedMethodInfo RepositorySetWorkdirMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositorySetWorkdir",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Ggit.Callbacks.StashCallback
    -- ^ /@callback@/: a t'GI.Ggit.Callbacks.StashCallback'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryStashForeach :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> StashCallback -> m ()
repositoryStashForeach a
repository StashCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    FunPtr C_StashCallback
callback' <- C_StashCallback -> IO (FunPtr C_StashCallback)
Ggit.Callbacks.mk_StashCallback (Maybe (Ptr (FunPtr C_StashCallback))
-> StashCallback_WithClosures -> C_StashCallback
Ggit.Callbacks.wrap_StashCallback Maybe (Ptr (FunPtr C_StashCallback))
forall a. Maybe a
Nothing (StashCallback -> StashCallback_WithClosures
Ggit.Callbacks.drop_closures_StashCallback StashCallback
callback))
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> FunPtr C_StashCallback -> Ptr () -> Ptr (Ptr GError) -> IO CInt
ggit_repository_stash_foreach Ptr Repository
repository' FunPtr C_StashCallback
callback' Ptr ()
forall a. Ptr a
userData
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_StashCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_StashCallback
callback'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_StashCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_StashCallback
callback'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryStashForeachMethodInfo
instance (signature ~ (Ggit.Callbacks.StashCallback -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryStashForeachMethodInfo a signature where
    overloadedMethod = repositoryStashForeach

instance O.OverloadedMethodInfo RepositoryStashForeachMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryStashForeach",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Ggit.Callbacks.SubmoduleCallback
    -- ^ /@callback@/: a t'GI.Ggit.Callbacks.StatusCallback'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositorySubmoduleForeach :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> SubmoduleCallback -> m ()
repositorySubmoduleForeach a
repository SubmoduleCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    FunPtr C_SubmoduleCallback
callback' <- C_SubmoduleCallback -> IO (FunPtr C_SubmoduleCallback)
Ggit.Callbacks.mk_SubmoduleCallback (Maybe (Ptr (FunPtr C_SubmoduleCallback))
-> SubmoduleCallback_WithClosures -> C_SubmoduleCallback
Ggit.Callbacks.wrap_SubmoduleCallback Maybe (Ptr (FunPtr C_SubmoduleCallback))
forall a. Maybe a
Nothing (SubmoduleCallback -> SubmoduleCallback_WithClosures
Ggit.Callbacks.drop_closures_SubmoduleCallback SubmoduleCallback
callback))
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> FunPtr C_SubmoduleCallback
-> Ptr ()
-> Ptr (Ptr GError)
-> IO CInt
ggit_repository_submodule_foreach Ptr Repository
repository' FunPtr C_SubmoduleCallback
callback' Ptr ()
forall a. Ptr a
userData
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_SubmoduleCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_SubmoduleCallback
callback'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_SubmoduleCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_SubmoduleCallback
callback'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositorySubmoduleForeachMethodInfo
instance (signature ~ (Ggit.Callbacks.SubmoduleCallback -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositorySubmoduleForeachMethodInfo a signature where
    overloadedMethod = repositorySubmoduleForeach

instance O.OverloadedMethodInfo RepositorySubmoduleForeachMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositorySubmoduleForeach",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.Repository.Repository'.
    -> Ggit.Callbacks.TagCallback
    -- ^ /@callback@/: a t'GI.Ggit.Callbacks.TagCallback'.
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repositoryTagForeach :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepository a) =>
a -> TagCallback -> m ()
repositoryTagForeach a
repository TagCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
    FunPtr C_TagCallback
callback' <- C_TagCallback -> IO (FunPtr C_TagCallback)
Ggit.Callbacks.mk_TagCallback (Maybe (Ptr (FunPtr C_TagCallback))
-> TagCallback_WithClosures -> C_TagCallback
Ggit.Callbacks.wrap_TagCallback Maybe (Ptr (FunPtr C_TagCallback))
forall a. Maybe a
Nothing (TagCallback -> TagCallback_WithClosures
Ggit.Callbacks.drop_closures_TagCallback TagCallback
callback))
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> FunPtr C_TagCallback -> Ptr () -> Ptr (Ptr GError) -> IO CInt
ggit_repository_tag_foreach Ptr Repository
repository' FunPtr C_TagCallback
callback' Ptr ()
forall a. Ptr a
userData
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_TagCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_TagCallback
callback'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_TagCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_TagCallback
callback'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepositoryTagForeachMethodInfo
instance (signature ~ (Ggit.Callbacks.TagCallback -> m ()), MonadIO m, IsRepository a) => O.OverloadedMethod RepositoryTagForeachMethodInfo a signature where
    overloadedMethod = repositoryTagForeach

instance O.OverloadedMethodInfo RepositoryTagForeachMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Ggit.Objects.Repository.repositoryTagForeach",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Objects-Repository.html#v: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 t'GI.Ggit.Objects.CloneOptions.CloneOptions'.
    -> m (Maybe Repository)
    -- ^ __Returns:__ a newly created t'GI.Ggit.Objects.Repository.Repository'. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryClone :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsFile a, IsCloneOptions b) =>
Text -> a -> Maybe b -> m (Maybe Repository)
repositoryClone Text
url a
location Maybe b
options = IO (Maybe Repository) -> m (Maybe Repository)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Repository) -> m (Maybe Repository))
-> IO (Maybe Repository) -> m (Maybe Repository)
forall a b. (a -> b) -> a -> b
$ do
    CString
url' <- Text -> IO CString
textToCString Text
url
    Ptr File
location' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
location
    Ptr CloneOptions
maybeOptions <- case Maybe b
options of
        Maybe b
Nothing -> Ptr CloneOptions -> IO (Ptr CloneOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CloneOptions
forall a. Ptr a
nullPtr
        Just b
jOptions -> do
            Ptr CloneOptions
jOptions' <- b -> IO (Ptr CloneOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jOptions
            Ptr CloneOptions -> IO (Ptr CloneOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CloneOptions
jOptions'
    IO (Maybe Repository) -> IO () -> IO (Maybe Repository)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Repository
result <- (Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository))
-> (Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository)
forall a b. (a -> b) -> a -> b
$ CString
-> Ptr File
-> Ptr CloneOptions
-> Ptr (Ptr GError)
-> IO (Ptr Repository)
ggit_repository_clone CString
url' Ptr File
location' Ptr CloneOptions
maybeOptions
        Maybe Repository
maybeResult <- Ptr Repository
-> (Ptr Repository -> IO Repository) -> IO (Maybe Repository)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Repository
result ((Ptr Repository -> IO Repository) -> IO (Maybe Repository))
-> (Ptr Repository -> IO Repository) -> IO (Maybe Repository)
forall a b. (a -> b) -> a -> b
$ \Ptr Repository
result' -> do
            Repository
result'' <- ((ManagedPtr Repository -> Repository)
-> Ptr Repository -> IO Repository
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repository -> Repository
Repository) Ptr Repository
result'
            Repository -> IO Repository
forall (m :: * -> *) a. Monad m => a -> m a
return Repository
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
location
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
options b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
        Maybe Repository -> IO (Maybe Repository)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Repository
maybeResult
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
url'
     )

#if defined(ENABLE_OVERLOADING)
#endif

-- 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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFile a) =>
a -> m (Maybe File)
repositoryDiscover a
location = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ do
    Ptr File
location' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
location
    IO (Maybe File) -> IO () -> IO (Maybe File)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr File
result <- (Ptr (Ptr GError) -> IO (Ptr File)) -> IO (Ptr File)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr (Ptr GError) -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ Ptr File -> Ptr (Ptr GError) -> IO (Ptr File)
ggit_repository_discover Ptr File
location'
        Maybe File
maybeResult <- Ptr File -> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr File
result ((Ptr File -> IO File) -> IO (Maybe File))
-> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
result' -> do
            File
result'' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result'
            File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
location
        Maybe File -> IO (Maybe File)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
#endif

-- 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 'P.Nothing'.
    -> m (Maybe Gio.File.File)
    -- ^ __Returns:__ the repository location. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryDiscoverFull :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFile a) =>
a -> Bool -> Maybe [Text] -> m (Maybe File)
repositoryDiscoverFull a
location Bool
acrossFs Maybe [Text]
ceilingDirs = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ do
    Ptr File
location' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
location
    let acrossFs' :: CInt
acrossFs' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
acrossFs
    Ptr CString
maybeCeilingDirs <- case Maybe [Text]
ceilingDirs of
        Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
        Just [Text]
jCeilingDirs -> do
            Ptr CString
jCeilingDirs' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jCeilingDirs
            Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jCeilingDirs'
    IO (Maybe File) -> IO () -> IO (Maybe File)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr File
result <- (Ptr (Ptr GError) -> IO (Ptr File)) -> IO (Ptr File)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr (Ptr GError) -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ Ptr File
-> CInt -> Ptr CString -> Ptr (Ptr GError) -> IO (Ptr File)
ggit_repository_discover_full Ptr File
location' CInt
acrossFs' Ptr CString
maybeCeilingDirs
        Maybe File
maybeResult <- Ptr File -> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr File
result ((Ptr File -> IO File) -> IO (Maybe File))
-> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
result' -> do
            File
result'' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result'
            File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
location
        (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeCeilingDirs
        Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeCeilingDirs
        Maybe File -> IO (Maybe File)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
maybeResult
     ) (do
        (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeCeilingDirs
        Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeCeilingDirs
     )

#if defined(ENABLE_OVERLOADING)
#endif

-- 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 'P.True', a git repository without a working directory is created
    --           at the pointed path. If 'P.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 t'GI.Ggit.Objects.Repository.Repository'. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryInitRepository :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFile a) =>
a -> Bool -> m (Maybe Repository)
repositoryInitRepository a
location Bool
isBare = IO (Maybe Repository) -> m (Maybe Repository)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Repository) -> m (Maybe Repository))
-> IO (Maybe Repository) -> m (Maybe Repository)
forall a b. (a -> b) -> a -> b
$ do
    Ptr File
location' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
location
    let isBare' :: CInt
isBare' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
isBare
    IO (Maybe Repository) -> IO () -> IO (Maybe Repository)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Repository
result <- (Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository))
-> (Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository)
forall a b. (a -> b) -> a -> b
$ Ptr File -> CInt -> Ptr (Ptr GError) -> IO (Ptr Repository)
ggit_repository_init_repository Ptr File
location' CInt
isBare'
        Maybe Repository
maybeResult <- Ptr Repository
-> (Ptr Repository -> IO Repository) -> IO (Maybe Repository)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Repository
result ((Ptr Repository -> IO Repository) -> IO (Maybe Repository))
-> (Ptr Repository -> IO Repository) -> IO (Maybe Repository)
forall a b. (a -> b) -> a -> b
$ \Ptr Repository
result' -> do
            Repository
result'' <- ((ManagedPtr Repository -> Repository)
-> Ptr Repository -> IO Repository
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repository -> Repository
Repository) Ptr Repository
result'
            Repository -> IO Repository
forall (m :: * -> *) a. Monad m => a -> m a
return Repository
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
location
        Maybe Repository -> IO (Maybe Repository)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Repository
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
#endif

-- 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 t'GI.Ggit.Objects.Repository.Repository'. /(Can throw 'Data.GI.Base.GError.GError')/
repositoryOpen :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFile a) =>
a -> m (Maybe Repository)
repositoryOpen a
location = IO (Maybe Repository) -> m (Maybe Repository)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Repository) -> m (Maybe Repository))
-> IO (Maybe Repository) -> m (Maybe Repository)
forall a b. (a -> b) -> a -> b
$ do
    Ptr File
location' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
location
    IO (Maybe Repository) -> IO () -> IO (Maybe Repository)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Repository
result <- (Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository))
-> (Ptr (Ptr GError) -> IO (Ptr Repository)) -> IO (Ptr Repository)
forall a b. (a -> b) -> a -> b
$ Ptr File -> Ptr (Ptr GError) -> IO (Ptr Repository)
ggit_repository_open Ptr File
location'
        Maybe Repository
maybeResult <- Ptr Repository
-> (Ptr Repository -> IO Repository) -> IO (Maybe Repository)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Repository
result ((Ptr Repository -> IO Repository) -> IO (Maybe Repository))
-> (Ptr Repository -> IO Repository) -> IO (Maybe Repository)
forall a b. (a -> b) -> a -> b
$ \Ptr Repository
result' -> do
            Repository
result'' <- ((ManagedPtr Repository -> Repository)
-> Ptr Repository -> IO Repository
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repository -> Repository
Repository) Ptr Repository
result'
            Repository -> IO Repository
forall (m :: * -> *) a. Monad m => a -> m a
return Repository
result''
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
location
        Maybe Repository -> IO (Maybe Repository)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Repository
maybeResult
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
#endif