planner

package
v0.0.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTargetBranches

func GetTargetBranches(tx meta.ReadTx, repo *git.Repo, includeStackRoots bool, mode TargetBranchMode) ([]plumbing.ReferenceName, error)

GetTargetBranches returns the branches to be restacked.

If `includeStackRoots` is true, the stack root branches (the immediate children of the trunk branches) are included in the result.

func PlanForAmend

func PlanForAmend(tx meta.ReadTx, repo *git.Repo, currentBranch plumbing.ReferenceName) ([]sequencer.RestackOp, error)

func PlanForReparent

func PlanForReparent(tx meta.ReadTx, repo *git.Repo, currentBranch, newParentBranch plumbing.ReferenceName) ([]sequencer.RestackOp, error)

func PlanForRestack

func PlanForRestack(tx meta.ReadTx, repo *git.Repo, currentBranch plumbing.ReferenceName, restackAll, restackCurrent bool) ([]sequencer.RestackOp, error)

func PlanForSync

func PlanForSync(tx meta.ReadTx, repo *git.Repo, currentBranch plumbing.ReferenceName, restackAll, restackCurrent bool) ([]sequencer.RestackOp, error)

Types

type TargetBranchMode

type TargetBranchMode int
const (
	// Target all branches in the repository.
	AllBranches TargetBranchMode = iota
	// The current branch and all its predecessors.
	CurrentAndParents
	// The current branch and all its successors.
	CurrentAndChildren
	// Branches of the current stack. (The stack root and all its successors.)
	CurrentStack
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL