Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
Represents a branch object.
Synopsis
- newtype Branch = Branch (ManagedPtr Branch)
- class GObject o => IsBranch o
- toBranch :: (MonadIO m, IsBranch o) => o -> m Branch
- noBranch :: Maybe Branch
- branchDelete :: (HasCallStack, MonadIO m, IsBranch a) => a -> m ()
- branchGetName :: (HasCallStack, MonadIO m, IsBranch a) => a -> m (Maybe Text)
- branchGetUpstream :: (HasCallStack, MonadIO m, IsBranch a) => a -> m (Maybe Ref)
- branchIsHead :: (HasCallStack, MonadIO m, IsBranch a) => a -> m ()
- branchMove :: (HasCallStack, MonadIO m, IsBranch a) => a -> Text -> [CreateFlags] -> m (Maybe Branch)
Exported types
Memory-managed wrapper type.
Instances
GObject Branch Source # | |
Defined in GI.Ggit.Objects.Branch gobjectType :: Branch -> IO GType # | |
IsObject Branch Source # | |
Defined in GI.Ggit.Objects.Branch | |
IsBranch Branch Source # | |
Defined in GI.Ggit.Objects.Branch | |
IsNative Branch Source # | |
Defined in GI.Ggit.Objects.Branch | |
IsObjectFactoryBase Branch Source # | |
Defined in GI.Ggit.Objects.Branch | |
IsRef Branch Source # | |
Defined in GI.Ggit.Objects.Branch |
class GObject o => IsBranch o Source #
Instances
(GObject a, (UnknownAncestorError Branch a :: Constraint)) => IsBranch a Source # | |
Defined in GI.Ggit.Objects.Branch | |
IsBranch Branch Source # | |
Defined in GI.Ggit.Objects.Branch |
Methods
delete
:: (HasCallStack, MonadIO m, IsBranch a) | |
=> a |
|
-> m () | (Can throw |
Deletes an existing branch reference.
If the branch is successfully deleted, this object is
not useful anymore and if should be freed with objectUnref
.
getName
:: (HasCallStack, MonadIO m, IsBranch a) | |
=> a |
|
-> m (Maybe Text) | Returns: the name of the given local or remote branch or |
Gets the name of the given local or remote branch.
getUpstream
:: (HasCallStack, MonadIO m, IsBranch a) | |
=> a |
|
-> m (Maybe Ref) | Returns: the reference supporting the remote tracking branch or |
Gets the reference supporting the remote tracking branch, given a local branch reference.
isHead
:: (HasCallStack, MonadIO m, IsBranch a) | |
=> a |
|
-> m () | (Can throw |
Determines if the current local branch is pointed at by HEAD.
move
:: (HasCallStack, MonadIO m, IsBranch a) | |
=> a |
|
-> Text |
|
-> [CreateFlags] |
|
-> m (Maybe Branch) |
Moves/renames an existing branch reference.