git

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentHash

func CurrentHash(dir string) string

CurrentHash returns the current git HEAD hash.

Types

type StaleReport

type StaleReport struct {
	File      string
	ChangedAt time.Time
	NodeIDs   []string
}

StaleReport describes a stale subgraph.

type Watcher

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

Watcher detects stale memories by checking git history.

func New

func New(store storage.Storage, g graph.Graph, dir string) (*Watcher, error)

New creates a git Watcher for the given project directory. Returns an error if the directory path is invalid or does not exist.

func (*Watcher) StalesSince

func (w *Watcher) StalesSince(ctx context.Context, since time.Time) ([]StaleReport, error)

StalesSince returns stale reports for files changed since the given time.

func (*Watcher) WatchFile

func (w *Watcher) WatchFile(ctx context.Context, filePath, nodeID, gitHash string) error

WatchFile registers a file→node mapping for staleness tracking.

Jump to

Keyboard shortcuts

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