untrack

package
v0.17.14 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package untrack implements the stackit untrack command for stopping branch tracking.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Action

func Action(ctx *app.Context, opts Options, handler Handler) error

Action performs the untrack operation

Types

type Handler

type Handler interface {
	// PromptConfirmUntrackDescendants prompts user to confirm untracking descendants
	// Returns true to proceed with untracking all descendants, false to cancel
	PromptConfirmUntrackDescendants(branchName string, descendantCount int) (bool, error)

	// Cleanup restores terminal state (may be no-op)
	Cleanup()

	// IsInteractive returns true if the handler supports interactive prompts
	IsInteractive() bool
}

Handler receives events from untrack action

type NullHandler

type NullHandler struct {
	handler.NullBase
}

NullHandler is a no-op handler for when nil is passed

func (*NullHandler) PromptConfirmUntrackDescendants

func (h *NullHandler) PromptConfirmUntrackDescendants(_ string, _ int) (bool, error)

PromptConfirmUntrackDescendants implements Handler. Returns false (cancel) for null handler. Use --force flag to untrack descendants without confirmation.

type Options

type Options struct {
	BranchName string
	Force      bool
}

Options contains options for the untrack command

Jump to

Keyboard shortcuts

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