pub struct CheckoutFingerprint {
pub head: String,
pub status: String,
pub git_config: String,
pub git_hooks: String,
pub git_refs: String,
pub index_flags: String,
pub info_exclude: String,
}Expand description
HEAD + git status --porcelain of a checkout at one instant — the
identity a read-only validator session must preserve byte-for-byte.
Fields§
§head: Stringgit rev-parse HEAD.
status: Stringgit status --porcelain --untracked-files=all: index + worktree
status of tracked files plus EVERY untracked non-ignored path;
ignored paths (target/, .kranz runtime) never appear.
git_config: StringContents of <git-common-dir>/config: core.fsmonitor,
core.hooksPath, aliases, and external-diff drivers all execute
during the ENGINE’s own git invocations — a validator that can write
only .git/config owns the host without touching the worktree.
git_hooks: StringSorted name HASH lines for non-.sample files in
<git-common-dir>/hooks — a planted hook executes on the engine’s
next git operation that isn’t hooks-disabled.
git_refs: Stringgit for-each-ref output: moving a ref retargets later merges
without touching HEAD or the worktree.
index_flags: Stringgit ls-files -v output: skip-worktree/assume-unchanged flags
hide worktree modifications from git status (4th-pass review) —
the flags are part of the identity, so setting one is drift.
info_exclude: StringContents of <git-common-dir>/info/exclude: the local exclude file
hides untracked files from git status without touching the tree.
Implementations§
Source§impl CheckoutFingerprint
impl CheckoutFingerprint
Sourcepub fn capture(repo: &GitRepo) -> Result<Self>
pub fn capture(repo: &GitRepo) -> Result<Self>
Capture the identity of repo’s checkout right now.
All git invocations run on a VERIFICATION handle (hooks + fsmonitor
disabled): a poisoned core.fsmonitor in the checkout’s config must
never get its payload executed by the detection itself (4th-pass
review — detection previously ran git status before comparing
config, so the payload ran first). The .git metadata itself is
read via the filesystem with BOUNDED, no-follow reads (5th-pass: a
replaced config or info/exclude that is a FIFO or an unbounded
source must not hang or exhaust the engine mid-detection — anything
unusual reads as a stable refusal marker, which is itself drift).
Sourcepub fn drift(&self, after: &Self) -> Option<CheckoutDrift>
pub fn drift(&self, after: &Self) -> Option<CheckoutDrift>
The drift between self (before the session) and after — None
when the checkout is byte-identical.
Trait Implementations§
Source§impl Clone for CheckoutFingerprint
impl Clone for CheckoutFingerprint
Source§fn clone(&self) -> CheckoutFingerprint
fn clone(&self) -> CheckoutFingerprint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more