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 |
Represents a git submodule.
Synopsis
- newtype Submodule = Submodule (ManagedPtr Submodule)
- submoduleGetFetchRecurse :: (HasCallStack, MonadIO m) => Submodule -> m Bool
- submoduleGetHeadId :: (HasCallStack, MonadIO m) => Submodule -> m OId
- submoduleGetIgnore :: (HasCallStack, MonadIO m) => Submodule -> m SubmoduleIgnore
- submoduleGetIndexId :: (HasCallStack, MonadIO m) => Submodule -> m (Maybe OId)
- submoduleGetName :: (HasCallStack, MonadIO m) => Submodule -> m (Maybe Text)
- submoduleGetOwner :: (HasCallStack, MonadIO m) => Submodule -> m (Maybe Repository)
- submoduleGetPath :: (HasCallStack, MonadIO m) => Submodule -> m (Maybe Text)
- submoduleGetUpdate :: (HasCallStack, MonadIO m) => Submodule -> m SubmoduleUpdate
- submoduleGetUrl :: (HasCallStack, MonadIO m) => Submodule -> m (Maybe Text)
- submoduleGetWorkdirId :: (HasCallStack, MonadIO m) => Submodule -> m (Maybe OId)
- submoduleInit :: (HasCallStack, MonadIO m) => Submodule -> Bool -> m ()
- submoduleOpen :: (HasCallStack, MonadIO m) => Submodule -> m (Maybe Repository)
- submoduleRef :: (HasCallStack, MonadIO m) => Submodule -> m (Maybe Submodule)
- submoduleReload :: (HasCallStack, MonadIO m) => Submodule -> Bool -> m ()
- submoduleSync :: (HasCallStack, MonadIO m) => Submodule -> m ()
- submoduleUnref :: (HasCallStack, MonadIO m) => Submodule -> m ()
- submoduleUpdate :: (HasCallStack, MonadIO m, IsSubmoduleUpdateOptions a) => Submodule -> Bool -> a -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Submodule Source # | |
GBoxed Submodule Source # | |
Defined in GI.Ggit.Structs.Submodule | |
ManagedPtrNewtype Submodule Source # | |
Defined in GI.Ggit.Structs.Submodule | |
TypedObject Submodule Source # | |
Defined in GI.Ggit.Structs.Submodule | |
HasParentTypes Submodule Source # | |
Defined in GI.Ggit.Structs.Submodule | |
IsGValue (Maybe Submodule) Source # | Convert |
Defined in GI.Ggit.Structs.Submodule | |
type ParentTypes Submodule Source # | |
Defined in GI.Ggit.Structs.Submodule |
Methods
Click to display all available methods, including inherited ones
getFetchRecurse
submoduleGetFetchRecurse Source #
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> m Bool | Returns: whether or not fetch recursively. |
Gets whether to fetch recursively. See see gitmodules(5) fetchRecurseSubmodules.
getHeadId
submoduleGetHeadId :: (HasCallStack, MonadIO m) => Submodule -> m OId Source #
No description available in the introspection data.
getIgnore
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> m SubmoduleIgnore | Returns: the |
Gets a SubmoduleIgnore
. See see gitmodules(5) ignore.
getIndexId
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> m (Maybe OId) | Returns: the OID for the submodule in the index or |
Gets the OID for the submodule in the index or Nothing
if there is no index.
getName
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> m (Maybe Text) | Returns: the name of the submodule from .gitmodules or |
Gets the name of the submodule from .gitmodules.
getOwner
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> m (Maybe Repository) | Returns: the containing repository for a submodule or |
Gets the containing repository for a submodule.
getPath
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> m (Maybe Text) | Returns: the path to the submodule from
the repo working directory or |
Gets the path to the submodule from the repo working directory.
It is almost always the same as the name.
See submoduleGetName
.
getUpdate
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> m SubmoduleUpdate | Returns: the |
Gets a SubmoduleUpdate
. See see gitmodules(5) update.
getUrl
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> m (Maybe Text) | Returns: the url for the submodule or |
Gets the url for the submodule or Nothing
if the submodule has been deleted
but not yet committed.
getWorkdirId
submoduleGetWorkdirId Source #
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> m (Maybe OId) | Returns: the OID for the submodule in the current working directory or |
Gets the OID for the submodule in the current working directory.
Corresponds to looking up 'HEAD' in the checked out submodule.
If there are pending changes in the index or anything
else, this won't notice that. You should call ggit_submodule_status()
for a more complete picture about the state of the working directory.
init
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> Bool |
|
-> m () | (Can throw |
Just like "git submodule init", this copies information about the submodule into ".git/config". You can use the accessor functions above to alter the in-memory git_submodule object and control what is written to the config, overriding what is in .gitmodules.
open
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> m (Maybe Repository) | Returns: the opened |
Open the repository for a submodule. Multiple calls to this function
will return distinct Repository
objects. Only submodules which are
checked out in the working directory can be opened.
ref
Atomically increments the reference count of submodule
by one.
This function is MT-safe and may be called from any thread.
reload
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> Bool |
|
-> m () | (Can throw |
Rereads submodule info from config, index, and HEAD. Call this if you have reason to believe that it has changed.
sync
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> m () | (Can throw |
Copies the information about the submodules URL into the checked out submodule config, acting like "git submodule sync". This is useful if you have altered the URL for the submodule (or it has been altered by a fetch of upstream changes) and you need to update your local repo.
unref
:: (HasCallStack, MonadIO m) | |
=> Submodule |
|
-> m () |
Atomically decrements the reference count of submodule
by one.
If the reference count drops to 0, remote
is freed.
update
:: (HasCallStack, MonadIO m, IsSubmoduleUpdateOptions a) | |
=> Submodule |
|
-> Bool |
|
-> a |
|
-> m () | (Can throw |
Update a submodule. This will clone a missing submodule and checkout the subrepository to the commit specified in the index of the containing repository. If the submodule repository doesn't contain the target commit (e.g. because fetchRecurseSubmodules isn't set), then the submodule is fetched using the fetch options supplied in options.