Documentation
¶
Overview ¶
internal/config/config.go
Index ¶
- Variables
- type Config
- func (c *Config) GetForkPoint(branch string) (string, error)
- func (c *Config) GetPR(branch string) (int, error)
- func (c *Config) GetParent(branch string) (string, error)
- func (c *Config) GetTrunk() (string, error)
- func (c *Config) ListTrackedBranches() ([]string, error)
- func (c *Config) RemoveForkPoint(branch string) error
- func (c *Config) RemovePR(branch string) error
- func (c *Config) RemoveParent(branch string) error
- func (c *Config) SetForkPoint(branch, sha string) error
- func (c *Config) SetPR(branch string, pr int) error
- func (c *Config) SetParent(branch, parent string) error
- func (c *Config) SetTrunk(branch string) error
Constants ¶
This section is empty.
Variables ¶
var ErrBranchNotTracked = errors.New("branch not tracked")
ErrBranchNotTracked is returned when a branch is not tracked.
var ErrNoForkPoint = errors.New("no fork point stored for branch")
ErrNoForkPoint is returned when a branch has no stored fork point.
var ErrNoPR = errors.New("no PR associated with branch")
ErrNoPR is returned when a branch has no associated PR.
var ErrNotInitialized = errors.New("stack not initialized: run 'gh stack init' first")
ErrNotInitialized is returned when stack tracking is not initialized.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config provides access to stack metadata stored in .git/config.
func (*Config) GetForkPoint ¶
GetForkPoint returns the stored fork point SHA for a branch. The fork point is where the branch originally diverged from its parent.
func (*Config) ListTrackedBranches ¶
ListTrackedBranches returns all branches that have a stackParent set.
func (*Config) RemoveForkPoint ¶
RemoveForkPoint removes the stored fork point for a branch.
func (*Config) RemoveParent ¶
RemoveParent removes the parent tracking for a branch.
func (*Config) SetForkPoint ¶
SetForkPoint stores the fork point SHA for a branch.