Skip to main content

Module branch

Module branch 

Source

Functions§

data_dir
Root data directory for a repo: $XDG_DATA_HOME/gitcortex/{repo_id}/
db_path
Path to the single KuzuDB file for a repo (all branches, namespaced by table prefix).
last_sha_path
Path to the last-indexed SHA file for a specific branch.
read_last_sha
read_schema_version
Read the persisted schema version, returning 0 if not present.
repo_id
Derive a stable 16-hex-char ID from the absolute repo root path. Used to namespace per-repo data directories without path encoding issues.
sanitize
Sanitize a branch name so it can be used as a KuzuDB table name prefix.
schema_version_path
Path to the persisted schema version marker for a repo.
wipe_repo_data
Wipe all per-repo data (DB + SHA files) so a fresh full index can run.
write_last_sha
write_schema_version
Write the schema version marker.