history

package
v0.15.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {
	Annotations    string   // formatted annotations from Store.FormatOutput()
	Path           string   // full repo/file path or "stdin"
	Ref            string   // git ref (e.g. "master..HEAD") or empty
	Staged         bool     // whether --staged was used
	GitRoot        string   // git repo root, empty when git unavailable
	AnnotatedFiles []string // files with annotations, from Store.Files()
	SubDir         string   // history subdirectory name override; when empty, derived from Path
}

Params holds parameters for saving a review history entry.

type Service

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

Service manages review history persistence.

func New

func New(baseDir string) *Service

New creates a history service with the given base directory. if baseDir is empty, defaults to ~/.config/revdiff/history/.

func (*Service) Save

func (s *Service) Save(p Params)

Save writes a review history entry to disk. Errors are logged to stderr, never returned. This is a safety net for preserving annotations — it must never fail the process.

Jump to

Keyboard shortcuts

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