Expand description
Git-style refs for branches and HEAD.
HEAD can be:
- Symbolic:
ref: refs/heads/trunk(pointing to a branch) - Detached: raw CID string (pointing directly to a commit)
Branch refs are stored in .void/refs/heads/<name> as raw CID strings.
Enums§
- HeadRef
- HEAD reference - either symbolic (pointing to a branch) or detached (direct CID).
Functions§
- delete_
branch - Delete a branch ref.
- delete_
tag - Delete a tag ref.
- list_
branches - List all branch names.
- list_
tags - List all tag names.
- read_
branch - Read a branch ref. Returns None if branch doesn’t exist.
- read_
head - Read HEAD, returns None if HEAD doesn’t exist.
- read_
push_ marker - Read the last-pushed commit CID for a backend. Returns None if no marker exists.
- read_
tag - Read a tag ref. Returns None if tag doesn’t exist.
- resolve_
head - Resolve HEAD to a CID (follows symbolic ref if needed). Returns None if HEAD doesn’t exist or points to non-existent branch.
- resolve_
head_ split - Resolve HEAD to a CID with split directories for workspaces.
- write_
branch - Write a branch ref.
- write_
head - Write HEAD (symbolic or detached).
- write_
push_ marker - Write the last-pushed commit CID for a backend.
- write_
tag - Write a tag ref.