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.Branch

Contents

Description

Represents a branch object.

Synopsis

Exported types

newtype Branch Source #

Memory-managed wrapper type.

Constructors

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

Defined in GI.Ggit.Objects.Branch

Methods

gobjectType :: IO GType #

HasParentTypes Branch Source # 
Instance details

Defined in GI.Ggit.Objects.Branch

type ParentTypes Branch Source # 
Instance details

Defined in GI.Ggit.Objects.Branch

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

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
(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.

noBranch :: Maybe Branch Source #

A convenience alias for Nothing :: Maybe Branch.

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