Skip to main content

Module index

Module index 

Source
Expand description

Index management for void repositories.

The index tracks staged files with their content hashes and filesystem metadata (mtime, size) for fast dirty detection.

Structs§

IndexEntry
Index entry for a tracked file.
RebuildResult
Result of rebuilding the index.
WorkspaceIndex
Workspace index snapshot.

Functions§

entry_matches_file
Check if a file matches its index entry (slow path: hash if stat differs).
entry_matches_stat
Check if a file matches its index entry using stat only (fast path, no hash).
index_entry_from_file
Create an IndexEntry from a file path (reads metadata + hashes content).
index_entry_from_file_with_content
Create an IndexEntry from a file path AND return the file content.
read_index
Reads the encrypted workspace index from disk.
rebuild_index
Rebuild index from HEAD commit state + working tree scan.
write_index
Writes the encrypted workspace index to disk.
write_workspace_index
Writes a WorkspaceIndex directly to disk.