watcher

package
v0.0.0-...-edbbb69 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepoChangedMsg

type RepoChangedMsg struct{}

RepoChangedMsg is sent when the watcher detects a change in the git directory.

type Watcher

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

Watcher monitors the .git directory for changes and sends RepoChangedMsg.

func New

func New(gitDir string) (*Watcher, error)

New creates a new Watcher for the given .git directory. Missing optional paths (MERGE_HEAD, etc.) are silently skipped.

func (*Watcher) Start

func (w *Watcher) Start(send func(tea.Msg))

Start begins watching. send is called with RepoChangedMsg on relevant changes.

func (*Watcher) Stop

func (w *Watcher) Stop()

Stop terminates watching and blocks until the goroutine exits.

Jump to

Keyboard shortcuts

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