Skip to main content

Module git

Module git 

Source
Expand description

Git status worker.

Computes repo indicator, branch name, and optional per-file status. Results are cached per directory and invalidated on FsChanged events.

Spawns a Tokio task that calls gix synchronously inside spawn_blocking so the UI thread is never blocked. Sends a WorkerMsg::Git back over the provided sender when done.

§Feature dependencies

The gix dependency must include the status feature (see Cargo.toml) for Repository::is_dirty() to compile.

Structs§

CachedGit
A cached git result for a directory.

Functions§

invalidate
Removes the cached git result for path, forcing a recompute on the next spawn_git_status call.
new_cache
Creates a new, empty git cache.
spawn_git_status
Spawns a Tokio task that computes git status for path and sends the result as a WorkerMsg::Git over tx.

Type Aliases§

GitCache
Shared git cache keyed by canonical directory path.