undo

package
v20.2.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package undo provides Git Town's undo functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUndoForFinishedProgram

func CreateUndoForFinishedProgram(args CreateUndoProgramArgs) program.Program

creates the program for undoing a program that finished

func CreateUndoForRunningProgram

func CreateUndoForRunningProgram(args CreateUndoProgramArgs) (program.Program, error)

create the program to undo a currently running Git Town command

func Execute

func Execute(args ExecuteArgs) error

undoes the persisted runstate

Types

type CreateUndoProgramArgs

type CreateUndoProgramArgs struct {
	Backend        gitdomain.RunnerQuerier
	Config         config.ValidatedConfig
	DryRun         configdomain.DryRun
	FinalMessages  stringslice.Collector
	Git            git.Commands
	HasOpenChanges bool
	NoPushHook     configdomain.NoPushHook
	RunState       runstate.RunState
}

type ExecuteArgs

type ExecuteArgs struct {
	Backend          gitdomain.RunnerQuerier
	CommandsCounter  Mutable[gohacks.Counter]
	Config           config.ValidatedConfig
	Connector        Option[forgedomain.Connector]
	Detached         configdomain.Detached
	FinalMessages    stringslice.Collector
	Frontend         gitdomain.Runner
	Git              git.Commands
	HasOpenChanges   bool
	InitialStashSize gitdomain.StashSize
	RootDir          gitdomain.RepoRootDir
	RunState         runstate.RunState
	Verbose          configdomain.Verbose
}

Directories

Path Synopsis
Package undobranches restores the Git branches to a known snapshot.
Package undobranches restores the Git branches to a known snapshot.
Package undoconfig undoes changes to the configuration settings stored as Git metadata.
Package undoconfig undoes changes to the configuration settings stored as Git metadata.
Package undodomain provides the domain model for Git Town's undo functionality.
Package undodomain provides the domain model for Git Town's undo functionality.
Package undostash restores changes to the Git stash.
Package undostash restores changes to the Git stash.

Jump to

Keyboard shortcuts

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