Skip to main content

CommitHook

Type Alias CommitHook 

Source
pub type CommitHook = Arc<dyn Fn(Option<Oid>, Oid) + Send + Sync>;
Expand description

Callback fired by VaultRepo::commit_changeset after a successful commit + materialize, inside the commit lock. Arguments are the commit’s first-parent oid (or None for the initial commit on an unborn branch) and the new commit oid.

The hook is the substrate’s GWS.14 plumbing: downstream consumers (the reindex queue) push the new commit onto a pending-reindex queue; the actual diff + graph/search update runs out of band (lazy GSU, see git-write-substrate-architecture.md §8.1 as refined by GWS.14).

The substrate itself does NOT touch graph or search — that would smear write-substrate logic outward. The hook is the only contract.

Aliased Type§

pub struct CommitHook { /* private fields */ }