Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
Represents a git remote.
Synopsis
- newtype Remote = Remote (ManagedPtr Remote)
- class (GObject o, IsDescendantOf Remote o) => IsRemote o
- toRemote :: (MonadIO m, IsRemote o) => o -> m Remote
- noRemote :: Maybe Remote
- remoteConnect :: (HasCallStack, MonadIO m, IsRemote a, IsRemoteCallbacks b, IsProxyOptions c) => a -> Direction -> b -> Maybe c -> Maybe Text -> m ()
- remoteDisconnect :: (HasCallStack, MonadIO m, IsRemote a) => a -> m ()
- remoteDownload :: (HasCallStack, MonadIO m, IsRemote a) => a -> Maybe [Text] -> FetchOptions -> m ()
- remoteGetConnected :: (HasCallStack, MonadIO m, IsRemote a) => a -> m Bool
- remoteGetFetchSpecs :: (HasCallStack, MonadIO m, IsRemote a) => a -> m (Maybe [Text])
- remoteGetName :: (HasCallStack, MonadIO m, IsRemote a) => a -> m (Maybe Text)
- remoteGetOwner :: (HasCallStack, MonadIO m, IsRemote a) => a -> m (Maybe Repository)
- remoteGetPushSpecs :: (HasCallStack, MonadIO m, IsRemote a) => a -> m (Maybe [Text])
- remoteGetUrl :: (HasCallStack, MonadIO m, IsRemote a) => a -> m (Maybe Text)
- remoteList :: (HasCallStack, MonadIO m, IsRemote a) => a -> m (Maybe [RemoteHead])
- remoteNew :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> Text -> m (Maybe Remote)
- remoteNewAnonymous :: (HasCallStack, MonadIO m, IsRepository a) => a -> Text -> m (Maybe Remote)
- remotePush :: (HasCallStack, MonadIO m, IsRemote a, IsPushOptions b) => a -> Maybe [Text] -> b -> m ()
- remoteUpdateTips :: (HasCallStack, MonadIO m, IsRemote a, IsRemoteCallbacks b) => a -> b -> Bool -> RemoteDownloadTagsType -> Maybe Text -> m ()
- remoteUpload :: (HasCallStack, MonadIO m, IsRemote a, IsPushOptions b) => a -> Maybe [Text] -> b -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Remote Source # | |
IsGValue Remote Source # | Convert |
GObject Remote Source # | |
Defined in GI.Ggit.Objects.Remote gobjectType :: IO GType # | |
HasParentTypes Remote Source # | |
Defined in GI.Ggit.Objects.Remote | |
type ParentTypes Remote Source # | |
Defined in GI.Ggit.Objects.Remote |
class (GObject o, IsDescendantOf Remote o) => IsRemote o Source #
Instances
(GObject o, IsDescendantOf Remote o) => IsRemote o Source # | |
Defined in GI.Ggit.Objects.Remote |
Methods
Overloaded methods
connect
:: (HasCallStack, MonadIO m, IsRemote a, IsRemoteCallbacks b, IsProxyOptions c) | |
=> a |
|
-> Direction |
|
-> b |
|
-> Maybe c |
|
-> Maybe Text |
|
-> m () | (Can throw |
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
:: (HasCallStack, MonadIO m, IsRemote a) | |
=> a |
|
-> m () |
Closes the connection to the remote and frees the underlying transport.
download
:: (HasCallStack, MonadIO m, IsRemote a) | |
=> a |
|
-> Maybe [Text] |
|
-> FetchOptions |
|
-> m () | (Can throw |
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
:: (HasCallStack, MonadIO m, IsRemote a) | |
=> a |
|
-> m Bool | Returns: |
Check whether remote
is connected.
getFetchSpecs
:: (HasCallStack, MonadIO m, IsRemote a) | |
=> a |
|
-> m (Maybe [Text]) | Returns: a list of fetch refspecs or |
Get the list of fetch refspecs for the given remote.
getName
:: (HasCallStack, MonadIO m, IsRemote a) | |
=> a |
|
-> m (Maybe Text) | Returns: the name of |
Gets the remote's name.
getOwner
:: (HasCallStack, MonadIO m, IsRemote a) | |
=> a |
|
-> m (Maybe Repository) | Returns: the repository where the remote resides or |
Gets the repository where remote
resides.
getPushSpecs
:: (HasCallStack, MonadIO m, IsRemote a) | |
=> a |
|
-> m (Maybe [Text]) | Returns: a list of push refspecs or |
Get the list of push refspecs for the given remote.
getUrl
:: (HasCallStack, MonadIO m, IsRemote a) | |
=> a |
|
-> m (Maybe Text) | Returns: the url of |
Gets the remote's url.
list
:: (HasCallStack, MonadIO m, IsRemote a) | |
=> a |
|
-> m (Maybe [RemoteHead]) |
Get a list of refs at the remote.
new
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m (Maybe Remote) | Returns: a newly allocated |
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
:: (HasCallStack, MonadIO m, IsRepository a) | |
=> a |
|
-> Text |
|
-> m (Maybe Remote) | Returns: a newly allocated |
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
:: (HasCallStack, MonadIO m, IsRemote a, IsPushOptions b) | |
=> a |
|
-> Maybe [Text] |
|
-> b |
|
-> m () | (Can throw |
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
:: (HasCallStack, MonadIO m, IsRemote a, IsRemoteCallbacks b) | |
=> a |
|
-> b |
|
-> Bool |
|
-> RemoteDownloadTagsType |
|
-> Maybe Text |
|
-> m () | (Can throw |
Update tips to the new state.
upload
:: (HasCallStack, MonadIO m, IsRemote a, IsPushOptions b) | |
=> a |
|
-> Maybe [Text] |
|
-> b |
|
-> m () | (Can throw |
Create a packfile and send it to the server