Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
- Exported types
- Methods
- addRemoteFetch
- addRemotePush
- blameFile
- checkoutHead
- checkoutIndex
- checkoutTree
- cherryPick
- cherryPickCommit
- clone
- createBlob
- createBlobFromBuffer
- createBlobFromFile
- createBlobFromPath
- createBranch
- createCommit
- createCommitFromIds
- createIndexEntryForFile
- createIndexEntryForPath
- createNote
- createReference
- createRemote
- createSymbolicReference
- createTag
- createTagAnnotation
- createTagFromBuffer
- createTagLightweight
- createTreeBuilder
- createTreeBuilderFromTree
- deleteTag
- discover
- discoverFull
- dropStash
- enumerateBranches
- fileStatus
- fileStatusForeach
- getAheadBehind
- getAttribute
- getConfig
- getDefaultNotesRef
- getDescendantOf
- getHead
- getIndex
- getLocation
- getSubmoduleStatus
- getWorkdir
- initRepository
- isBare
- isEmpty
- isHeadDetached
- isHeadUnborn
- listRemotes
- listTags
- listTagsMatch
- lookup
- lookupBlob
- lookupBranch
- lookupCommit
- lookupReference
- lookupReferenceDwim
- lookupRemote
- lookupSubmodule
- lookupTag
- lookupTree
- merge
- mergeBase
- mergeCommits
- mergeTrees
- noteForeach
- open
- pathIsIgnored
- readNote
- rebaseInit
- rebaseOpen
- referencesForeach
- referencesForeachName
- removeNote
- removeRemote
- renameRemote
- reset
- resetDefault
- revert
- revparse
- saveStash
- setHead
- setHeadDetached
- setRemoteUrl
- setSubmoduleFetchRecurse
- setSubmoduleIgnore
- setSubmoduleUpdate
- setSubmoduleUrl
- setWorkdir
- stashForeach
- submoduleForeach
- tagForeach
- Properties
Represents an existing git repository including all of it's object contents.
Synopsis
- newtype Repository = Repository (ManagedPtr Repository)
- class (GObject o, IsDescendantOf Repository o) => IsRepository o
- toRepository :: (MonadIO m, IsRepository o) => o -> m Repository
- repositoryAddRemoteFetch :: (HasCallStack, MonadIO m, IsRepository a, IsRemote b) => a -> b -> Text -> m ()
- repositoryAddRemotePush :: (HasCallStack, MonadIO m, IsRepository a, IsRemote b) => a -> b -> Text -> m ()
- repositoryBlameFile :: (HasCallStack, MonadIO m, IsRepository a, IsFile b) => a -> b -> Maybe BlameOptions -> m (Maybe Blame)
- repositoryCheckoutHead :: (HasCallStack, MonadIO m, IsRepository a, IsCheckoutOptions b) => a -> Maybe b -> m ()
- repositoryCheckoutIndex :: (HasCallStack, MonadIO m, IsRepository a, IsIndex b, IsCheckoutOptions c) => a -> Maybe b -> Maybe c -> m ()
- repositoryCheckoutTree :: (HasCallStack, MonadIO m, IsRepository a, IsObject b, IsCheckoutOptions c) => a -> Maybe b -> Maybe c -> m ()
- repositoryCherryPick :: (HasCallStack, MonadIO m, IsRepository a, IsCommit b, IsCherryPickOptions c) => a -> b -> c -> m ()
- repositoryCherryPickCommit :: (HasCallStack, MonadIO m, IsRepository a, IsCommit b, IsCommit c) => a -> b -> c -> Word32 -> Maybe MergeOptions -> m (Maybe Index)
- repositoryClone :: (HasCallStack, MonadIO m, IsFile a, IsCloneOptions b) => Text -> a -> Maybe b -> m (Maybe Repository)
- repositoryCreateBlob :: (HasCallStack, MonadIO m, IsRepository a) => a -> m (Maybe BlobOutputStream)
- repositoryCreateBlobFromBuffer :: (HasCallStack, MonadIO m, IsRepository a) => a -> ByteString -> m (Maybe OId)
- repositoryCreateBlobFromFile :: (HasCallStack, MonadIO m, IsRepository a, IsFile b) => a -> b -> m OId
- repositoryCreateBlobFromPath :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> m (Maybe OId)
- repositoryCreateBranch :: (HasCallStack, MonadIO m, IsRepository a, IsObject b) => a -> Text -> b -> [CreateFlags] -> m (Maybe Branch)
- repositoryCreateCommit :: (HasCallStack, MonadIO m, IsRepository a, IsSignature b, IsSignature c, IsTree d) => a -> Maybe Text -> b -> c -> Maybe Text -> Text -> d -> [Commit] -> m (Maybe OId)
- repositoryCreateCommitFromIds :: (HasCallStack, MonadIO m, IsRepository a, IsSignature b, IsSignature c) => a -> Maybe Text -> b -> c -> Maybe Text -> Text -> OId -> [OId] -> m (Maybe OId)
- repositoryCreateIndexEntryForFile :: (HasCallStack, MonadIO m, IsRepository a, IsFile b) => a -> Maybe b -> Maybe OId -> m (Maybe IndexEntry)
- repositoryCreateIndexEntryForPath :: (HasCallStack, MonadIO m, IsRepository a) => a -> Maybe Text -> Maybe OId -> m (Maybe IndexEntry)
- repositoryCreateNote :: (HasCallStack, MonadIO m, IsRepository a, IsSignature b, IsSignature c) => a -> Maybe Text -> b -> c -> OId -> Text -> Bool -> m (Maybe OId)
- repositoryCreateReference :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> OId -> Text -> m (Maybe Ref)
- repositoryCreateRemote :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> Text -> m (Maybe Remote)
- repositoryCreateSymbolicReference :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> Text -> Text -> m (Maybe Ref)
- repositoryCreateTag :: (HasCallStack, MonadIO m, IsRepository a, IsObject b, IsSignature c) => a -> Text -> b -> c -> Text -> [CreateFlags] -> m (Maybe OId)
- repositoryCreateTagAnnotation :: (HasCallStack, MonadIO m, IsRepository a, IsObject b, IsSignature c) => a -> Text -> b -> c -> Text -> m (Maybe OId)
- repositoryCreateTagFromBuffer :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> [CreateFlags] -> m (Maybe OId)
- repositoryCreateTagLightweight :: (HasCallStack, MonadIO m, IsRepository a, IsObject b) => a -> Text -> b -> [CreateFlags] -> m (Maybe OId)
- repositoryCreateTreeBuilder :: (HasCallStack, MonadIO m, IsRepository a) => a -> m (Maybe TreeBuilder)
- repositoryCreateTreeBuilderFromTree :: (HasCallStack, MonadIO m, IsRepository a, IsTree b) => a -> b -> m (Maybe TreeBuilder)
- repositoryDeleteTag :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> m ()
- repositoryDiscover :: (HasCallStack, MonadIO m, IsFile a) => a -> m (Maybe File)
- repositoryDiscoverFull :: (HasCallStack, MonadIO m, IsFile a) => a -> Bool -> Maybe [Text] -> m (Maybe File)
- repositoryDropStash :: (HasCallStack, MonadIO m, IsRepository a) => a -> Word64 -> m ()
- repositoryEnumerateBranches :: (HasCallStack, MonadIO m, IsRepository a) => a -> BranchType -> m (Maybe BranchEnumerator)
- repositoryFileStatus :: (HasCallStack, MonadIO m, IsRepository a, IsFile b) => a -> b -> m [StatusFlags]
- repositoryFileStatusForeach :: (HasCallStack, MonadIO m, IsRepository a) => a -> Maybe StatusOptions -> StatusCallback -> m ()
- repositoryGetAheadBehind :: (HasCallStack, MonadIO m, IsRepository a) => a -> OId -> OId -> m (Word64, Word64)
- repositoryGetAttribute :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> Text -> [AttributeCheckFlags] -> m (Maybe Text)
- repositoryGetConfig :: (HasCallStack, MonadIO m, IsRepository a) => a -> m (Maybe Config)
- repositoryGetDefaultNotesRef :: (HasCallStack, MonadIO m, IsRepository a) => a -> m (Maybe Text)
- repositoryGetDescendantOf :: (HasCallStack, MonadIO m, IsRepository a) => a -> OId -> OId -> m ()
- repositoryGetHead :: (HasCallStack, MonadIO m, IsRepository a) => a -> m (Maybe Ref)
- repositoryGetIndex :: (HasCallStack, MonadIO m, IsRepository a) => a -> m (Maybe Index)
- repositoryGetLocation :: (HasCallStack, MonadIO m, IsRepository a) => a -> m (Maybe File)
- repositoryGetSubmoduleStatus :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> SubmoduleIgnore -> m [SubmoduleStatus]
- repositoryGetWorkdir :: (HasCallStack, MonadIO m, IsRepository a) => a -> m (Maybe File)
- repositoryInitRepository :: (HasCallStack, MonadIO m, IsFile a) => a -> Bool -> m (Maybe Repository)
- repositoryIsBare :: (HasCallStack, MonadIO m, IsRepository a) => a -> m Bool
- repositoryIsEmpty :: (HasCallStack, MonadIO m, IsRepository a) => a -> m ()
- repositoryIsHeadDetached :: (HasCallStack, MonadIO m, IsRepository a) => a -> m ()
- repositoryIsHeadUnborn :: (HasCallStack, MonadIO m, IsRepository a) => a -> m ()
- repositoryListRemotes :: (HasCallStack, MonadIO m, IsRepository a) => a -> m (Maybe [Text])
- repositoryListTags :: (HasCallStack, MonadIO m, IsRepository a) => a -> m (Maybe [Text])
- repositoryListTagsMatch :: (HasCallStack, MonadIO m, IsRepository a) => a -> Maybe Text -> m (Maybe [Text])
- repositoryLookup :: (HasCallStack, MonadIO m, IsRepository a) => a -> OId -> GType -> m (Maybe Object)
- repositoryLookupBlob :: (HasCallStack, MonadIO m, IsRepository a) => a -> OId -> m (Maybe Blob)
- repositoryLookupBranch :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> BranchType -> m (Maybe Branch)
- repositoryLookupCommit :: (HasCallStack, MonadIO m, IsRepository a) => a -> OId -> m (Maybe Commit)
- repositoryLookupReference :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> m (Maybe Ref)
- repositoryLookupReferenceDwim :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> m (Maybe Ref)
- repositoryLookupRemote :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> m (Maybe Remote)
- repositoryLookupSubmodule :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> m (Maybe Submodule)
- repositoryLookupTag :: (HasCallStack, MonadIO m, IsRepository a) => a -> OId -> m (Maybe Tag)
- repositoryLookupTree :: (HasCallStack, MonadIO m, IsRepository a) => a -> OId -> m (Maybe Tree)
- repositoryMerge :: (HasCallStack, MonadIO m, IsRepository a, IsCheckoutOptions b) => a -> [AnnotatedCommit] -> MergeOptions -> b -> m ()
- repositoryMergeBase :: (HasCallStack, MonadIO m, IsRepository a) => a -> OId -> OId -> m (Maybe OId)
- repositoryMergeCommits :: (HasCallStack, MonadIO m, IsRepository a, IsCommit b, IsCommit c) => a -> b -> c -> MergeOptions -> m (Maybe Index)
- repositoryMergeTrees :: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsTree c, IsTree d) => a -> b -> c -> d -> MergeOptions -> m (Maybe Index)
- repositoryNoteForeach :: (HasCallStack, MonadIO m, IsRepository a) => a -> Maybe Text -> NoteCallback -> m ()
- repositoryOpen :: (HasCallStack, MonadIO m, IsFile a) => a -> m (Maybe Repository)
- repositoryPathIsIgnored :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> m ()
- repositoryReadNote :: (HasCallStack, MonadIO m, IsRepository a) => a -> Maybe Text -> OId -> m (Maybe Note)
- repositoryRebaseInit :: (HasCallStack, MonadIO m, IsRepository a) => a -> Maybe AnnotatedCommit -> Maybe AnnotatedCommit -> Maybe AnnotatedCommit -> RebaseOptions -> m (Maybe Rebase)
- repositoryRebaseOpen :: (HasCallStack, MonadIO m, IsRepository a) => a -> RebaseOptions -> m (Maybe Rebase)
- repositoryReferencesForeach :: (HasCallStack, MonadIO m, IsRepository a) => a -> ReferencesCallback -> m ()
- repositoryReferencesForeachName :: (HasCallStack, MonadIO m, IsRepository a) => a -> ReferencesNameCallback -> m ()
- repositoryRemoveNote :: (HasCallStack, MonadIO m, IsRepository a, IsSignature b, IsSignature c) => a -> Maybe Text -> b -> c -> OId -> m ()
- repositoryRemoveRemote :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> m ()
- repositoryRenameRemote :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> Text -> m (Maybe [Text])
- repositoryReset :: (HasCallStack, MonadIO m, IsRepository a, IsObject b, IsCheckoutOptions c) => a -> b -> ResetType -> c -> m ()
- repositoryResetDefault :: (HasCallStack, MonadIO m, IsRepository a, IsObject b) => a -> Maybe b -> [Text] -> m ()
- repositoryRevert :: (HasCallStack, MonadIO m, IsRepository a, IsCommit b) => a -> b -> RevertOptions -> m ()
- repositoryRevparse :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> m (Maybe Object)
- repositorySaveStash :: (HasCallStack, MonadIO m, IsRepository a, IsSignature b) => a -> b -> Text -> [StashFlags] -> m (Maybe OId)
- repositorySetHead :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> m ()
- repositorySetHeadDetached :: (HasCallStack, MonadIO m, IsRepository a) => a -> OId -> m ()
- repositorySetRemoteUrl :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> Text -> m ()
- repositorySetSubmoduleFetchRecurse :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> SubmoduleRecurse -> m ()
- repositorySetSubmoduleIgnore :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> SubmoduleIgnore -> m ()
- repositorySetSubmoduleUpdate :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> SubmoduleUpdate -> m ()
- repositorySetSubmoduleUrl :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> Text -> m ()
- repositorySetWorkdir :: (HasCallStack, MonadIO m, IsRepository a, IsFile b) => a -> b -> Bool -> m ()
- repositoryStashForeach :: (HasCallStack, MonadIO m, IsRepository a) => a -> StashCallback -> m ()
- repositorySubmoduleForeach :: (HasCallStack, MonadIO m, IsRepository a) => a -> SubmoduleCallback -> m ()
- repositoryTagForeach :: (HasCallStack, MonadIO m, IsRepository a) => a -> TagCallback -> m ()
- constructRepositoryCloneOptions :: (IsRepository o, MonadIO m, IsCloneOptions a) => a -> m (GValueConstruct o)
- getRepositoryCloneOptions :: (MonadIO m, IsRepository o) => o -> m (Maybe CloneOptions)
- getRepositoryHead :: (MonadIO m, IsRepository o) => o -> m (Maybe Ref)
- constructRepositoryInit :: (IsRepository o, MonadIO m) => Bool -> m (GValueConstruct o)
- getRepositoryInit :: (MonadIO m, IsRepository o) => o -> m Bool
- constructRepositoryIsBare :: (IsRepository o, MonadIO m) => Bool -> m (GValueConstruct o)
- getRepositoryIsBare :: (MonadIO m, IsRepository o) => o -> m Bool
- constructRepositoryLocation :: (IsRepository o, MonadIO m, IsFile a) => a -> m (GValueConstruct o)
- getRepositoryLocation :: (MonadIO m, IsRepository o) => o -> m (Maybe File)
- constructRepositoryUrl :: (IsRepository o, MonadIO m) => Text -> m (GValueConstruct o)
- getRepositoryUrl :: (MonadIO m, IsRepository o) => o -> m (Maybe Text)
- clearRepositoryWorkdir :: (MonadIO m, IsRepository o) => o -> m ()
- constructRepositoryWorkdir :: (IsRepository o, MonadIO m, IsFile a) => a -> m (GValueConstruct o)
- getRepositoryWorkdir :: (MonadIO m, IsRepository o) => o -> m (Maybe File)
- setRepositoryWorkdir :: (MonadIO m, IsRepository o, IsFile a) => o -> a -> m ()
Exported types
newtype Repository Source #
Memory-managed wrapper type.
Repository (ManagedPtr Repository) |
Instances
Eq Repository Source # | |
Defined in GI.Ggit.Objects.Repository (==) :: Repository -> Repository -> Bool # (/=) :: Repository -> Repository -> Bool # | |
GObject Repository Source # | |
Defined in GI.Ggit.Objects.Repository | |
ManagedPtrNewtype Repository Source # | |
Defined in GI.Ggit.Objects.Repository toManagedPtr :: Repository -> ManagedPtr Repository | |
TypedObject Repository Source # | |
Defined in GI.Ggit.Objects.Repository | |
HasParentTypes Repository Source # | |
Defined in GI.Ggit.Objects.Repository | |
IsGValue (Maybe Repository) Source # | Convert |
Defined in GI.Ggit.Objects.Repository gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Repository -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Repository) | |
type ParentTypes Repository Source # | |
Defined in GI.Ggit.Objects.Repository |
class (GObject o, IsDescendantOf Repository o) => IsRepository o Source #
Type class for types which can be safely cast to Repository
, for instance with toRepository
.
Instances
(GObject o, IsDescendantOf Repository o) => IsRepository o Source # | |
Defined in GI.Ggit.Objects.Repository |
toRepository :: (MonadIO m, IsRepository o) => o -> m Repository Source #
Cast to Repository
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
addRemoteFetch, addRemotePush, bindProperty, bindPropertyFull, blameFile, checkoutHead, checkoutIndex, checkoutTree, cherryPick, cherryPickCommit, createBlob, createBlobFromBuffer, createBlobFromFile, createBlobFromPath, createBranch, createCommit, createCommitFromIds, createIndexEntryForFile, createIndexEntryForPath, createNote, createReference, createRemote, createSymbolicReference, createTag, createTagAnnotation, createTagFromBuffer, createTagLightweight, createTreeBuilder, createTreeBuilderFromTree, deleteTag, dropStash, enumerateBranches, fileStatus, fileStatusForeach, forceFloating, freezeNotify, getv, init, isBare, isEmpty, isFloating, isHeadDetached, isHeadUnborn, listRemotes, listTags, listTagsMatch, lookup, lookupBlob, lookupBranch, lookupCommit, lookupReference, lookupReferenceDwim, lookupRemote, lookupSubmodule, lookupTag, lookupTree, merge, mergeBase, mergeCommits, mergeTrees, noteForeach, notify, notifyByPspec, pathIsIgnored, readNote, rebaseInit, rebaseOpen, ref, refSink, referencesForeach, referencesForeachName, removeNote, removeRemote, renameRemote, reset, resetDefault, revert, revparse, runDispose, saveStash, stashForeach, stealData, stealQdata, submoduleForeach, tagForeach, thawNotify, unref, watchClosure.
Getters
getAheadBehind, getAttribute, getConfig, getData, getDefaultNotesRef, getDescendantOf, getHead, getIndex, getLocation, getProperty, getQdata, getSubmoduleStatus, getWorkdir.
Setters
setData, setDataFull, setHead, setHeadDetached, setProperty, setRemoteUrl, setSubmoduleFetchRecurse, setSubmoduleIgnore, setSubmoduleUpdate, setSubmoduleUrl, setWorkdir.
addRemoteFetch
repositoryAddRemoteFetch Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsRemote b) | |
=> a |
|
-> b |
|
-> Text |
|
-> m () | (Can throw |
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.
addRemotePush
repositoryAddRemotePush Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsRemote b) | |
=> a |
|
-> b |
|
-> Text |
|
-> m () | (Can throw |
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.
blameFile
:: (HasCallStack, MonadIO m, IsRepository a, IsFile b) | |
=> a |
|
-> b |
|
-> Maybe BlameOptions |
|
-> m (Maybe Blame) |
Get a blame for a single file.
checkoutHead
repositoryCheckoutHead Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsCheckoutOptions b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
Update files in the working tree to reflect the contents of current HEAD. If
options
is Nothing
, then the default checkout options will be used.
If the checkout was not successfull, then error
will be set.
checkoutIndex
repositoryCheckoutIndex Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsIndex b, IsCheckoutOptions c) | |
=> a |
|
-> Maybe b | |
-> Maybe c |
|
-> m () | (Can throw |
checkoutTree
repositoryCheckoutTree Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsObject b, IsCheckoutOptions c) | |
=> a |
|
-> Maybe b | |
-> Maybe c |
|
-> m () | (Can throw |
Update files in the working tree to reflect the contents of the specified
commit, tag or tree object. If tree
is Nothing
, then the current HEAD of the
repository will be used. If options
is Nothing
, then the default checkout
options will be used.
If the checkout was not successfull, then error
will be set.
cherryPick
:: (HasCallStack, MonadIO m, IsRepository a, IsCommit b, IsCherryPickOptions c) | |
=> a |
|
-> b |
|
-> c |
|
-> m () | (Can throw |
Cherry pick the specified commit, making changes in the index and the working directory.
cherryPickCommit
repositoryCherryPickCommit Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsCommit b, IsCommit c) | |
=> a |
|
-> b |
|
-> c |
|
-> Word32 |
|
-> Maybe MergeOptions |
|
-> m (Maybe Index) |
Cherry-picks the given commit
against the provided ourCommit
, producing
and index that reflects the result of the cherry-pick.
clone
:: (HasCallStack, MonadIO m, IsFile a, IsCloneOptions b) | |
=> Text |
|
-> a |
|
-> Maybe b |
|
-> m (Maybe Repository) | Returns: a newly created |
Clones a new git repository in the given folder.
createBlob
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m (Maybe BlobOutputStream) | Returns: a |
Create a new blob and return a 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.
createBlobFromBuffer
repositoryCreateBlobFromBuffer Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> ByteString |
|
-> m (Maybe OId) | Returns: the new |
Write an in-memory buffer to the object database as a blob.
createBlobFromFile
repositoryCreateBlobFromFile Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsFile b) | |
=> a |
|
-> b |
|
-> m OId | (Can throw |
Write a file to the object database as a blob.
Returns (transfer full) (nullable): the new GgitOid
of the written blob,
or Nothing
if writing the blob failed.
createBlobFromPath
repositoryCreateBlobFromPath Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> m (Maybe OId) | Returns: the new |
Write a path relative to the repository working directory to the object database as a blob.
createBranch
repositoryCreateBranch Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsObject b) | |
=> a |
|
-> Text |
|
-> b |
|
-> [CreateFlags] |
|
-> m (Maybe Branch) | Returns: the reference to which the branch
points, or |
Creates a new branch pointing at a target commit.
createCommit
repositoryCreateCommit Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsSignature b, IsSignature c, IsTree d) | |
=> a |
|
-> Maybe Text |
|
-> b |
|
-> c |
|
-> Maybe Text |
|
-> Text |
|
-> d |
|
-> [Commit] |
|
-> m (Maybe OId) | Returns: the |
Create a new commit. If updateRef
is not Nothing
, the given reference will
be updated to point to the newly created commit. Use "HEAD" to update the
HEAD of the current branch and make it point to this commit.
If messageEncoding
is set to Nothing
, "UTF-8" encoding is assumed for the
provided message
. Note that message
will not be cleaned up automatically.
You can use ggit_message_prettify
to do this yourself if needed.
createCommitFromIds
repositoryCreateCommitFromIds Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsSignature b, IsSignature c) | |
=> a |
|
-> Maybe Text |
|
-> b |
|
-> c |
|
-> Maybe Text |
|
-> Text |
|
-> OId |
|
-> [OId] |
|
-> m (Maybe OId) | Returns: the |
Create a new commit. If updateRef
is not Nothing
, the given reference will
be updated to point to the newly created commit. Use "HEAD" to update the
HEAD of the current branch and make it point to this commit.
If messageEncoding
is set to Nothing
, "UTF-8" encoding is assumed for the
provided message
. Note that message
will not be cleaned up automatically.
You can use ggit_message_prettify
to do this yourself if needed.
createIndexEntryForFile
repositoryCreateIndexEntryForFile Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsFile b) | |
=> a |
|
-> Maybe b |
|
-> Maybe OId |
|
-> m (Maybe IndexEntry) | Returns: a |
Create a new index entry. When file
is not Nothing
, the path of the returned
entry (ggit_index_entry_get_path
) is set to the path of file
relative to
the working directory of repository
. The file must reside in the working
directory of repository
. The file related
fields of the returned entry are also queried from this file (if the file exists).
If id
is not Nothing
, then the id of the returned entry is set to id
(see ggit_index_entry_get_id
) which could point to a blob (for a file)
or a tree (for a directory).
createIndexEntryForPath
repositoryCreateIndexEntryForPath Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Maybe Text |
|
-> Maybe OId |
|
-> m (Maybe IndexEntry) | Returns: a |
Create a new index entry. When path
is not Nothing
, the path of the returned
entry (ggit_index_entry_get_path
) is set to path
. The specified path can be
either absolute or relative. In the case of
an absolute path, the path must reside within the working directory of
repository
. The file related fields of the returned entry are also queried
from this path (if the file exists).
If id
is not Nothing
, then the id of the returned entry is set to id
(see ggit_index_entry_get_id
) which could point to a blob (for a file)
or a tree (for a directory).
createNote
:: (HasCallStack, MonadIO m, IsRepository a, IsSignature b, IsSignature c) | |
=> a |
|
-> Maybe Text |
|
-> b |
|
-> c |
|
-> OId |
|
-> Text |
|
-> Bool |
|
-> m (Maybe OId) | Returns: the OID for the note or |
Adds a note for an object.
createReference
repositoryCreateReference Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> OId |
|
-> Text |
|
-> m (Maybe Ref) | Returns: the newly created reference. (Can throw |
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 objectUnref
.
createRemote
repositoryCreateRemote Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m (Maybe Remote) | Returns: a new |
Adds a remote with the default fetch refspec to the repository's configuration.
createSymbolicReference
repositoryCreateSymbolicReference Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Text |
|
-> m (Maybe Ref) | Returns: the newly created reference. (Can throw |
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 objectUnref
.
createTag
:: (HasCallStack, MonadIO m, IsRepository a, IsObject b, IsSignature c) | |
=> a |
|
-> Text |
|
-> b |
|
-> c |
|
-> Text |
|
-> [CreateFlags] |
|
-> m (Maybe OId) | Returns: the id to which the tag points, or
|
Create a new tag object.
createTagAnnotation
repositoryCreateTagAnnotation Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsObject b, IsSignature c) | |
=> a |
|
-> Text |
|
-> b |
|
-> c |
|
-> Text |
|
-> m (Maybe OId) | Returns: the id to which the tag points, or
|
Creates a new annotated tag.
createTagFromBuffer
repositoryCreateTagFromBuffer Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> [CreateFlags] |
|
-> m (Maybe OId) | Returns: the id to which the tag points, or
|
Create a new tag from a buffer describing the tag object. The buffer must be correctly formatted.
createTagLightweight
repositoryCreateTagLightweight Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsObject b) | |
=> a |
|
-> Text |
|
-> b |
|
-> [CreateFlags] |
|
-> m (Maybe OId) | Returns: the id to which the tag points, or
|
Creates a new lightweight tag.
createTreeBuilder
repositoryCreateTreeBuilder Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m (Maybe TreeBuilder) | Returns: a new |
Create a new tree builder.
createTreeBuilderFromTree
repositoryCreateTreeBuilderFromTree Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsTree b) | |
=> a | |
-> b |
|
-> m (Maybe TreeBuilder) | Returns: a new |
Create a tree builder for initialized with tree
. To create an empty
tree builder, use ggit_repository_create_tree_builder
instead.
deleteTag
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> m () | (Can throw |
Delete an existing tag reference by name.
discover
:: (HasCallStack, MonadIO m, IsFile a) | |
=> a |
|
-> m (Maybe File) | Returns: the repository location. (Can throw |
Looks for a git repository.
The lookup starts from path
and walks up the parent directories
and stops when a repository is found.
discoverFull
repositoryDiscoverFull Source #
:: (HasCallStack, MonadIO m, IsFile a) | |
=> a |
|
-> Bool |
|
-> Maybe [Text] |
|
-> m (Maybe File) | Returns: the repository location. (Can throw |
Looks for a git repository.
The lookup starts from path
and walks up the parent directories
and stops when a repository is found.
dropStash
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Word64 |
|
-> m () | (Can throw |
Removes a single stashed state from the stash list.
enumerateBranches
repositoryEnumerateBranches Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> BranchType |
|
-> m (Maybe BranchEnumerator) | Returns: a branch enumerator. (Can throw |
Get a branch enumerator to enumerate over all branches of the specified
listType
in repository
.
fileStatus
:: (HasCallStack, MonadIO m, IsRepository a, IsFile b) | |
=> a |
|
-> b |
|
-> m [StatusFlags] | Returns: the status for a single file. (Can throw |
Gets the file status for a single file.
fileStatusForeach
repositoryFileStatusForeach Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Maybe StatusOptions |
|
-> StatusCallback |
|
-> m () | (Can throw |
Gathers file statuses and run a callback for each one.
To the callback is passed the path of the file, the status and the data pointer
passed to this function. If the callback returns something other than
0, the iteration will stop and error
will be set.
Set options
to Nothing
to get the default status options.
getAheadBehind
repositoryGetAheadBehind Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> OId |
|
-> OId |
|
-> m (Word64, Word64) | (Can throw |
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.
getAttribute
repositoryGetAttribute Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> [AttributeCheckFlags] |
|
-> m (Maybe Text) | Returns: the attribute value, or |
Get the attribute value of the specified attribute for the given file.
getConfig
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m (Maybe Config) |
Get the config for a specific repository.
getDefaultNotesRef
repositoryGetDefaultNotesRef Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m (Maybe Text) | Returns: the default notes reference for |
Gets the default notes reference for repository
. It defaults to
"refs/notes/commits".
getDescendantOf
repositoryGetDescendantOf Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> OId |
|
-> OId |
|
-> m () | (Can throw |
Check whether com
mit is a descendant of ancestor
. Note that if this
function returns False
, an error might have occurred. If so, error
will
be set appropriately.
getHead
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m (Maybe 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.
getIndex
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m (Maybe Index) |
Get the index for a specific repository.
getLocation
repositoryGetLocation Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m (Maybe File) | Returns: the location of the gitdir of the repository. |
Get the gitdir location of the repository.
getSubmoduleStatus
repositoryGetSubmoduleStatus Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> SubmoduleIgnore |
|
-> m [SubmoduleStatus] | Returns: the |
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
.
getWorkdir
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m (Maybe File) | Returns: the location of the working directory of the repository. |
Gets the working directory of the repository.
initRepository
repositoryInitRepository Source #
:: (HasCallStack, MonadIO m, IsFile a) | |
=> a |
|
-> Bool |
|
-> m (Maybe Repository) | Returns: a newly created |
Creates a new git repository in the given folder.
isBare
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m Bool | Returns: |
Checks if repository
is bare.
isEmpty
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m () | (Can throw |
Checks if repository
is empty.
An empty repository has just been initialized and contains no commits.
isHeadDetached
repositoryIsHeadDetached Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m () | (Can throw |
Checks if repository
's HEAD is detached.
A repository's HEAD is detached when it points directly to a commit instead of a branch.
isHeadUnborn
repositoryIsHeadUnborn Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m () | (Can throw |
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.
listRemotes
repositoryListRemotes Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m (Maybe [Text]) | Returns: a list with the remotes. (Can throw |
Fill a list with all the remotes in repository
.
listTags
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> m (Maybe [Text]) | Returns: a list with the tags in |
Fill a list with all the tags in the repository
.
listTagsMatch
repositoryListTagsMatch Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Maybe Text |
|
-> m (Maybe [Text]) | Returns: a list with matching tags in |
Fill a list with all the tags in the repository
matching the provided
pattern. The pattern can use standard fnmatch syntax.
lookup
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> OId |
|
-> GType |
|
-> m (Maybe Object) | Returns: the found |
Lookups a reference to one of the objects in the repository
.
The generated reference must be freed with 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.
lookupBlob
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> OId |
|
-> m (Maybe Blob) | Returns: a |
Lookups a branch by its name in a repository.
lookupBranch
repositoryLookupBranch Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> BranchType |
|
-> m (Maybe Branch) | Returns: a branch by its name in a repository. (Can throw |
Lookups a branch by its name in a repository.
lookupCommit
repositoryLookupCommit Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> OId |
|
-> m (Maybe Commit) |
Lookups a branch by its name in a repository.
lookupReference
repositoryLookupReference Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> m (Maybe Ref) | Returns: the searched reference. (Can throw |
Lookups a reference by its name in repository
. The returned Ref
must
be freed with objectUnref
.
lookupReferenceDwim
repositoryLookupReferenceDwim Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> m (Maybe Ref) | Returns: the searched reference. (Can throw |
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 Ref
must be freed with objectUnref
.
lookupRemote
repositoryLookupRemote Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> m (Maybe Remote) | Returns: a new |
Gets the remote called name
.
lookupSubmodule
repositoryLookupSubmodule Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> m (Maybe Submodule) |
Lookups a submodule information by name or path. If the submodule
does not exist, Nothing
is returned and a GGIT_ERROR_NOTFOUND error set.
lookupTag
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> OId |
|
-> m (Maybe Tag) |
Lookups a branch by its name in a repository.
lookupTree
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> OId |
|
-> m (Maybe Tree) |
Lookups a branch by its name in a repository.
merge
:: (HasCallStack, MonadIO m, IsRepository a, IsCheckoutOptions b) | |
=> a |
|
-> [AnnotatedCommit] |
|
-> MergeOptions |
|
-> b |
|
-> m () | (Can throw |
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.
mergeBase
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> OId |
|
-> OId |
|
-> m (Maybe OId) | Returns: a new |
Find the merge base between two commits
mergeCommits
repositoryMergeCommits Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsCommit b, IsCommit c) | |
=> a |
|
-> b |
|
-> c |
|
-> MergeOptions |
|
-> m (Maybe Index) | Returns: a new |
Merge two commits creating a Index
reflecting the result of the merge.
mergeTrees
:: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsTree c, IsTree d) | |
=> a |
|
-> b |
|
-> c |
|
-> d |
|
-> MergeOptions |
|
-> m (Maybe Index) | Returns: a new |
Merge two trees creating a Index
reflecting the result of the merge.
noteForeach
repositoryNoteForeach Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Maybe Text |
|
-> NoteCallback |
|
-> m () | (Can throw |
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.
open
:: (HasCallStack, MonadIO m, IsFile a) | |
=> a |
|
-> m (Maybe Repository) | Returns: a newly created |
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.
pathIsIgnored
repositoryPathIsIgnored Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> m () | (Can throw |
Tests if the ignore rules apply to the path provided.
This acts similar to filtering performed when calling "git add ." on the command line.
readNote
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Maybe Text |
|
-> OId |
|
-> m (Maybe Note) | Returns: the read note or |
Reads the note for an object.
rebaseInit
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Maybe AnnotatedCommit |
|
-> Maybe AnnotatedCommit |
|
-> Maybe AnnotatedCommit |
|
-> RebaseOptions |
|
-> m (Maybe 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 objectUnref
.
rebaseOpen
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> RebaseOptions |
|
-> m (Maybe Rebase) |
Opens an existing rebase that was previously started by either an
invocation of ggit_rebase_init()
or by another client.
referencesForeach
repositoryReferencesForeach Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> ReferencesCallback |
|
-> m () | (Can throw |
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.
referencesForeachName
repositoryReferencesForeachName Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> ReferencesNameCallback |
|
-> m () | (Can throw |
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.
removeNote
:: (HasCallStack, MonadIO m, IsRepository a, IsSignature b, IsSignature c) | |
=> a |
|
-> Maybe Text |
|
-> b |
|
-> c |
|
-> OId |
|
-> m () | (Can throw |
Removes the note for an object.
removeRemote
repositoryRemoveRemote Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> m () | (Can throw |
Removes remote
from the repository
.
renameRemote
repositoryRenameRemote Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m (Maybe [Text]) | Returns: non-default refspecs that
cannot be renamed. (Can throw |
Rename the remote of repository
from name
to newName
.
reset
:: (HasCallStack, MonadIO m, IsRepository a, IsObject b, IsCheckoutOptions c) | |
=> a |
|
-> b |
|
-> ResetType |
|
-> c |
|
-> m () | (Can throw |
Performs a reset of type resetType
on repository
to target
,
or error
will be set.
resetDefault
repositoryResetDefault Source #
:: (HasCallStack, MonadIO m, IsRepository a, IsObject b) | |
=> a |
|
-> Maybe b |
|
-> [Text] |
|
-> m () | (Can throw |
Update some entries in the index from the target commit tree. The scope of
the updated entries is determined by the paths specified in pathspecs
.
Passing Nothing
in target
will result in removing entries in the index
matching the provided pathspecs.
revert
:: (HasCallStack, MonadIO m, IsRepository a, IsCommit b) | |
=> a |
|
-> b |
|
-> RevertOptions |
|
-> m () | (Can throw |
Revert the given commit
on top of the current working directory.
revparse
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> m (Maybe Object) | Returns: a |
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.
saveStash
:: (HasCallStack, MonadIO m, IsRepository a, IsSignature b) | |
=> a |
|
-> b |
|
-> Text |
|
-> [StashFlags] |
|
-> m (Maybe OId) | Returns: a new object id of the commit containing the stashed state. (Can throw |
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.
setHead
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> m () | (Can throw |
No description available in the introspection data.
setHeadDetached
repositorySetHeadDetached Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> OId |
|
-> m () | (Can throw |
No description available in the introspection data.
setRemoteUrl
repositorySetRemoteUrl Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m () | (Can throw |
Sets url for the remote
from the repository
.
setSubmoduleFetchRecurse
repositorySetSubmoduleFetchRecurse Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> SubmoduleRecurse |
|
-> m () | (Can throw |
Sets the submodule.'name'.fetchRecurseSubmodules value for the submodule. This setting won't affect any existing instances..
setSubmoduleIgnore
repositorySetSubmoduleIgnore Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> SubmoduleIgnore |
|
-> m () | (Can throw |
Sets the ignore rule for the submodule in the configuration. This does not affect any currently-loaded instances..
setSubmoduleUpdate
repositorySetSubmoduleUpdate Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> SubmoduleUpdate |
|
-> m () | (Can throw |
Sets the update rule for the submodule in the configuration. This setting won't affect any existing instances.
setSubmoduleUrl
repositorySetSubmoduleUrl Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m () | (Can throw |
Sets the URL for the submodule in the configuration.
After calling this, you may wish to call submoduleSync
to
write the changes to the checked out submodule repository.
setWorkdir
:: (HasCallStack, MonadIO m, IsRepository a, IsFile b) | |
=> a |
|
-> b |
|
-> Bool |
|
-> m () |
Sets the working directory of the repository. If updateGitlink
is set to
True
"core.worktree" will be set in the config if workdir is not the parent
of the .git directory).
stashForeach
repositoryStashForeach Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> StashCallback |
|
-> m () | (Can throw |
Loops over all the stashed states and issue a callback for each one.
If callback
returns a non-zero value, this will stop looping.
submoduleForeach
repositorySubmoduleForeach Source #
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> SubmoduleCallback |
|
-> m () | (Can throw |
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.
tagForeach
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> TagCallback |
|
-> m () | (Can throw |
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.
Properties
cloneOptions
No description available in the introspection data.
constructRepositoryCloneOptions :: (IsRepository o, MonadIO m, IsCloneOptions a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “clone-options
” property. This is rarely needed directly, but it is used by new
.
getRepositoryCloneOptions :: (MonadIO m, IsRepository o) => o -> m (Maybe CloneOptions) Source #
Get the value of the “clone-options
” property.
When overloading is enabled, this is equivalent to
get
repository #cloneOptions
head
No description available in the introspection data.
getRepositoryHead :: (MonadIO m, IsRepository o) => o -> m (Maybe Ref) Source #
Get the value of the “head
” property.
When overloading is enabled, this is equivalent to
get
repository #head
init
No description available in the introspection data.
constructRepositoryInit :: (IsRepository o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “init
” property. This is rarely needed directly, but it is used by new
.
getRepositoryInit :: (MonadIO m, IsRepository o) => o -> m Bool Source #
Get the value of the “init
” property.
When overloading is enabled, this is equivalent to
get
repository #init
isBare
No description available in the introspection data.
constructRepositoryIsBare :: (IsRepository o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “is-bare
” property. This is rarely needed directly, but it is used by new
.
getRepositoryIsBare :: (MonadIO m, IsRepository o) => o -> m Bool Source #
Get the value of the “is-bare
” property.
When overloading is enabled, this is equivalent to
get
repository #isBare
location
No description available in the introspection data.
constructRepositoryLocation :: (IsRepository o, MonadIO m, IsFile a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “location
” property. This is rarely needed directly, but it is used by new
.
getRepositoryLocation :: (MonadIO m, IsRepository o) => o -> m (Maybe File) Source #
Get the value of the “location
” property.
When overloading is enabled, this is equivalent to
get
repository #location
url
No description available in the introspection data.
constructRepositoryUrl :: (IsRepository o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “url
” property. This is rarely needed directly, but it is used by new
.
getRepositoryUrl :: (MonadIO m, IsRepository o) => o -> m (Maybe Text) Source #
Get the value of the “url
” property.
When overloading is enabled, this is equivalent to
get
repository #url
workdir
No description available in the introspection data.
clearRepositoryWorkdir :: (MonadIO m, IsRepository o) => o -> m () Source #
Set the value of the “workdir
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#workdir
constructRepositoryWorkdir :: (IsRepository o, MonadIO m, IsFile a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “workdir
” property. This is rarely needed directly, but it is used by new
.
getRepositoryWorkdir :: (MonadIO m, IsRepository o) => o -> m (Maybe File) Source #
Get the value of the “workdir
” property.
When overloading is enabled, this is equivalent to
get
repository #workdir
setRepositoryWorkdir :: (MonadIO m, IsRepository o, IsFile a) => o -> a -> m () Source #
Set the value of the “workdir
” property.
When overloading is enabled, this is equivalent to
set
repository [ #workdir:=
value ]