stash

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package stash saves and restores working directory changes, storing deltas against baseline blobs in the checkout database (.fslckout).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(ckout *sql.DB, repoDB *sql.DB, dir string, stashID int64) error

Apply restores stashed files to the working directory without removing the stash entry.

func Clear

func Clear(ckout *sql.DB) error

Clear removes all stash entries.

func Drop

func Drop(ckout *sql.DB, stashID int64) error

Drop removes a specific stash entry and its files.

func EnsureTables

func EnsureTables(ckout *sql.DB) error

EnsureTables creates the stash and stashfile tables if they don't exist.

func Pop

func Pop(ckout *sql.DB, repoDB *sql.DB, dir string) error

Pop applies the most recent stash entry and removes it.

func Save

func Save(ckout *sql.DB, repoDB *sql.DB, dir string, comment string) error

Save stashes all changed files in the checkout, then reverts the working directory.

Types

type Entry

type Entry struct {
	ID      int64
	Hash    string // UUID of checkout manifest (baseline version)
	Comment string
	CTime   string
}

Entry represents a single stash entry.

func List

func List(ckout *sql.DB) ([]Entry, error)

List returns all stash entries ordered by ID descending (most recent first).

Jump to

Keyboard shortcuts

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