gi-ggit-1.0.1: libgit2-glib bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Ggit.Objects.Branch

Contents

Description

Represents a branch object.

Synopsis

Exported types

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

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 Text

Returns: the name of the given local or remote branch. (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. (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 Branch

Returns: the new branch. (Can throw GError)

Moves/renames an existing branch reference.