Expand description
Engine::diff(ref_a, ref_b) implementation for git-branch mounts.
Walks the two tree objects pointed to by ref_a and ref_b inside
the workspace’s mem-repo gitdir, produces a per-entity diff
(Diff) that downstream replay / review / preview / audit
tooling consumes. Same backbone the changes_since
op uses — two-tree diff with rename detection — but expanded into a
two-endpoint shape with optional content enrichment.
§V1 scope
- Added / Modified / Deleted entries from a vanilla gix tree-diff.
- Content enrichment per
DiffConfig::include_content. InvalidEntityentries for paths that fail UTF-8 / parse.
§V1 gaps (handover candidates)
- Rename detection: deferred. The agent-notes-driven rename
collapse
changes_sinceperforms requires asincecursor in the same mem’s history. A generic two-ref diff (potentially cross-mem) needs a different walk; v1 emits Added/Deleted pairs instead ofRenamedand leaves rename-chain unfilled. - Cross-entity ripple:
IncomingRipplelists stay empty in the entries. Populating them requires a per-side wiki-link graph reconstruction that the engine’s current in-memory store does not maintain for arbitrary refs.
Functions§
- diff_
two_ refs - Two-ref structural diff. See module docs for the v1 scope and the known gaps (rename, ripple) that will surface as handover items.