1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Git hook installation and pre-commit-config compatibility.
//!
//! Bounded context: anything related to running staged-file checks at git
//! lifecycle points. Four concerns kept separable:
//!
//! - [`config`] parses `.pre-commit-config.yaml` plus the upstream
//! `.pre-commit-hooks.yaml` shipped inside external hook repos.
//! - [`cache`] clones external hook repos into `.croft/cache/hooks/`
//! and remembers the resolved revision sha. croft owns this cache
//! end-to-end; it never delegates to the `pre-commit` binary.
//! - [`runner`] runs the hooks for a given stage. Each hook's `entry`
//! is exec'd verbatim regardless of the declared `language` — croft
//! trusts the user to have the runtime on `PATH` (typically via
//! `croft install`) rather than reimplementing pre-commit's
//! virtualenv / toolchain manager. `repo: meta` is the one shape
//! that's still rejected at run time, since there's no `entry` to
//! dispatch. Per-hook `in = "<service>"` and the executor's
//! workspace target (devcontainer when enabled, host otherwise)
//! pick where the spawn lands.
//! - [`installer`] writes `.git/hooks/<stage>` shims that delegate to
//! `croft hooks run <stage> "$@"`.
//!
//! Native croft hooks (declared in `croft.toml` `[hooks]`) are run by
//! the CLI through [`crate::runtime::Executor`], not by this crate — they
//! reuse the recipe runner. This crate handles the pre-commit ecosystem
//! and the git-hooks plumbing.
pub use crateCacheError;
pub use ;
pub use ;
pub use HookError;
pub use ;
pub use ;