Expand description
Git repository adapter for the Quarb query engine.
A repository is an arbor with a real DAG for its crosslink fabric. The root exposes four names:
/branches/<name>,/tags/<name>— the refs. A ref node is an alias for its commit: same properties, same children./HEAD— the checked-out commit, same alias treatment./commits/<hash>— every commit. Navigating by literal name accepts anythinggit rev-parsedoes (unique prefixes,HEAD~2,v1.0^{}), without enumerating; enumeration (/commits/*) lists every commit reachable from any ref, in reverse chronological order, batched through onerev-list --all.
A commit’s properties are its header (::author, ::email,
::date as an instant (the author date, offset preserved),
::committer, ::subject,
::message, ::parent — the first parent’s hash); its
children are its tree — descend /branches/master/src/lib.rs
and the blob’s content is the node’s value (::), giving
time-travel file access at any commit. Tree entries carry
::;type, ::;mode, ::;size, and ::;hash.
References are inherent, no schema needed: ::parent~>
resolves to the first parent, ->parent enumerates all
parents (merges fan out), and <-parent finds the commits
that point here (children — served from the enumeration, so
it loads the commit list). Traits name what a node is:
<commit>, <branch>, <tag>, <tree>, <blob>.
Everything is read through git plumbing over subprocess
(rev-list, rev-parse, ls-tree, cat-file, …) — no
libgit2, no new dependencies — lazily, one object on first
touch, cached for the adapter’s lifetime. The adapter never
writes.
Structs§
- GitAdapter
- A git repository, exposed as an arbor.
Enums§
- GitError
- An error opening or reading a repository.