Skip to main content

Module db

Module db 

Source
Expand description

Shared database path utilities (XDG resolution, project name extraction). Shared database path utilities used by both scan and serve commands.

All Seshat databases live in $XDG_DATA_HOME/seshat/repos/{project_name}.db (typically ~/.local/share/seshat/repos/ on Linux/macOS).

Structs§

ResolvedProject
Resolved project information returned by the single shared resolver.

Functions§

detect_branch
Detect the current git branch for the given path.
find_git_root
Walk up from from to find the nearest .git directory.
gc_branch_snapshots
Compare branches stored in the database against branches that exist in git.
get_current_branch
Get the current git branch name for the repository containing path.
get_git_branches
Discover local git branch names for the repository containing path.
resolve_project
Common project resolution logic used by every CLI command.
sync_root_for
Walk up from path to the git common-dir parent, falling back to path itself when no git root is found.