opcodes

package
v12.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package opcode defines the individual operations that the Git Town VM can execute. All opcodes implement the shared.Opcode interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lookup

func Lookup(opcodeType string) shared.Opcode

func Types

func Types() []shared.Opcode

Types provides all existing opcodes. This is used to iterate all opcode types.

Types

type AbortMerge

type AbortMerge struct {
	// contains filtered or unexported fields
}

AbortMerge aborts the current merge conflict.

func (*AbortMerge) CreateAbortProgram

func (self *AbortMerge) CreateAbortProgram() []shared.Opcode

func (*AbortMerge) CreateAutomaticUndoError

func (self *AbortMerge) CreateAutomaticUndoError() error

func (*AbortMerge) CreateContinueProgram

func (self *AbortMerge) CreateContinueProgram() []shared.Opcode

func (*AbortMerge) Run

func (self *AbortMerge) Run(args shared.RunArgs) error

func (*AbortMerge) ShouldAutomaticallyUndoOnError

func (self *AbortMerge) ShouldAutomaticallyUndoOnError() bool

type AbortRebase

type AbortRebase struct {
	// contains filtered or unexported fields
}

AbortRebase represents aborting on ongoing merge conflict. This opcode is used in the abort scripts for Git Town commands.

func (*AbortRebase) CreateAbortProgram

func (self *AbortRebase) CreateAbortProgram() []shared.Opcode

func (*AbortRebase) CreateAutomaticUndoError

func (self *AbortRebase) CreateAutomaticUndoError() error

func (*AbortRebase) CreateContinueProgram

func (self *AbortRebase) CreateContinueProgram() []shared.Opcode

func (*AbortRebase) Run

func (self *AbortRebase) Run(args shared.RunArgs) error

func (*AbortRebase) ShouldAutomaticallyUndoOnError

func (self *AbortRebase) ShouldAutomaticallyUndoOnError() bool

type AddToPerennialBranches

