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
41
42
43
44
45
46
//! post-commit — bind the pre-commit gate marker to the commit that now
//! exists.
//!
//! The commit object does not exist while pre-commit runs, so this is the
//! earliest moment "the checks ran" can be attached to a hash. git invokes
//! post-commit even for `--no-verify` (the flag skips only pre-commit and
//! commit-msg), which is exactly what makes the stamp trustworthy: a commit
//! that dodged the checks arrives here with no marker and gets no stamp.
//!
//! Notification-only, like the hook itself: git ignores its exit code, so
//! this never blocks, and it prints nothing — a bookkeeping step that talked
//! on every commit would be noise nobody asked for. That includes the bypass
//! ledger: a commit that dodged its gate is COUNTED here, silently — the
//! number's whole value is that it is collected without a lecture. The
//! mechanisms live in [`crate::gate_stamp`] and [`crate::bypass`]; this is
//! only the hook-shaped door to them.
use crateVerdict;
/// The one thing post-commit says: that a background rehearsal of the push
/// gate has started — only in a repository that asked for it
/// (`amont.rehearseOnCommit`), and only outside a rebase or cherry-pick,
/// where the commit being made is not the one that will be pushed and the
/// next replay would cancel this run anyway. The worker itself decides
/// whether there is anything to run; this only pays the spawn.