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.Objects.Remote

Contents

Description

Represents a git remote.

Synopsis

Exported types

newtype Remote Source #

Memory-managed wrapper type.

Constructors

Remote (ManagedPtr Remote) 
Instances
GObject Remote Source # 
Instance details

Defined in GI.Ggit.Objects.Remote

Methods

gobjectType :: IO GType #

HasParentTypes Remote Source # 
Instance details

Defined in GI.Ggit.Objects.Remote

type ParentTypes Remote Source # 
Instance details

Defined in GI.Ggit.Objects.Remote

type ParentTypes Remote = Native ': (ObjectFactoryBase ': (Object ': ([] :: [Type])))

class (GObject o, IsDescendantOf Remote o) => IsRemote o Source #

Type class for types which can be safely cast to Remote, for instance with toRemote.

Instances
(GObject o, IsDescendantOf Remote o) => IsRemote o Source # 
Instance details

Defined in GI.Ggit.Objects.Remote

toRemote :: (MonadIO m, IsRemote o) => o -> m Remote Source #

Cast to Remote, for types for which this is known to be safe. For general casts, use castTo.

noRemote :: Maybe Remote Source #

A convenience alias for Nothing :: Maybe Remote.

Methods

connect

remoteConnect Source #

Arguments

:: (HasCallStack, MonadIO m, IsRemote a, IsRemoteCallbacks b, IsProxyOptions c) 
=> a

remote: a Remote.

-> Direction

direction: whether you want to receive or send data.

-> b

callbacks: the callbacks to use for this connection.

-> Maybe c

proxyOptions: the proxy options.

-> Maybe Text

customHeaders: extra HTTP headers to use in this connection.

-> m ()

(Can throw GError)

Opens a connection to a remote. The transport is selected based on the URL. The direction argument is due to a limitation of the git protocol (over TCP or SSH) which starts up a specific binary which can only do the one or the other.

disconnect

remoteDisconnect Source #

Arguments

:: (HasCallStack, MonadIO m, IsRemote a) 
=> a

remote: a Remote.

-> m () 

Closes the connection to the remote and frees the underlying transport.

download

remoteDownload Source #

Arguments

:: (HasCallStack, MonadIO m, IsRemote a) 
=> a

remote: a Remote.

-> Maybe [Text]

specs: the ref specs.

-> FetchOptions

fetchOptions: a FetchOptions.

-> m ()

(Can throw GError)

Connect to the remote if not yet connected, negotiate with the remote about which objects are missing and download the resulting packfile and its index.

getConnected

remoteGetConnected Source #

Arguments

:: (HasCallStack, MonadIO m, IsRemote a) 
=> a

remote: a Remote.

-> m Bool

Returns: True if it is connected.

Check whether remote is connected.

getFetchSpecs

remoteGetFetchSpecs Source #

Arguments

:: (HasCallStack, MonadIO m, IsRemote a) 
=> a

remote: a Remote.

-> m (Maybe [Text])

Returns: a list of fetch refspecs or Nothing. (Can throw GError)

Get the list of fetch refspecs for the given remote.

getName

remoteGetName Source #

Arguments

:: (HasCallStack, MonadIO m, IsRemote a) 
=> a

remote: a Remote.

-> m (Maybe Text)

Returns: the name of remote or Nothing.

Gets the remote's name.

getOwner

remoteGetOwner Source #

Arguments

:: (HasCallStack, MonadIO m, IsRemote a) 
=> a

remote: a Remote.

-> m (Maybe Repository)

Returns: the repository where the remote resides or Nothing.

Gets the repository where remote resides.

getPushSpecs

remoteGetPushSpecs Source #

Arguments

:: (HasCallStack, MonadIO m, IsRemote a) 
=> a

remote: a Remote.

-> m (Maybe [Text])

Returns: a list of push refspecs or Nothing. (Can throw GError)

Get the list of push refspecs for the given remote.

getUrl

remoteGetUrl Source #

Arguments

:: (HasCallStack, MonadIO m, IsRemote a) 
=> a

remote: GgitRemote.

-> m (Maybe Text)

Returns: the url of remote or Nothing.

Gets the remote's url.

list

remoteList Source #

Arguments

:: (HasCallStack, MonadIO m, IsRemote a) 
=> a

remote: a Remote.

-> m (Maybe [RemoteHead])

Returns: the remote heads or Nothing. (Can throw GError)

Get a list of refs at the remote.

new

remoteNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepository a) 
=> a

repository: a Repository.

-> Text

name: the remote's name.

-> Text

url: the remote repository's URL.

-> m (Maybe Remote)

Returns: a newly allocated Remote or Nothing. (Can throw GError)

Creates a remote with the default refspecs in memory. You can use this when you have a URL instead of a remote's name.

newAnonymous

remoteNewAnonymous Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepository a) 
=> a

repository: a Repository.

-> Text

url: the remote repository's URL.

-> m (Maybe Remote)

Returns: a newly allocated Remote or Nothing. (Can throw GError)

Creates a remote with the specified refspec in memory. You can use this when you have a URL instead of a remote's name.

push

remotePush Source #

Arguments

:: (HasCallStack, MonadIO m, IsRemote a, IsPushOptions b) 
=> a

remote: a Remote.

-> Maybe [Text]

specs: the ref specs.

-> b

pushOptions: a PushOptions.

-> m ()

(Can throw GError)

Connect to the remote if not yet connected, negotiate with the remote about which objects are missing, create a packfile with the missing objects and send it.

updateTips

remoteUpdateTips Source #

Arguments

:: (HasCallStack, MonadIO m, IsRemote a, IsRemoteCallbacks b) 
=> a

remote: a Remote.

-> b

callbacks: a RemoteCallbacks.

-> Bool

updateFetchHead: whether to write to FETCH_HEAD. True to behave like git.

-> RemoteDownloadTagsType

tagsType: what the behaviour for downloading tags is for this fetch. This is ignored for push. This must be the same value passed to remoteDownload.

-> Maybe Text

message: reflog_message The message to insert into the reflogs. If Nothing and fetching, the default is "fetch <name>", where <name> is the name of the remote (or its url, for in-memory remotes). This parameter is ignored when pushing.

-> m ()

(Can throw GError)

Update tips to the new state.

upload

remoteUpload Source #

Arguments

:: (HasCallStack, MonadIO m, IsRemote a, IsPushOptions b) 
=> a

remote: a Remote.

-> Maybe [Text]

specs: the ref specs.

-> b

pushOptions: a PushOptions

-> m ()

(Can throw GError)

Create a packfile and send it to the server