type AddToPerennialBranches struct {
	Branch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

AddToPerennialBranches adds the branch with the given name as a perennial branch.

func (*AddToPerennialBranches) CreateAbortProgram

func (self *AddToPerennialBranches) CreateAbortProgram() []shared.Opcode

func (*AddToPerennialBranches) CreateAutomaticUndoError

func (self *AddToPerennialBranches) CreateAutomaticUndoError() error

func (*AddToPerennialBranches) CreateContinueProgram

func (self *AddToPerennialBranches) CreateContinueProgram() []shared.Opcode

func (*AddToPerennialBranches) Run

func (self *AddToPerennialBranches) Run(args shared.RunArgs) error

func (*AddToPerennialBranches) ShouldAutomaticallyUndoOnError

func (self *AddToPerennialBranches) ShouldAutomaticallyUndoOnError() bool

type ChangeParent

type ChangeParent struct {
	Branch gitdomain.LocalBranchName
	Parent gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

ChangeParent changes the parent of the given branch to the given parent. Use SetParent to set the parent if no parent existed before.

func (*ChangeParent) CreateAbortProgram

func (self *ChangeParent) CreateAbortProgram() []shared.Opcode

func (*ChangeParent) CreateAutomaticUndoError

func (self *ChangeParent) CreateAutomaticUndoError() error

func (*ChangeParent) CreateContinueProgram

func (self *ChangeParent) CreateContinueProgram() []shared.Opcode

func (*ChangeParent) Run

func (self *ChangeParent) Run(args shared.RunArgs) error

func (*ChangeParent) ShouldAutomaticallyUndoOnError

func (self *ChangeParent) ShouldAutomaticallyUndoOnError() bool

type Checkout

type Checkout struct {
	Branch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

Checkout checks out a new branch.

func (*Checkout) CreateAbortProgram

func (self *Checkout) CreateAbortProgram() []shared.Opcode

func (*Checkout) CreateAutomaticUndoError

func (self *Checkout) CreateAutomaticUndoError() error

func (*Checkout) CreateContinueProgram

func (self *Checkout) CreateContinueProgram() []shared.Opcode

func (*Checkout) Run

func (self *Checkout) Run(args shared.RunArgs) error

func (*Checkout) ShouldAutomaticallyUndoOnError

func (self *Checkout) ShouldAutomaticallyUndoOnError() bool

type CheckoutIfExists

type CheckoutIfExists struct {
	Branch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

CheckoutIfExists does the same as Checkout but only if that branch actually exists.

func (*CheckoutIfExists) CreateAbortProgram

func (self *CheckoutIfExists) CreateAbortProgram() []shared.Opcode

func (*CheckoutIfExists) CreateAutomaticUndoError

func (self *CheckoutIfExists) CreateAutomaticUndoError() error

func (*CheckoutIfExists) CreateContinueProgram

func (self *CheckoutIfExists) CreateContinueProgram() []shared.Opcode

func (*CheckoutIfExists) Run

func (self *CheckoutIfExists) Run(args shared.RunArgs) error

func (*CheckoutIfExists) ShouldAutomaticallyUndoOnError

func (self *CheckoutIfExists) ShouldAutomaticallyUndoOnError() bool

type CheckoutParent

type CheckoutParent struct {
	CurrentBranch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

CheckoutParent checks out the parent branch of the current branch.

func (*CheckoutParent) CreateAbortProgram

func (self *CheckoutParent) CreateAbortProgram() []shared.Opcode

func (*CheckoutParent) CreateAutomaticUndoError

func (self *CheckoutParent) CreateAutomaticUndoError() error

func (*CheckoutParent) CreateContinueProgram

func (self *CheckoutParent) CreateContinueProgram() []shared.Opcode

func (*CheckoutParent) Run

func (self *CheckoutParent) Run(args shared.RunArgs) error

func (*CheckoutParent) ShouldAutomaticallyUndoOnError

func (self *CheckoutParent) ShouldAutomaticallyUndoOnError() bool

type CommitOpenChanges

type CommitOpenChanges struct {
	// contains filtered or unexported fields
}

CommitOpenChanges commits all open changes as a new commit. It does not ask the user for a commit message, but chooses one automatically.

func (*CommitOpenChanges) CreateAbortProgram

func (self *CommitOpenChanges) CreateAbortProgram() []shared.Opcode

func (*CommitOpenChanges) CreateAutomaticUndoError

func (self *CommitOpenChanges) CreateAutomaticUndoError() error

func (*CommitOpenChanges) CreateContinueProgram

func (self *CommitOpenChanges) CreateContinueProgram() []shared.Opcode

func (*CommitOpenChanges) Run

func (self *CommitOpenChanges) Run(args shared.RunArgs) error

func (*CommitOpenChanges) ShouldAutomaticallyUndoOnError

func (self *CommitOpenChanges) ShouldAutomaticallyUndoOnError() bool

type ConnectorMergeProposal

type ConnectorMergeProposal struct {
	Branch          gitdomain.LocalBranchName
	CommitMessage   string
	ProposalMessage string
	ProposalNumber  int
	// contains filtered or unexported fields
}

ConnectorMergeProposal squash merges the branch with the given name into the current branch.

func (*ConnectorMergeProposal) CreateAbortProgram

func (self *ConnectorMergeProposal) CreateAbortProgram() []shared.Opcode

func (*ConnectorMergeProposal) CreateAutomaticUndoError

func (self *ConnectorMergeProposal) CreateAutomaticUndoError() error

func (*ConnectorMergeProposal) CreateContinueProgram

func (self *ConnectorMergeProposal) CreateContinueProgram() []shared.Opcode

func (*ConnectorMergeProposal) Run

func (self *ConnectorMergeProposal) Run(args shared.RunArgs) error

func (*ConnectorMergeProposal) ShouldAutomaticallyUndoOnError

func (self *ConnectorMergeProposal) ShouldAutomaticallyUndoOnError() bool

ShouldAutomaticallyUndoOnError returns whether this opcode should cause the command to automatically undo if it errors.

type ContinueMerge

type ContinueMerge struct {
	// contains filtered or unexported fields
}

ContinueMerge finishes an ongoing merge conflict assuming all conflicts have been resolved by the user.

func (*ContinueMerge) CreateAbortProgram

func (self *ContinueMerge) CreateAbortProgram() []shared.Opcode

func (*ContinueMerge) CreateAutomaticUndoError

func (self *ContinueMerge) CreateAutomaticUndoError() error

func (*ContinueMerge) CreateContinueProgram

func (self *ContinueMerge) CreateContinueProgram() []shared.Opcode

func (*ContinueMerge) Run

func (self *ContinueMerge) Run(args shared.RunArgs) error

func (*ContinueMerge) ShouldAutomaticallyUndoOnError

func (self *ContinueMerge) ShouldAutomaticallyUndoOnError() bool

type ContinueRebase

type ContinueRebase struct {
	// contains filtered or unexported fields
}

ContinueRebase finishes an ongoing rebase operation assuming all conflicts have been resolved by the user.

func (*ContinueRebase) CreateAbortProgram

func (self *ContinueRebase) CreateAbortProgram() []shared.Opcode

func (*ContinueRebase) CreateAutomaticUndoError

func (self *ContinueRebase) CreateAutomaticUndoError() error

func (*ContinueRebase) CreateContinueProgram

func (self *ContinueRebase) CreateContinueProgram() []shared.Opcode

func (*ContinueRebase) Run

func (self *ContinueRebase) Run(args shared.RunArgs) error

func (*ContinueRebase) ShouldAutomaticallyUndoOnError

func (self *ContinueRebase) ShouldAutomaticallyUndoOnError() bool

type CreateBranch

type CreateBranch struct {
	Branch        gitdomain.LocalBranchName
	StartingPoint gitdomain.Location
	// contains filtered or unexported fields
}

CreateBranch creates a new branch but leaves the current branch unchanged.

func (*CreateBranch) CreateAbortProgram

func (self *CreateBranch) CreateAbortProgram() []shared.Opcode

func (*CreateBranch) CreateAutomaticUndoError

func (self *CreateBranch) CreateAutomaticUndoError() error

func (*CreateBranch) CreateContinueProgram

func (self *CreateBranch) CreateContinueProgram() []shared.Opcode

func (*CreateBranch) Run

func (self *CreateBranch) Run(args shared.RunArgs) error

func (*CreateBranch) ShouldAutomaticallyUndoOnError

func (self *CreateBranch) ShouldAutomaticallyUndoOnError() bool

type CreateBranchExistingParent

type CreateBranchExistingParent struct {
	Ancestors gitdomain.LocalBranchNames // list of ancestors - uses the first existing ancestor in this list
	Branch    gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

CreateBranchExistingParent creates a new branch with the first existing entry from the given ancestor list as its parent.

func (*CreateBranchExistingParent) CreateAbortProgram

func (self *CreateBranchExistingParent) CreateAbortProgram() []shared.Opcode

func (*CreateBranchExistingParent) CreateAutomaticUndoError

func (self *CreateBranchExistingParent) CreateAutomaticUndoError() error

func (*CreateBranchExistingParent) CreateContinueProgram

func (self *CreateBranchExistingParent) CreateContinueProgram() []shared.Opcode

func (*CreateBranchExistingParent) Run

func (*CreateBranchExistingParent) ShouldAutomaticallyUndoOnError

func (self *CreateBranchExistingParent) ShouldAutomaticallyUndoOnError() bool

type CreateProposal

type CreateProposal struct {
	Branch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

CreateProposal creates a new proposal for the current branch.

func (*CreateProposal) CreateAbortProgram

func (self *CreateProposal) CreateAbortProgram() []shared.Opcode

func (*CreateProposal) CreateAutomaticUndoError

func (self *CreateProposal) CreateAutomaticUndoError() error

func (*CreateProposal) CreateContinueProgram

func (self *CreateProposal) CreateContinueProgram() []shared.Opcode

func (*CreateProposal) Run

func (self *CreateProposal) Run(args shared.RunArgs) error

func (*CreateProposal) ShouldAutomaticallyUndoOnError

func (self *CreateProposal) ShouldAutomaticallyUndoOnError() bool

type CreateRemoteBranch

type CreateRemoteBranch struct {
	Branch gitdomain.LocalBranchName
	SHA    gitdomain.SHA
	// contains filtered or unexported fields
}

CreateRemoteBranch pushes the given local branch up to origin.

func (*CreateRemoteBranch) CreateAbortProgram

func (self *CreateRemoteBranch) CreateAbortProgram() []shared.Opcode

func (*CreateRemoteBranch) CreateAutomaticUndoError

func (self *CreateRemoteBranch) CreateAutomaticUndoError() error

func (*CreateRemoteBranch) CreateContinueProgram

func (self *CreateRemoteBranch) CreateContinueProgram() []shared.Opcode

func (*CreateRemoteBranch) Run

func (self *CreateRemoteBranch) Run(args shared.RunArgs) error

func (*CreateRemoteBranch) ShouldAutomaticallyUndoOnError

func (self *CreateRemoteBranch) ShouldAutomaticallyUndoOnError() bool

type CreateTrackingBranch

type CreateTrackingBranch struct {
	Branch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

CreateTrackingBranch pushes the given local branch up to origin and marks it as tracking the current branch.

func (*CreateTrackingBranch) CreateAbortProgram

func (self *CreateTrackingBranch) CreateAbortProgram() []shared.Opcode

func (*CreateTrackingBranch) CreateAutomaticUndoError

func (self *CreateTrackingBranch) CreateAutomaticUndoError() error

func (*CreateTrackingBranch) CreateContinueProgram

func (self *CreateTrackingBranch) CreateContinueProgram() []shared.Opcode

func (*CreateTrackingBranch) Run

func (self *CreateTrackingBranch) Run(args shared.RunArgs) error

func (*CreateTrackingBranch) ShouldAutomaticallyUndoOnError

func (self *CreateTrackingBranch) ShouldAutomaticallyUndoOnError() bool

type DeleteBranchIfEmptyAtRuntime

type DeleteBranchIfEmptyAtRuntime struct {
	Branch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

DeleteBranchIfEmptyAtRuntime allows running different opcodes based on a condition evaluated at runtime.

func (*DeleteBranchIfEmptyAtRuntime) CreateAbortProgram

func (self *DeleteBranchIfEmptyAtRuntime) CreateAbortProgram() []shared.Opcode

func (*DeleteBranchIfEmptyAtRuntime) CreateAutomaticUndoError

func (self *DeleteBranchIfEmptyAtRuntime) CreateAutomaticUndoError() error

func (*DeleteBranchIfEmptyAtRuntime) CreateContinueProgram

func (self *DeleteBranchIfEmptyAtRuntime) CreateContinueProgram() []shared.Opcode

func (*DeleteBranchIfEmptyAtRuntime) Run

func (*DeleteBranchIfEmptyAtRuntime) ShouldAutomaticallyUndoOnError

func (self *DeleteBranchIfEmptyAtRuntime) ShouldAutomaticallyUndoOnError() bool

type DeleteLocalBranch

type DeleteLocalBranch struct {
	Branch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

DeleteLocalBranch deletes the branch with the given name.

func (*DeleteLocalBranch) CreateAbortProgram

func (self *DeleteLocalBranch) CreateAbortProgram() []shared.Opcode

func (*DeleteLocalBranch) CreateAutomaticUndoError

func (self *DeleteLocalBranch) CreateAutomaticUndoError() error

func (*DeleteLocalBranch) CreateContinueProgram

func (self *DeleteLocalBranch) CreateContinueProgram() []shared.Opcode

func (*DeleteLocalBranch) Run

func (self *DeleteLocalBranch) Run(args shared.RunArgs) error

func (*DeleteLocalBranch) ShouldAutomaticallyUndoOnError

func (self *DeleteLocalBranch) ShouldAutomaticallyUndoOnError() bool

type DeleteParentBranch

type DeleteParentBranch struct {
	Branch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

DeleteParentBranch removes the parent branch entry in the Git Town configuration.

func (*DeleteParentBranch) CreateAbortProgram

func (self *DeleteParentBranch) CreateAbortProgram() []shared.Opcode

func (*DeleteParentBranch) CreateAutomaticUndoError

func (self *DeleteParentBranch) CreateAutomaticUndoError() error

func (*DeleteParentBranch) CreateContinueProgram

func (self *DeleteParentBranch) CreateContinueProgram() []shared.Opcode

func (*DeleteParentBranch) Run

func (self *DeleteParentBranch) Run(args shared.RunArgs) error

func (*DeleteParentBranch) ShouldAutomaticallyUndoOnError

func (self *DeleteParentBranch) ShouldAutomaticallyUndoOnError() bool

type DeleteTrackingBranch

type DeleteTrackingBranch struct {
	Branch gitdomain.RemoteBranchName
	// contains filtered or unexported fields
}

DeleteTrackingBranch deletes the tracking branch of the given local branch.

func (*DeleteTrackingBranch) CreateAbortProgram

func (self *DeleteTrackingBranch) CreateAbortProgram() []shared.Opcode

func (*DeleteTrackingBranch) CreateAutomaticUndoError

func (self *DeleteTrackingBranch) CreateAutomaticUndoError() error

func (*DeleteTrackingBranch) CreateContinueProgram

func (self *DeleteTrackingBranch) CreateContinueProgram() []shared.Opcode

func (*DeleteTrackingBranch) Run

func (self *DeleteTrackingBranch) Run(args shared.RunArgs) error

func (*DeleteTrackingBranch) ShouldAutomaticallyUndoOnError

func (self *DeleteTrackingBranch) ShouldAutomaticallyUndoOnError() bool

type DiscardOpenChanges

type DiscardOpenChanges struct {
	// contains filtered or unexported fields
}

DiscardOpenChanges resets the branch to the last commit, discarding uncommitted changes.

func (*DiscardOpenChanges) CreateAbortProgram

func (self *DiscardOpenChanges) CreateAbortProgram() []shared.Opcode

func (*DiscardOpenChanges) CreateAutomaticUndoError

func (self *DiscardOpenChanges) CreateAutomaticUndoError() error

func (*DiscardOpenChanges) CreateContinueProgram

func (self *DiscardOpenChanges) CreateContinueProgram() []shared.Opcode

func (*DiscardOpenChanges) Run

func (self *DiscardOpenChanges) Run(args shared.RunArgs) error

func (*DiscardOpenChanges) ShouldAutomaticallyUndoOnError

func (self *DiscardOpenChanges) ShouldAutomaticallyUndoOnError() bool

type EndOfBranchProgram

type EndOfBranchProgram struct {
	// contains filtered or unexported fields
}

EndOfBranchProgram marks the end of the program to sync a branch. All opcodes after this opcode are not for syncing this branch. They might sync another branch, or do something else.

func (*EndOfBranchProgram) CreateAbortProgram

func (self *EndOfBranchProgram) CreateAbortProgram() []shared.Opcode

func (*EndOfBranchProgram) CreateAutomaticUndoError

func (self *EndOfBranchProgram) CreateAutomaticUndoError() error

func (*EndOfBranchProgram) CreateContinueProgram

func (self *EndOfBranchProgram) CreateContinueProgram() []shared.Opcode

func (*EndOfBranchProgram) Run

func (self *EndOfBranchProgram) Run(_ shared.RunArgs) error

func (*EndOfBranchProgram) ShouldAutomaticallyUndoOnError

func (self *EndOfBranchProgram) ShouldAutomaticallyUndoOnError() bool

type EnsureHasShippableChanges

type EnsureHasShippableChanges struct {
	Branch gitdomain.LocalBranchName
	Parent gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

EnsureHasShippableChanges asserts that the branch has unique changes not on the main branch.

func (*EnsureHasShippableChanges) CreateAbortProgram

func (self *EnsureHasShippableChanges) CreateAbortProgram() []shared.Opcode

func (*EnsureHasShippableChanges) CreateAutomaticUndoError

func (self *EnsureHasShippableChanges) CreateAutomaticUndoError() error

func (*EnsureHasShippableChanges) CreateContinueProgram

func (self *EnsureHasShippableChanges) CreateContinueProgram() []shared.Opcode

func (*EnsureHasShippableChanges) Run

func (*EnsureHasShippableChanges) ShouldAutomaticallyUndoOnError

func (self *EnsureHasShippableChanges) ShouldAutomaticallyUndoOnError() bool

type FetchUpstream

type FetchUpstream struct {
	Branch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

FetchUpstream brings the Git history of the local repository up to speed with activities that happened in the upstream remote.

func (*FetchUpstream) CreateAbortProgram

func (self *FetchUpstream) CreateAbortProgram() []shared.Opcode

func (*FetchUpstream) CreateAutomaticUndoError

func (self *FetchUpstream) CreateAutomaticUndoError() error

func (*FetchUpstream) CreateContinueProgram

func (self *FetchUpstream) CreateContinueProgram() []shared.Opcode

func (*FetchUpstream) Run

func (self *FetchUpstream) Run(args shared.RunArgs) error

func (*FetchUpstream) ShouldAutomaticallyUndoOnError

func (self *FetchUpstream) ShouldAutomaticallyUndoOnError() bool

type ForcePushCurrentBranch

type ForcePushCurrentBranch struct {
	// contains filtered or unexported fields
}

ForcePushCurrentBranch force-pushes the branch with the given name to the origin remote.

func (*ForcePushCurrentBranch) CreateAbortProgram

func (self *ForcePushCurrentBranch) CreateAbortProgram() []shared.Opcode

func (*ForcePushCurrentBranch) CreateAutomaticUndoError

func (self *ForcePushCurrentBranch) CreateAutomaticUndoError() error

func (*ForcePushCurrentBranch) CreateContinueProgram

func (self *ForcePushCurrentBranch) CreateContinueProgram() []shared.Opcode

func (*ForcePushCurrentBranch) Run

func (self *ForcePushCurrentBranch) Run(args shared.RunArgs) error

func (*ForcePushCurrentBranch) ShouldAutomaticallyUndoOnError

func (self *ForcePushCurrentBranch) ShouldAutomaticallyUndoOnError() bool

type Merge

type Merge struct {
	Branch gitdomain.BranchName
	// contains filtered or unexported fields
}

Merge merges the branch with the given name into the current branch.

func (*Merge) CreateAbortProgram

func (self *Merge) CreateAbortProgram() []shared.Opcode

func (*Merge) CreateAutomaticUndoError

func (self *Merge) CreateAutomaticUndoError() error

func (*Merge) CreateContinueProgram

func (self *Merge) CreateContinueProgram() []shared.Opcode

func (*Merge) Run

func (self *Merge) Run(args shared.RunArgs) error

func (*Merge) ShouldAutomaticallyUndoOnError

func (self *Merge) ShouldAutomaticallyUndoOnError() bool

type MergeParent

type MergeParent struct {
	CurrentBranch               gitdomain.LocalBranchName
	ParentActiveInOtherWorktree bool
	// contains filtered or unexported fields
}

MergeParent merges the branch that at runtime is the parent branch of the given branch into the given branch.

func (*MergeParent) CreateAbortProgram

func (self *MergeParent) CreateAbortProgram() []shared.Opcode

func (*MergeParent) CreateAutomaticUndoError

func (self *MergeParent) CreateAutomaticUndoError() error

func (*MergeParent) CreateContinueProgram

func (self *MergeParent) CreateContinueProgram() []shared.Opcode

func (*MergeParent) Run

func (self *MergeParent) Run(args shared.RunArgs) error

func (*MergeParent) ShouldAutomaticallyUndoOnError

func (self *MergeParent) ShouldAutomaticallyUndoOnError() bool

type PreserveCheckoutHistory

type PreserveCheckoutHistory struct {
	PreviousBranchCandidates gitdomain.LocalBranchNames
	// contains filtered or unexported fields
}

PreserveCheckoutHistory does stuff.

func (*PreserveCheckoutHistory) CreateAbortProgram

func (self *PreserveCheckoutHistory) CreateAbortProgram() []shared.Opcode

func (*PreserveCheckoutHistory) CreateAutomaticUndoError

func (self *PreserveCheckoutHistory) CreateAutomaticUndoError() error

func (*PreserveCheckoutHistory) CreateContinueProgram

func (self *PreserveCheckoutHistory) CreateContinueProgram() []shared.Opcode

func (*PreserveCheckoutHistory) Run

func (self *PreserveCheckoutHistory) Run(args shared.RunArgs) error

func (*PreserveCheckoutHistory) ShouldAutomaticallyUndoOnError

func (self *PreserveCheckoutHistory) ShouldAutomaticallyUndoOnError() bool

type PullCurrentBranch

type PullCurrentBranch struct {
	// contains filtered or unexported fields
}

PullCurrentBranch updates the branch with the given name with commits from its remote.

func (*PullCurrentBranch) CreateAbortProgram

func (self *PullCurrentBranch) CreateAbortProgram() []shared.Opcode

func (*PullCurrentBranch) CreateAutomaticUndoError

func (self *PullCurrentBranch) CreateAutomaticUndoError() error

func (*PullCurrentBranch) CreateContinueProgram

func (self *PullCurrentBranch) CreateContinueProgram() []shared.Opcode

func (*PullCurrentBranch) Run

func (self *PullCurrentBranch) Run(args shared.RunArgs) error

func (*PullCurrentBranch) ShouldAutomaticallyUndoOnError

func (self *PullCurrentBranch) ShouldAutomaticallyUndoOnError() bool

type PushCurrentBranch

type PushCurrentBranch struct {
	CurrentBranch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

PushCurrentBranch pushes the current branch to its existing tracking branch.

func (*PushCurrentBranch) CreateAbortProgram

func (self *PushCurrentBranch) CreateAbortProgram() []shared.Opcode

func (*PushCurrentBranch) CreateAutomaticUndoError

func (self *PushCurrentBranch) CreateAutomaticUndoError() error

func (*PushCurrentBranch) CreateContinueProgram

func (self *PushCurrentBranch) CreateContinueProgram() []shared.Opcode

func (*PushCurrentBranch) Run

func (self *PushCurrentBranch) Run(args shared.RunArgs) error

func (*PushCurrentBranch) ShouldAutomaticallyUndoOnError

func (self *PushCurrentBranch) ShouldAutomaticallyUndoOnError() bool

type PushTags

type PushTags struct {
	// contains filtered or unexported fields
}

PushTags pushes newly created Git tags to origin.

func (*PushTags) CreateAbortProgram

func (self *PushTags) CreateAbortProgram() []shared.Opcode

func (*PushTags) CreateAutomaticUndoError

func (self *PushTags) CreateAutomaticUndoError() error

func (*PushTags) CreateContinueProgram

func (self *PushTags) CreateContinueProgram() []shared.Opcode

func (*PushTags) Run

func (self *PushTags) Run(args shared.RunArgs) error

func (*PushTags) ShouldAutomaticallyUndoOnError

func (self *PushTags) ShouldAutomaticallyUndoOnError() bool

type QueueMessage

type QueueMessage struct {
	Message string
	// contains filtered or unexported fields
}

func (*QueueMessage) CreateAbortProgram

func (self *QueueMessage) CreateAbortProgram() []shared.Opcode

func (*QueueMessage) CreateAutomaticUndoError

func (self *QueueMessage) CreateAutomaticUndoError() error

func (*QueueMessage) CreateContinueProgram

func (self *QueueMessage) CreateContinueProgram() []shared.Opcode

func (*QueueMessage) Run

func (self *QueueMessage) Run(args shared.RunArgs) error

func (*QueueMessage) ShouldAutomaticallyUndoOnError

func (self *QueueMessage) ShouldAutomaticallyUndoOnError() bool

type RebaseBranch

type RebaseBranch struct {
	Branch gitdomain.BranchName
	// contains filtered or unexported fields
}

RebaseBranch rebases the current branch against the branch with the given name.

func (*RebaseBranch) CreateAbortProgram

func (self *RebaseBranch) CreateAbortProgram() []shared.Opcode

func (*RebaseBranch) CreateAutomaticUndoError

func (self *RebaseBranch) CreateAutomaticUndoError() error

func (*RebaseBranch) CreateContinueProgram

func (self *RebaseBranch) CreateContinueProgram() []shared.Opcode

func (*RebaseBranch) Run

func (self *RebaseBranch) Run(args shared.RunArgs) error

func (*RebaseBranch) ShouldAutomaticallyUndoOnError

func (self *RebaseBranch) ShouldAutomaticallyUndoOnError() bool

type RebaseParent

type RebaseParent struct {
	CurrentBranch               gitdomain.LocalBranchName
	ParentActiveInOtherWorktree bool
	// contains filtered or unexported fields
}

RebaseParent rebases the given branch against the branch that is its parent at runtime.

func (*RebaseParent) CreateAbortProgram

func (self *RebaseParent) CreateAbortProgram() []shared.Opcode

func (*RebaseParent) CreateAutomaticUndoError

func (self *RebaseParent) CreateAutomaticUndoError() error

func (*RebaseParent) CreateContinueProgram

func (self *RebaseParent) CreateContinueProgram() []shared.Opcode

func (*RebaseParent) Run

func (self *RebaseParent) Run(args shared.RunArgs) error

func (*RebaseParent) ShouldAutomaticallyUndoOnError

func (self *RebaseParent) ShouldAutomaticallyUndoOnError() bool

type RemoveBranchFromLineage

type RemoveBranchFromLineage struct {
	Branch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

func (*RemoveBranchFromLineage) CreateAbortProgram

func (self *RemoveBranchFromLineage) CreateAbortProgram() []shared.Opcode

func (*RemoveBranchFromLineage) CreateAutomaticUndoError

func (self *RemoveBranchFromLineage) CreateAutomaticUndoError() error

func (*RemoveBranchFromLineage) CreateContinueProgram

func (self *RemoveBranchFromLineage) CreateContinueProgram() []shared.Opcode

func (*RemoveBranchFromLineage) Run

func (self *RemoveBranchFromLineage) Run(args shared.RunArgs) error

func (*RemoveBranchFromLineage) ShouldAutomaticallyUndoOnError

func (self *RemoveBranchFromLineage) ShouldAutomaticallyUndoOnError() bool

type RemoveFromObservedBranches

type RemoveFromObservedBranches struct {
	Branch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

RemoveFromObservedBranches removes the branch with the given name as an observed branch.

func (*RemoveFromObservedBranches) CreateAbortProgram

func (self *RemoveFromObservedBranches) CreateAbortProgram() []shared.Opcode

func (*RemoveFromObservedBranches) CreateAutomaticUndoError

func (self *RemoveFromObservedBranches) CreateAutomaticUndoError() error

func (*RemoveFromObservedBranches) CreateContinueProgram

func (self *RemoveFromObservedBranches) CreateContinueProgram() []shared.Opcode

func (*RemoveFromObservedBranches) Run

func (*RemoveFromObservedBranches) ShouldAutomaticallyUndoOnError

func (self *RemoveFromObservedBranches) ShouldAutomaticallyUndoOnError() bool

type RemoveFromPerennialBranches

type RemoveFromPerennialBranches struct {
	Branch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

RemoveFromPerennialBranches removes the branch with the given name as a perennial branch.

func (*RemoveFromPerennialBranches) CreateAbortProgram

func (self *RemoveFromPerennialBranches) CreateAbortProgram() []shared.Opcode

func (*RemoveFromPerennialBranches) CreateAutomaticUndoError

func (self *RemoveFromPerennialBranches) CreateAutomaticUndoError() error

func (*RemoveFromPerennialBranches) CreateContinueProgram

func (self *RemoveFromPerennialBranches) CreateContinueProgram() []shared.Opcode

func (*RemoveFromPerennialBranches) Run

func (*RemoveFromPerennialBranches) ShouldAutomaticallyUndoOnError

func (self *RemoveFromPerennialBranches) ShouldAutomaticallyUndoOnError() bool

type RemoveGlobalConfig

type RemoveGlobalConfig struct {
	Key gitconfig.Key // the config key to remove
	// contains filtered or unexported fields
}

func (*RemoveGlobalConfig) CreateAbortProgram

func (self *RemoveGlobalConfig) CreateAbortProgram() []shared.Opcode

func (*RemoveGlobalConfig) CreateAutomaticUndoError

func (self *RemoveGlobalConfig) CreateAutomaticUndoError() error

func (*RemoveGlobalConfig) CreateContinueProgram

func (self *RemoveGlobalConfig) CreateContinueProgram() []shared.Opcode

func (*RemoveGlobalConfig) Run

func (self *RemoveGlobalConfig) Run(args shared.RunArgs) error

func (*RemoveGlobalConfig) ShouldAutomaticallyUndoOnError

func (self *RemoveGlobalConfig) ShouldAutomaticallyUndoOnError() bool

type RemoveLocalConfig

type RemoveLocalConfig struct {
	Key gitconfig.Key // the config key to remove
	// contains filtered or unexported fields
}

func (*RemoveLocalConfig) CreateAbortProgram

func (self *RemoveLocalConfig) CreateAbortProgram() []shared.Opcode

func (*RemoveLocalConfig) CreateAutomaticUndoError

func (self *RemoveLocalConfig) CreateAutomaticUndoError() error

func (*RemoveLocalConfig) CreateContinueProgram

func (self *RemoveLocalConfig) CreateContinueProgram() []shared.Opcode

func (*RemoveLocalConfig) Run

func (self *RemoveLocalConfig) Run(args shared.RunArgs) error

func (*RemoveLocalConfig) ShouldAutomaticallyUndoOnError

func (self *RemoveLocalConfig) ShouldAutomaticallyUndoOnError() bool

type ResetCurrentBranchToSHA

type ResetCurrentBranchToSHA struct {
	Hard        bool
	MustHaveSHA gitdomain.SHA
	SetToSHA    gitdomain.SHA
	// contains filtered or unexported fields
}

ResetCurrentBranchToSHA undoes all commits on the current branch all the way until the given SHA.

func (*ResetCurrentBranchToSHA) CreateAbortProgram

func (self *ResetCurrentBranchToSHA) CreateAbortProgram() []shared.Opcode

func (*ResetCurrentBranchToSHA) CreateAutomaticUndoError

func (self *ResetCurrentBranchToSHA) CreateAutomaticUndoError() error

func (*ResetCurrentBranchToSHA) CreateContinueProgram

func (self *ResetCurrentBranchToSHA) CreateContinueProgram() []shared.Opcode

func (*ResetCurrentBranchToSHA) Run

func (self *ResetCurrentBranchToSHA) Run(args shared.RunArgs) error

func (*ResetCurrentBranchToSHA) ShouldAutomaticallyUndoOnError

func (self *ResetCurrentBranchToSHA) ShouldAutomaticallyUndoOnError() bool

type ResetRemoteBranchToSHA

type ResetRemoteBranchToSHA struct {
	Branch      gitdomain.RemoteBranchName
	MustHaveSHA gitdomain.SHA
	SetToSHA    gitdomain.SHA
	// contains filtered or unexported fields
}

ResetRemoteBranchToSHA sets the given remote branch to the given SHA, but only if it currently has a particular SHA.

func (*ResetRemoteBranchToSHA) CreateAbortProgram

func (self *ResetRemoteBranchToSHA) CreateAbortProgram() []shared.Opcode

func (*ResetRemoteBranchToSHA) CreateAutomaticUndoError

func (self *ResetRemoteBranchToSHA) CreateAutomaticUndoError() error

func (*ResetRemoteBranchToSHA) CreateContinueProgram

func (self *ResetRemoteBranchToSHA) CreateContinueProgram() []shared.Opcode

func (*ResetRemoteBranchToSHA) Run

func (self *ResetRemoteBranchToSHA) Run(args shared.RunArgs) error

func (*ResetRemoteBranchToSHA) ShouldAutomaticallyUndoOnError

func (self *ResetRemoteBranchToSHA) ShouldAutomaticallyUndoOnError() bool

type RestoreOpenChanges

type RestoreOpenChanges struct {
	// contains filtered or unexported fields
}

RestoreOpenChanges restores stashed away changes into the workspace.

func (*RestoreOpenChanges) CreateAbortProgram

func (self *RestoreOpenChanges) CreateAbortProgram() []shared.Opcode

func (*RestoreOpenChanges) CreateAutomaticUndoError

func (self *RestoreOpenChanges) CreateAutomaticUndoError() error

func (*RestoreOpenChanges) CreateContinueProgram

func (self *RestoreOpenChanges) CreateContinueProgram() []shared.Opcode

func (*RestoreOpenChanges) Run

func (self *RestoreOpenChanges) Run(args shared.RunArgs) error

func (*RestoreOpenChanges) ShouldAutomaticallyUndoOnError

func (self *RestoreOpenChanges) ShouldAutomaticallyUndoOnError() bool

type RevertCommit

type RevertCommit struct {
	SHA gitdomain.SHA
	// contains filtered or unexported fields
}

RevertCommit adds a commit to the current branch that reverts the commit with the given SHA.

func (*RevertCommit) CreateAbortProgram

func (self *RevertCommit) CreateAbortProgram() []shared.Opcode

func (*RevertCommit) CreateAutomaticUndoError

func (self *RevertCommit) CreateAutomaticUndoError() error

func (*RevertCommit) CreateContinueProgram

func (self *RevertCommit) CreateContinueProgram() []shared.Opcode

func (*RevertCommit) Run

func (self *RevertCommit) Run(args shared.RunArgs) error

func (*RevertCommit) ShouldAutomaticallyUndoOnError

func (self *RevertCommit) ShouldAutomaticallyUndoOnError() bool

type SetExistingParent

type SetExistingParent struct {
	Ancestors gitdomain.LocalBranchNames
	Branch    gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

SetExistingParent sets the first existing entry in the given ancestor list as the parent branch of the given branch.

func (*SetExistingParent) CreateAbortProgram

func (self *SetExistingParent) CreateAbortProgram() []shared.Opcode

func (*SetExistingParent) CreateAutomaticUndoError

func (self *SetExistingParent) CreateAutomaticUndoError() error

func (*SetExistingParent) CreateContinueProgram

func (self *SetExistingParent) CreateContinueProgram() []shared.Opcode

func (*SetExistingParent) Run

func (self *SetExistingParent) Run(args shared.RunArgs) error

func (*SetExistingParent) ShouldAutomaticallyUndoOnError

func (self *SetExistingParent) ShouldAutomaticallyUndoOnError() bool

type SetGlobalConfig

type SetGlobalConfig struct {
	Key   gitconfig.Key
	Value string
	// contains filtered or unexported fields
}

func (*SetGlobalConfig) CreateAbortProgram

func (self *SetGlobalConfig) CreateAbortProgram() []shared.Opcode

func (*SetGlobalConfig) CreateAutomaticUndoError

func (self *SetGlobalConfig) CreateAutomaticUndoError() error

func (*SetGlobalConfig) CreateContinueProgram

func (self *SetGlobalConfig) CreateContinueProgram() []shared.Opcode

func (*SetGlobalConfig) Run

func (self *SetGlobalConfig) Run(args shared.RunArgs) error

func (*SetGlobalConfig) ShouldAutomaticallyUndoOnError

func (self *SetGlobalConfig) ShouldAutomaticallyUndoOnError() bool

type SetLocalConfig

type SetLocalConfig struct {
	Key   gitconfig.Key
	Value string
	// contains filtered or unexported fields
}

func (*SetLocalConfig) CreateAbortProgram

func (self *SetLocalConfig) CreateAbortProgram() []shared.Opcode

func (*SetLocalConfig) CreateAutomaticUndoError

func (self *SetLocalConfig) CreateAutomaticUndoError() error

func (*SetLocalConfig) CreateContinueProgram

func (self *SetLocalConfig) CreateContinueProgram() []shared.Opcode

func (*SetLocalConfig) Run

func (self *SetLocalConfig) Run(args shared.RunArgs) error

func (*SetLocalConfig) ShouldAutomaticallyUndoOnError

func (self *SetLocalConfig) ShouldAutomaticallyUndoOnError() bool

type SetParent

type SetParent struct {
	Branch gitdomain.LocalBranchName
	Parent gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

SetParent sets the given parent branch as the parent of the given branch. Use ChangeParent to change an existing parent.

func (*SetParent) CreateAbortProgram

func (self *SetParent) CreateAbortProgram() []shared.Opcode

func (*SetParent) CreateAutomaticUndoError

func (self *SetParent) CreateAutomaticUndoError() error

func (*SetParent) CreateContinueProgram

func (self *SetParent) CreateContinueProgram() []shared.Opcode

func (*SetParent) Run

func (self *SetParent) Run(args shared.RunArgs) error

func (*SetParent) ShouldAutomaticallyUndoOnError

func (self *SetParent) ShouldAutomaticallyUndoOnError() bool

type SetParentIfBranchExists

type SetParentIfBranchExists struct {
	Branch gitdomain.LocalBranchName
	Parent gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

SetParentIfBranchExists sets the given parent branch as the parent of the given branch, but only the latter exists.

func (*SetParentIfBranchExists) CreateAbortProgram

func (self *SetParentIfBranchExists) CreateAbortProgram() []shared.Opcode

func (*SetParentIfBranchExists) CreateAutomaticUndoError

func (self *SetParentIfBranchExists) CreateAutomaticUndoError() error

func (*SetParentIfBranchExists) CreateContinueProgram

func (self *SetParentIfBranchExists) CreateContinueProgram() []shared.Opcode

func (*SetParentIfBranchExists) Run

func (self *SetParentIfBranchExists) Run(args shared.RunArgs) error

func (*SetParentIfBranchExists) ShouldAutomaticallyUndoOnError

func (self *SetParentIfBranchExists) ShouldAutomaticallyUndoOnError() bool

type SkipCurrentBranch

type SkipCurrentBranch struct {
	// contains filtered or unexported fields
}

SkipCurrentBranch is a mock opcode to be used instead of running another program. This is used when ignoring the remaining opcodes for a particular branch.

func (*SkipCurrentBranch) CreateAbortProgram

func (self *SkipCurrentBranch) CreateAbortProgram() []shared.Opcode

func (*SkipCurrentBranch) CreateAutomaticUndoError

func (self *SkipCurrentBranch) CreateAutomaticUndoError() error

func (*SkipCurrentBranch) CreateContinueProgram

func (self *SkipCurrentBranch) CreateContinueProgram() []shared.Opcode

func (*SkipCurrentBranch) Run

func (self *SkipCurrentBranch) Run(_ shared.RunArgs) error

func (*SkipCurrentBranch) ShouldAutomaticallyUndoOnError

func (self *SkipCurrentBranch) ShouldAutomaticallyUndoOnError() bool

type SquashMerge

type SquashMerge struct {
	Branch        gitdomain.LocalBranchName
	CommitMessage string
	Parent        gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

SquashMerge squash merges the branch with the given name into the current branch.

func (*SquashMerge) CreateAbortProgram

func (self *SquashMerge) CreateAbortProgram() []shared.Opcode

func (*SquashMerge) CreateAutomaticUndoError

func (self *SquashMerge) CreateAutomaticUndoError() error

func (*SquashMerge) CreateContinueProgram

func (self *SquashMerge) CreateContinueProgram() []shared.Opcode

func (*SquashMerge) Run

func (self *SquashMerge) Run(args shared.RunArgs) error

func (*SquashMerge) ShouldAutomaticallyUndoOnError

func (self *SquashMerge) ShouldAutomaticallyUndoOnError() bool

type StashOpenChanges

type StashOpenChanges struct {
	// contains filtered or unexported fields
}

func (*StashOpenChanges) CreateAbortProgram

func (self *StashOpenChanges) CreateAbortProgram() []shared.Opcode

func (*StashOpenChanges) CreateAutomaticUndoError

func (self *StashOpenChanges) CreateAutomaticUndoError() error

func (*StashOpenChanges) CreateContinueProgram

func (self *StashOpenChanges) CreateContinueProgram() []shared.Opcode

func (*StashOpenChanges) Run

func (self *StashOpenChanges) Run(args shared.RunArgs) error

func (*StashOpenChanges) ShouldAutomaticallyUndoOnError

func (self *StashOpenChanges) ShouldAutomaticallyUndoOnError() bool

type UndoLastCommit

type UndoLastCommit struct {
	// contains filtered or unexported fields
}

func (*UndoLastCommit) CreateAbortProgram

func (self *UndoLastCommit) CreateAbortProgram() []shared.Opcode

func (*UndoLastCommit) CreateAutomaticUndoError

func (self *UndoLastCommit) CreateAutomaticUndoError() error

func (*UndoLastCommit) CreateContinueProgram

func (self *UndoLastCommit) CreateContinueProgram() []shared.Opcode

func (*UndoLastCommit) Run

func (self *UndoLastCommit) Run(args shared.RunArgs) error

func (*UndoLastCommit) ShouldAutomaticallyUndoOnError

func (self *UndoLastCommit) ShouldAutomaticallyUndoOnError() bool

type UpdateInitialBranchLocalSHA

type UpdateInitialBranchLocalSHA struct {
	Branch gitdomain.LocalBranchName
	// contains filtered or unexported fields
}

func (*UpdateInitialBranchLocalSHA) CreateAbortProgram

func (self *UpdateInitialBranchLocalSHA) CreateAbortProgram() []shared.Opcode

func (*UpdateInitialBranchLocalSHA) CreateAutomaticUndoError

func (self *UpdateInitialBranchLocalSHA) CreateAutomaticUndoError() error

func (*UpdateInitialBranchLocalSHA) CreateContinueProgram

func (self *UpdateInitialBranchLocalSHA) CreateContinueProgram() []shared.Opcode

func (*UpdateInitialBranchLocalSHA) Run

func (*UpdateInitialBranchLocalSHA) ShouldAutomaticallyUndoOnError

func (self *UpdateInitialBranchLocalSHA) ShouldAutomaticallyUndoOnError() bool

type UpdateProposalTarget

type UpdateProposalTarget struct {
	NewTarget      gitdomain.LocalBranchName
	ProposalNumber int
	// contains filtered or unexported fields
}

UpdateProposalTarget updates the target of the proposal with the given number at the code hosting platform.

func (*UpdateProposalTarget) CreateAbortProgram

func (self *UpdateProposalTarget) CreateAbortProgram() []shared.Opcode

func (*UpdateProposalTarget) CreateAutomaticUndoError

func (self *UpdateProposalTarget) CreateAutomaticUndoError() error

func (*UpdateProposalTarget) CreateContinueProgram

func (self *UpdateProposalTarget) CreateContinueProgram() []shared.Opcode

func (*UpdateProposalTarget) Run

func (self *UpdateProposalTarget) Run(args shared.RunArgs) error

func (*UpdateProposalTarget) ShouldAutomaticallyUndoOnError

func (self *UpdateProposalTarget) ShouldAutomaticallyUndoOnError() bool

Jump to

Keyboard shortcuts

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