Documentation
¶
Index ¶
- func DateSlug(message string) string
- func FollowsNumbering(prefix, branchName string) bool
- func NextNumberedName(prefix string, existingBranches []string) string
- func ResolveBranchName(prefix, message, explicitName string, existingBranches []string, numbered bool) (name string, info string)
- func Slugify(message string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FollowsNumbering ¶
FollowsNumbering returns true if branchName matches the pattern {prefix}/\d+.
func NextNumberedName ¶
NextNumberedName scans existingBranches for the highest number matching {prefix}/NN and returns {prefix}/{next} with zero-padded two digits.
func ResolveBranchName ¶
func ResolveBranchName(prefix, message, explicitName string, existingBranches []string, numbered bool) (name string, info string)
ResolveBranchName implements the full decision tree for branch name generation.
Parameters:
- prefix: configured stack prefix (may be empty)
- message: commit message (from -m flag; may be empty if not using auto-naming)
- explicitName: branch name provided as argument (may be empty)
- existingBranches: current branch names in the stack
- numbered: true if the stack uses auto-incrementing numbered branches
Returns the resolved branch name and an informational message (may be empty).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.