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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
//! What:
//! Internal native cli-git implementation,
//! not yet the production executable.
//! Why:
//! The Rust rewrite preserves Git's own argument,
//! repository and transaction semantics.
//!
//! In TS you'd write (pseudocode):
//! ```ts
//! // Internal modules used by the forthcoming native entry point and consumer verification.
//! ```
//!
//! Layout:
//! Every folder below is one subsystem,
//! and its `mod.rs` declares the modules inside it.
//! A glob re-export beside each folder keeps the old flat paths (`crate::module_name`) working.
//! `README.md` ("Source layout") says where a new file belongs.
//region What one command and its policies do
/// What one invocation does from arguments to Git:
/// the decision,
/// real Git resolution,
/// forwarding,
/// startup and management words.
/// What:
/// `pub use invocation::*;` also names every module declared in `invocation/mod.rs` directly under the crate root,
/// with the visibility each module was declared with.
/// Why:
/// The modules moved into folders but keep their paths,
/// `crate::name` and `git_policy_cli::name`,
/// so no caller,
/// fuzz target or test changes and the move stays mechanical.
/// Gotcha:
/// A glob re-export is shadowed by a same-named item written in this file,
/// so no folder may share a name with a module.
///
/// In TS you'd write (pseudocode):
/// ```ts
/// export * from './invocation';
/// ```
pub use *;
/// Reading and validating `cli-git.config.jsonc` and the Git configuration one invocation is judged by.
/// The same re-export for `config`.
pub use *;
/// Per-command handling:
/// the option grammar of each Git command the wrapper understands,
/// and the rules that rewrite,
/// refuse or hint at a command.
/// The same re-export for `command`.
pub use *;
/// The policy engine:
/// the registry,
/// triggers,
/// events,
/// the passes over candidates and direct fixes.
/// The same re-export for `policy`.
pub use *;
/// The `markdown/autofix` policy and its in-process linter.
/// The same re-export for `markdown`.
pub use *;
/// The dependent-version policy:
/// manifest and import facts,
/// the release plan and the policy over them.
/// The same re-export for `dependent_version`.
pub use *;
/// The standards-review shadow run:
/// its request,
/// the patch it covers,
/// its one HTTPS call and the result it appends.
/// The same re-export for `standards_review`.
pub use *;
/// Candidate content:
/// what a commit or push would add,
/// read from the index or objects,
/// and the scanner run over it.
/// The same re-export for `candidate`.
pub use *;
//endregion
//region The commit path and the resident commit service
/// The wrapper's commit path:
/// arguments,
/// preparation,
/// convergence,
/// conclusion and timing.
/// The same re-export for `commit`.
pub use *;
/// The shadow repository and the replay of captured changes onto it.
/// The same re-export for `shadow`.
pub use *;
/// Durable transaction state:
/// owner records,
/// journal,
/// phases and recovery.
/// The same re-export for `transaction`.
pub use *;
/// What the commit service does to land a commit:
/// the serialized step,
/// the index lock hold,
/// preparation,
/// replay and after-commit work.
/// The same re-export for `landing`.
pub use *;
/// The resident commit service:
/// protocol,
/// server,
/// client,
/// journal,
/// provisioning and logging.
/// The same re-export for `service`.
pub use *;
//endregion
//region Pushes, merges and conflicts
/// Pushes:
/// the automatic push after a commit,
/// manual push handling,
/// bounded Git queries,
/// retries and progress watching.
/// The same re-export for `push`.
pub use *;
/// Git LFS support:
/// pre-push planning,
/// pointer scanning and bounded uploads.
/// The same re-export for `lfs`.
pub use *;
/// Merges:
/// the word-level second pass,
/// isolated merges and pull handling.
/// The same re-export for `merge`.
pub use *;
/// Conflict handling around commits and checkouts:
/// side flags,
/// saved copies of conflicted files and leftover markers.
/// The same re-export for `conflict`.
pub use *;
//endregion
//region Worktrees, filesystems and reports
/// Worktree commands:
/// add,
/// remove,
/// clean,
/// convert,
/// trash,
/// snapshots and the placement ladder.
/// The same re-export for `worktree`.
pub use *;
/// Copying the ignored state of a linked worktree into a new one,
/// with staging,
/// journal and recovery.
/// The same re-export for `worktree_copying`.
pub use *;
/// Btrfs subvolume worktrees and the filesystem primitives under them.
/// The same re-export for `subvolume`.
pub use *;
/// Package-manager and toolchain repair after a worktree is created.
/// The same re-export for `repair`.
pub use *;
/// The `doctor` report and the checks of hooks and configuration it runs.
/// The same re-export for `health`.
pub use *;
//endregion
//region Reading and locking the repository, processes and shared building blocks
/// In-process repository reads:
/// objects,
/// packs,
/// refs,
/// layout and configuration without starting Git.
/// The same re-export for `repo_read`.
pub use *;
/// In-process reading and writing of the Git index file and its extensions.
/// The same re-export for `index`.
pub use *;
/// Locks and their owners:
/// the index lock,
/// stale reference locks,
/// and the claims that let one command work on a worktree.
/// The same re-export for `lock`.
pub use *;
/// Processes:
/// identities,
/// trees,
/// sockets,
/// signals and quiet-time ledgers.
/// The same re-export for `process`.
pub use *;
/// Small shared building blocks:
/// private files,
/// scratch locations,
/// JSON,
/// time,
/// random ids,
/// paths and bounded parallelism.
/// The same re-export for `foundation`.
pub use *;
//endregion
//region Test-only code, never part of the release executable
/// Test-only fixtures shared by many unit tests,
/// never part of the release executable.
/// The same re-export for `testing`.
pub use *;
/// Controls that read the crate's own source text.
/// The same re-export for `source_guard`.
pub use *;
//endregion