gi-ggit-1.0.15: libgit2-glib bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Ggit.Objects.Branch

Description

Represents a branch object.

Synopsis

Exported types

newtype Branch Source #

Memory-managed wrapper type.

Constructors

Branch (ManagedPtr Branch) 

Instances

Instances details
Eq Branch Source # 
Instance details

Defined in GI.Ggit.Objects.Branch

Methods

(==) :: Branch -> Branch -> Bool #

(/=) :: Branch -> Branch -> Bool #

GObject Branch Source # 
Instance details

Defined in GI.Ggit.Objects.Branch

ManagedPtrNewtype Branch Source # 
Instance details

Defined in GI.Ggit.Objects.Branch

Methods

toManagedPtr :: Branch -> ManagedPtr Branch

TypedObject Branch Source # 
Instance details

Defined in GI.Ggit.Objects.Branch

Methods

glibType :: IO GType

HasParentTypes Branch Source # 
Instance details

Defined in GI.Ggit.Objects.Branch

IsGValue (Maybe Branch) Source #

Convert Branch to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Ggit.Objects.Branch

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Branch -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Branch)

type ParentTypes Branch Source # 
Instance details

Defined in GI.Ggit.Objects.Branch

type ParentTypes Branch = '[Ref, Native, ObjectFactoryBase, Object]

class (GObject o, IsDescendantOf Branch o) => IsBranch o Source #

Type class for types which can be safely cast to Branch, for instance with toBranch.

Instances

Instances details
(GObject o, IsDescendantOf Branch o) => IsBranch o Source # 
Instance details

Defined in GI.Ggit.Objects.Branch

toBranch :: (MonadIO m, IsBranch o) => o -> m Branch Source #

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

Methods

delete

branchDelete Source #

Arguments

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

branch: a Branch.

-> m ()

(Can throw GError)

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

branchGetName Source #

Arguments

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

branch: a Branch.

-> m (Maybe Text)

Returns: the name of the given local or remote branch or Nothing. (Can throw GError)

Gets the name of the given local or remote branch.

getUpstream

branchGetUpstream Source #

Arguments

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

branch: a Branch.

-> m (Maybe Ref)

Returns: the reference supporting the remote tracking branch or Nothing. (Can throw GError)

Gets the reference supporting the remote tracking branch, given a local branch reference.

isHead

branchIsHead Source #

Arguments

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

branch: a Branch.

-> m ()

(Can throw GError)

Determines if the current local branch is pointed at by HEAD.

move

branchMove Source #

Arguments

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

branch: a Branch.

-> Text

newBranchName: target name of the branch once the move is performed; this name is validated for consistency.

-> [CreateFlags]

flags: a CreateFlags.

-> m (Maybe Branch)

Returns: the new branch or Nothing. (Can throw GError)

Moves/renames an existing branch reference.

setUpstream

branchSetUpstream Source #

Arguments

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

branch: a Branch.

-> Text

upstreamBranchName: name of the upstream branch; if Nothing unsets it.

-> m ()

(Can throw GError)

Sets the upstream branch, for a given local branch reference