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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! What:
//! Locks and their owners:
//! the index lock,
//! stale reference locks,
//! and the claims that let one command work on a worktree.
//! Why:
//! Every lock question has one answer in one place.
//!
//! In TS you'd write (pseudocode):
//! ```ts
//! // lock/index.ts: one `export * from './file'` per module below.
//! ```
/// Controls for the lock files a stopped Git child must not leave behind.
/// Processes holding a lock file open,
/// found by device and inode.
/// Parsers of `lsof -F pcDi` records and Restart Manager lines,
/// matched by device and inode.
/// Evidence about a foreign `index.lock` and the verdict it supports.
/// Index-writer classification and the commands that coordinate with a landing.
/// The wait for any program's hold on `index.lock` before a command changes the checkout.
/// Waiting for a foreign index.lock under the classification rules and Git's backoff schedule.
/// Running a coordinated forwarded index writer:
/// the landing lock held while real Git runs as a child.
/// The lock files a stopped Git child leaves behind, found and removed once the child and what it started are gone.
/// The reference locks a killed Git left behind: judged one by one, removed on a proof, otherwise described.
/// The record of one judged reference lock and the outcome of a clearing pass.
/// Which files below a Git directory are reference locks.
/// A file's identity at the moment it was judged, so the removal can tell it from a new file at the same path.
/// How one reference lock is judged.
/// Removal of a proven stale lock with its companions.
/// The processes that carry a number inside a PID namespace nested in the reader's, which a pid file may name.
/// The wrapper's own fetch and push, started after the stale reference locks of their repository are cleared.
/// The notice a forwarded fetch or push is preceded by when reference locks of a killed Git are found.
/// What the wrapper prints about reference locks, and the quoted command that clears one it will not remove.
/// Real Git processes killed with `SIGKILL` while they hold reference locks, for the controls.
pub
/// The numbered claim files that let exactly one command work on one worktree or checkout, without a lock.