gi-ggit-1.0.7: libgit2-glib bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Ggit.Structs.Submodule

Contents

Description

Represents a git submodule.

Synopsis

Exported types

newtype Submodule Source #

Memory-managed wrapper type.

Instances
BoxedObject Submodule Source # 
Instance details

Defined in GI.Ggit.Structs.Submodule

noSubmodule :: Maybe Submodule Source #

A convenience alias for Nothing :: Maybe Submodule.

Methods

getFetchRecurse

submoduleGetFetchRecurse Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a 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

submoduleGetIgnore Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> m SubmoduleIgnore

Returns: the SubmoduleIgnore.

Gets a SubmoduleIgnore. See see gitmodules(5) ignore.

getIndexId

submoduleGetIndexId Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> m (Maybe OId)

Returns: the OID for the submodule in the index or Nothing.

Gets the OID for the submodule in the index or Nothing if there is no index.

getName

submoduleGetName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> m (Maybe Text)

Returns: the name of the submodule from .gitmodules or Nothing.

Gets the name of the submodule from .gitmodules.

getOwner

submoduleGetOwner Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> m (Maybe Repository)

Returns: the containing repository for a submodule or Nothing.

Gets the containing repository for a submodule.

getPath

submoduleGetPath Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> m (Maybe Text)

Returns: the path to the submodule from the repo working directory or Nothing.

Gets the path to the submodule from the repo working directory. It is almost always the same as the name. See submoduleGetName.

getUpdate

submoduleGetUpdate Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> m SubmoduleUpdate

Returns: the SubmoduleUpdate.

Gets a SubmoduleUpdate. See see gitmodules(5) update.

getUrl

submoduleGetUrl Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> m (Maybe Text)

Returns: the url for the submodule or Nothing.

Gets the url for the submodule or Nothing if the submodule has been deleted but not yet committed.

getWorkdirId

submoduleGetWorkdirId Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> m (Maybe OId)

Returns: the OID for the submodule in the current working directory or Nothing.

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

submoduleInit Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> Bool

overwrite: forces existing entries to be updated.

-> m ()

(Can throw GError)

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

submoduleOpen Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> m (Maybe Repository)

Returns: the opened Repository or Nothing in case of an error. (Can throw GError)

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

submoduleRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> m (Maybe Submodule)

Returns: the passed in Submodule or Nothing.

Atomically increments the reference count of submodule by one. This function is MT-safe and may be called from any thread.

reload

submoduleReload Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> Bool

force: reload even if the data doesn't seem out of date.

-> m ()

(Can throw GError)

Rereads submodule info from config, index, and HEAD. Call this if you have reason to believe that it has changed.

sync

submoduleSync Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> m ()

(Can throw GError)

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

submoduleUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Submodule

submodule: a Submodule.

-> m () 

Atomically decrements the reference count of submodule by one. If the reference count drops to 0, remote is freed.

update

submoduleUpdate Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubmoduleUpdateOptions a) 
=> Submodule

submodule: a Submodule.

-> Bool

init: If the submodule is not initialized, setting this flag to true will initialize the submodule before updating. Otherwise, this will return an error if attempting to update an uninitialzed repository. but setting this to true forces them to be updated.

-> a

options: a SubmoduleUpdateOptions object.

-> m ()

(Can throw GError)

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.