rewind

package
v0.3.14 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoint

type Checkpoint struct {
	Hash    string
	Message string
	Time    time.Time
}

type FileDiff

type FileDiff struct {
	Path   string
	Status FileStatus
	Patch  string
}

FileDiff represents a diff for a single file

type FileStatus

type FileStatus int

FileStatus represents the status of a file in the diff

const (
	StatusAdded FileStatus = iota
	StatusModified
	StatusDeleted
)

type Manager

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

func New

func New(workingDir string) (*Manager, error)

func (*Manager) Cleanup

func (m *Manager) Cleanup()

func (*Manager) Commit

func (m *Manager) Commit(message string) error

func (*Manager) DiffFromBaseline

func (m *Manager) DiffFromBaseline() ([]FileDiff, error)

DiffFromBaseline returns the diff between the baseline commit and the current HEAD

func (*Manager) List

func (m *Manager) List() ([]Checkpoint, error)

func (*Manager) Restore

func (m *Manager) Restore(hash string) error

Jump to

Keyboard shortcuts

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