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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
//! What:
//! What the commit service does to land a commit:
//! the serialized step,
//! the index lock hold,
//! preparation,
//! replay and after-commit work.
//! Why:
//! The landing is the service's core and changes together.
//!
//! In TS you'd write (pseudocode):
//! ```ts
//! // landing/index.ts: one `export * from './file'` per module below.
//! ```
/// The landing location a forwarded index writer coordinates with:
/// the real index and the registry.
/// Automatic maintenance decision: config record parsing and the enable and detach rules.
/// Running automatic maintenance after a landing: the config read, then `git maintenance run --auto`.
/// The durable work-item record for asynchronous work (review, push, maintenance) left for a resident consumer.
/// The clocks a claim's lease is judged by.
/// The repositories the service looks at again when a claim another instance holds may have run out.
/// What the user is told when the commit service cannot land a commit.
/// The commit service's serialized step.
/// What the commit service's landing does once the branch has moved: index entries and conclusion state.
/// The commit service's hold on Git's index lock across a landing.
/// The attempts and the wait of an acquisition of the index lock.
/// The marker the service writes into the index lock and the questions asked of a marker.
/// The marker of the next batch's index lock, made and flushed while the service is idle.
/// What an acquisition of the index lock found when it had to wait, for the service's log.
/// Who a marker's holder is: the identity a process writes, and the answers a reader gives (gone, running, unknown).
/// The service's hold on a placed index lock: the check that it is still the holder's, the release and the removal.
/// Whether the index lock is still the file the holder placed, and the record of a lock that could not be settled.
/// The staging files of the index lock.
/// How the service's marked file becomes the index lock, and the cleanup of staging files.
/// The inotify watch the wait for the index lock blocks on.
/// The preparation of a commit that the service lands, for every command line.
/// Which commit command lines the commit service covers, and the message they stand for.
/// The one summary line a landed commit prints, with the abbreviated name Git would print.
/// The wait of a wrapped index writer for the commit service's own hold on the index.
/// A forwarded index writer started again when the commit service took the index before its Git did.
/// The commit command's path through the commit service.
/// The service's memory of when the bytes of the commits it landed were captured, per worktree.
/// The retry of a commit the service sent back: the captured change merged onto the branch, never prepared again from the worktree.
/// Which way a commit goes: through the service, set up first, or the earlier path.
/// The message and identities of a service commit, made as native `git commit` makes them.
/// What an amend takes from the commit it replaces: parents, message and author.
/// The commits real Git builds for the service: an editor, a signature, and what the service does not embed.
/// The renewal that keeps the claims of a shared work directory from looking abandoned while their holder works.
/// The service's consumer of after-commit push and upkeep work.
/// The drain of several repositories of one round, side by side and without a lock.
/// The wrapper's side of after-commit work: records and the wake.
/// Whether a worktree's head still names the branch a commit was prepared on.
/// What a commit Git built adds to the branch, answered from the object store without starting Git.
/// How a commit headed for the service notices that its prepared content was removed before it landed.
/// Where the landing's own syncs wait: queued for a background thread when the landing publishes, made before return otherwise.
/// The removal of a stale index lock, by a rename and a second look.
/// The claim chain that keeps two reclaimers apart where the file system gives no `flock`.
/// Whether a new index file holds the live index's bytes.