cli-utils-4.1.0
LicenseBSD3
Maintainertbidne@gmail.com
Safe HaskellNone
LanguageHaskell2010

Git.FastForward.Core.MonadUpdateBranches

Description

The MonadUpdateBranches class.

Synopsis

Documentation

class Monad m => MonadUpdateBranches m where Source #

The MonadUpdateBranches class is used to describe updating branches on a git filesystem.

Methods

fetch :: Maybe FilePath -> m () Source #

Performs fetch.

getBranches :: Maybe FilePath -> m LocalBranches Source #

Retrieves all local branches.

updateBranch :: Maybe FilePath -> MergeType -> Name -> m UpdateResult Source #

Updates a branch by Name, returns the result.

pushBranches :: Maybe FilePath -> [Name] -> m [UpdateResult] Source #

Pushes branches, returns the results.

checkoutCurrent :: Maybe FilePath -> CurrentBranch -> m () Source #

Checks out the passed CurrentBranch.

Instances

Instances details
MonadUpdateBranches IO Source #

MonadUpdateBranches instance for IO. In general, we do not care about error handling except during updateBranch. This is because a failure during updateBranch is relatively common as we're being conservative by merging with "--ff-only", and we'd rather log it and continue trying to update other branches.

Instance details

Defined in Git.FastForward.Core.MonadUpdateBranches

MonadUpdateBranches m => MonadUpdateBranches (AppT Env m) Source # 
Instance details

Defined in Git.FastForward.Core.MonadUpdateBranches

runUpdateBranches :: (MonadReader Env m, MonadLogger m, MonadUpdateBranches m) => m () Source #

High level logic of MonadUpdateBranches usage. This function is the entrypoint for any MonadUpdateBranches instance.