git_policy_cli/candidate/mod.rs
1//! What:
2//! Candidate content:
3//! what a commit or push would add,
4//! read from the index or objects,
5//! and the scanner run over it.
6//! Why:
7//! Policies judge candidates,
8//! so the readers and the scanner adapter share a folder.
9//!
10//! In TS you'd write (pseudocode):
11//! ```ts
12//! // candidate/index.ts: one `export * from './file'` per module below.
13//! ```
14
15/// The one failure type of the candidate layer and its closed list of causes.
16pub mod candidate_error;
17
18/// Validated Git object names and the file modes a candidate can carry.
19pub mod candidate_object;
20
21/// Pure framing of one `git cat-file --batch` reply.
22pub mod candidate_batch;
23
24/// Pure parsing of raw NUL-delimited changed-path records.
25pub mod candidate_record;
26
27/// The long-lived object reader that answers every blob read of an invocation.
28pub mod candidate_reader;
29
30/// Immutable candidate versions:
31/// identity,
32/// pathname,
33/// mode,
34/// change and object per path.
35pub mod candidate_version;
36
37/// Per-invocation listing,
38/// lazy bytes and invalidation of candidate versions.
39pub mod candidate_store;
40
41/// Pure parsing of `git ls-files --stage` records and the delta between two index states.
42pub mod candidate_stage;
43
44/// The files of a commit's tree with their modes and objects.
45pub mod candidate_tree;
46
47/// A private,
48/// timestamp-preserving copy of the real index,
49/// removed when dropped.
50pub mod candidate_private_index;
51
52/// Which candidate paths have their `text` Git attribute unset,
53/// read from the state the candidates were listed from.
54pub mod candidate_attribute;
55
56/// What `git add` would stage,
57/// and the worktree files a direct command selects.
58pub mod candidate_prediction;
59
60/// Which candidates hold content that a parent commit's tree already holds,
61/// found by exact object name.
62pub mod candidate_known_content;
63
64/// The linked forbidden-strings scanner:
65/// one load per invocation,
66/// typed redacted findings.
67pub mod scanner_adapter;
68
69/// Rules-file precedence and which candidates the scanner is given.
70pub mod scanner_selection;
71
72/// One scan pass over a candidate version's exact bytes.
73pub mod scanner_run;
74
75/// Which engine failure code each candidate and scanner failure carries.
76pub mod scanner_failure_code;
77
78/// Process isolation and rule fixtures for scanner controls;
79/// never in the release build.
80#[cfg(test)]
81pub(crate) mod scanner_test_support;
82
83/// Loading many blobs through one `git cat-file --batch`.
84pub mod blob_batch;