treedetector

package
v0.0.45 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToStackTree

func ConvertToStackTree(
	db meta.DB,
	pieces map[plumbing.ReferenceName]*BranchPiece,
	currentBranch plumbing.ReferenceName,
	sortCurrent bool,
) []*stackutils.StackTreeNode

ConvertToStackTree converts the branch pieces to a tree structure.

func DetectBranches added in v0.0.40

func DetectBranches(
	repo *avgit.Repo,
	unmanagedBranches []plumbing.ReferenceName,
) (map[plumbing.ReferenceName]*BranchPiece, error)

func GetChildren

GetChildren returns the children of the given branch.

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
}

Jump to

Keyboard shortcuts

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