branchstack

package
v0.66.4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BranchesBelow

func BranchesBelow(
	commits []*models.Commit,
	branches []*models.Branch,
	branchName string,
	mainBranches []string,
) []*models.Branch

Returns the branches stacked below the branch with the given name: those whose tip is one of the given commits of the branch that hasn't been merged into a main branch yet. The branch itself and the main branches are left out. The result is in the order in which the tips appear in commits, so the branch closest to the given one comes first.

A commit counts as merged if the remote branch of a main branch contains it (this is what the commit's status says), but also if the local main branch contains it. So if a branch was merged into the local main branch, it isn't stacked below a branch on top of that main branch, and if the given branch is itself a main branch, nothing is stacked below it.

Only the commits passed in are looked at, so a branch whose tip is further down the history than the loaded commits is not found.

func CommitsMergedIntoLocalMainBranch

func CommitsMergedIntoLocalMainBranch(
	commits []*models.Commit,
	branches []*models.Branch,
	mainBranches []string,
) *set.Set[string]

Returns the hashes of those of the given commits that a local main branch contains, but whose status doesn't say that they are merged. The status looks at the remote branch of a main branch if it has one, so these are commits that were merged into a local main branch but not pushed yet.

Types

This section is empty.

Jump to

Keyboard shortcuts

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