stackparser

package
v0.0.0-...-4e49b11 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: MIT Imports: 6 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

This section is empty.

Types

type Commit

type Commit struct {
	commitgraph.Node
	// Keys are stack names
	// Values are 0 for any commits without branches,
	// or 1+ for commmits with branches.
	// A score of N indicates this commit was reachable following parent edges
	// from a commit with score N+1.
	StackBranchScore map[string]int
}

type NoTotalOrderError

type NoTotalOrderError struct {
	StackName string
	// Each entry has length two
	IncomparableBranchPairs [][]string
}

func (NoTotalOrderError) Error

func (e NoTotalOrderError) Error() string

type Stack

type Stack struct {
	Name    string
	Commits map[string]*Commit // Guaranteed to not be empty
}

func GetCurrent

func GetCurrent(stacks []Stack, currCommit string) (Stack, error)

func ParseStacks

func ParseStacks(log libgit.Log) ([]Stack, error)

ParseStacks parses commit stacks from the git commit log

func (Stack) Branches

func (s Stack) Branches() []string

Returns branches in reverse lexicographic order. Guaranteed to return at least one branch.

func (Stack) DivergesFrom

func (s Stack) DivergesFrom() map[string]struct{}

func (Stack) IsCurrent

func (s Stack) IsCurrent(currCommit string) bool

func (Stack) TotalOrderedBranches

func (s Stack) TotalOrderedBranches() ([]string, error)

TotalOrderedBranches returns all branches associated with all commits in the stack. Guaranteed to return at least one branch. If invalid, returns NoTotalOrderError.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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