Documentation ¶
Index ¶
- func ConvertToStackTree(pieces map[plumbing.ReferenceName]*BranchPiece, ...) []*stackutils.StackTreeNode
- func DetectBranchTree(repo *git.Repository, remoteName string, ...) (map[plumbing.ReferenceName]*BranchPiece, error)
- func GetChildren(pieces map[plumbing.ReferenceName]*BranchPiece, branch plumbing.ReferenceName) map[plumbing.ReferenceName]*BranchPiece
- func GetStackRoot(pieces map[plumbing.ReferenceName]*BranchPiece, branch plumbing.ReferenceName) plumbing.ReferenceName
- type BranchPiece
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToStackTree ¶
func ConvertToStackTree(pieces map[plumbing.ReferenceName]*BranchPiece, currentBranch plumbing.ReferenceName, sortCurrent bool) []*stackutils.StackTreeNode
ConvertToStackTree converts the branch pieces to a tree structure.
func DetectBranchTree ¶
func DetectBranchTree(repo *git.Repository, remoteName string, trunkBranches []plumbing.ReferenceName) (map[plumbing.ReferenceName]*BranchPiece, error)
func GetChildren ¶
func GetChildren(pieces map[plumbing.ReferenceName]*BranchPiece, branch plumbing.ReferenceName) map[plumbing.ReferenceName]*BranchPiece
GetChildren returns the children of the given branch.
func GetStackRoot ¶
func GetStackRoot(pieces map[plumbing.ReferenceName]*BranchPiece, branch plumbing.ReferenceName) plumbing.ReferenceName
GetStackRoot returns the root of the stack of branches from the given branch. It returns an empty string if the stack root cannot be detected.
Types ¶
type BranchPiece ¶
type BranchPiece struct { Name plumbing.ReferenceName // If any of these are set, Parent, ParentIsTrunk, ParentMergeBase, and IncludedCommits are // unset. PossibleParents []plumbing.ReferenceName ContainsMergeCommit bool Parent plumbing.ReferenceName ParentIsTrunk bool ParentMergeBase plumbing.Hash IncludedCommits []*object.Commit }
func GetPossibleChildren ¶
func GetPossibleChildren(pieces map[plumbing.ReferenceName]*BranchPiece, branch plumbing.ReferenceName) []*BranchPiece
GetPossibleChildren returns the possible children of the given branch.
Click to show internal directories.
Click to hide internal directories.