Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureEnabled ¶
func EnsureEnabled(ctx context.Context, cfg GitConfigurer, interactive bool, pauser Pauser) (bool, error)
EnsureEnabled offers to enable git rerere for this repository. It never prompts when interactive is false or the user previously declined.
When rerere.enabled is already true, it still ensures rerere.autoupdate is true — stackit's auto-continue loop (see internal/git/rebase.go) relies on rerere staging resolutions itself, and silently no-ops when autoupdate is off.
If pauser is non-nil, it is paused around the confirmation prompt so a surrounding TUI does not contend for stdin/stdout.
Types ¶
type ConfirmFunc ¶
ConfirmFunc prompts the user for a yes/no answer. Matches the signature of tui.PromptConfirm.
type GitConfigurer ¶ added in v0.19.1
type GitConfigurer interface {
GetConfig(key string) (string, error)
SetConfig(key, value string) error
}
GitConfigurer reads and writes git configuration values. Both git.Runner and engine.Engine satisfy it, so callers can pass the engine rather than reaching for the raw git runner.