Skip to main content

Module git_adapter

Module git_adapter 

Source
Expand description

A narrowly isolated Git adapter (EXCHANGE.md §23, GIT_INTEROP.md).

Shells out to the installed git executable for index/tree reads. Every invocation is argument-safe (argv, never a shell), bounded, failure- checked, and isolated from canonical Gemel semantics. The boundary is replaceable by a native adapter (e.g. gix) later.

Structs§

GitCommit
A parsed Git commit (GIT_INTEROP.md §4).
GitTreeEntry
One recursive tree entry: (mode, object kind, oid, path).

Functions§

cat_blob
git cat-file blob <oid> → content bytes.
cat_commit
git cat-file commit <oid> → parsed commit.
clone_repo
git clone <url> <dir> (argv-safe).
ls_tree_recursive
git ls-tree -r -z <tree> → recursive entries (deterministic order: git’s own tree order; the caller sorts by path where order matters).
parse_commit
Parses a raw commit object.
person_email
The email from a name <email> ts tz line.
person_name
The name from a name <email> ts tz line.
person_timestamp
The author/committer timestamp from a name <email> ts tz line.
rev_list_topo_reverse
git rev-list --topo-order --reverse <head>: commits oldest-first in topological order (parents before children), deterministic.
staged_files
Reads the staged (index) tree: git ls-files --stage + git cat-file. The Git index is an interchange surface, never part of Gemel’s ontology (EXCHANGE.md §23).

Type Aliases§

StagedEntry
One staged entry: (path, gemel mode, blob content).