{"modulePath":"github.com/raymondji/git-stack-cli","version":"v0.0.0-20250919023704-4e49b115724e","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package stackparser\n\n## Types\n\n```go\ntype Commit struct {\n\tcommitgraph.Node\n\t// Keys are stack names\n\t// Values are 0 for any commits without branches,\n\t// or 1+ for commmits with branches.\n\t// A score of N indicates this commit was reachable following parent edges\n\t// from a commit with score N+1.\n\tStackBranchScore map[string]int\n}\n```\n\n```go\ntype NoTotalOrderError struct {\n\tStackName string\n\t// Each entry has length two\n\tIncomparableBranchPairs [][]string\n}\n```\n\n```go\nfunc (e NoTotalOrderError) Error() string\n```\n\n```go\ntype Stack struct {\n\tName    string\n\tCommits map[string]*Commit // Guaranteed to not be empty\n}\n```\n\n```go\nfunc GetCurrent(stacks []Stack, currCommit string) (Stack, error)\n```\n\n```go\nfunc ParseStacks(log libgit.Log) ([]Stack, error)\n```\nParseStacks parses commit stacks from the git commit log\n\n```go\nfunc (s Stack) Branches() []string\n```\nReturns branches in reverse lexicographic order. Guaranteed to return at least one branch.\n\n```go\nfunc (s Stack) DivergesFrom() map[string]struct{}\n```\n\n```go\nfunc (s Stack) IsCurrent(currCommit string) bool\n```\n\n```go\nfunc (s Stack) TotalOrderedBranches() ([]string, error)\n```\nTotalOrderedBranches returns all branches associated with all commits in the stack. Guaranteed to return at least one branch. If invalid, returns NoTotalOrderError.\n\n","path":"github.com/raymondji/git-stack-cli/stackparser","name":"stackparser","synopsis":"","isRedistributable":true}
