sequencer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RestackOp

type RestackOp struct {
	Name plumbing.ReferenceName

	// New parent branch to sync to.
	NewParent plumbing.ReferenceName

	// Mark the new parent branch as trunk.
	NewParentIsTrunk bool

	// The new parent branch's hash. If not specified, the sequencer will use the new parent's
	// branch hash if the new parent is not trunk. Or if the new parent is trunk, the sequencer
	// will use the remote tracking branch's hash.
	NewParentHash plumbing.Hash
}

type Sequencer

type Sequencer struct {
	// The name of the remote (e.g. "origin").
	RemoteName string
	// All branch information initially when the sequencer started.
	OriginalBranchSnapshots map[plumbing.ReferenceName]*branchSnapshot
	// Ref that is currently being synced. Next time the sequencer runs, it will rebase this
	// ref.
	CurrentSyncRef plumbing.ReferenceName
	// If the rebase is stopped, these fields are set.
	SequenceInterruptedNewParentHash plumbing.Hash

	Operations []RestackOp
}

Sequencer re-stacks the specified branches.

This entire Sequencer object should be JSON serializable. The caller is expected to save this to file when the sequencer needs to be paused for more input.

func NewSequencer

func NewSequencer(remoteName string, db meta.DB, ops []RestackOp) *Sequencer

func (*Sequencer) Run

func (seq *Sequencer) Run(
	repo *git.Repo,
	db meta.DB,
	seqAbort, seqContinue, seqSkip bool,
) (*git.RebaseResult, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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