Skip to main content

git_policy_cli/
lib.rs

1//! What:
2//!  Internal native cli-git implementation,
3//!  not yet the production executable.
4//! Why:
5//!  The Rust rewrite preserves Git's own argument,
6//!  repository and transaction semantics.
7//!
8//! In TS you'd write (pseudocode):
9//! ```ts
10//! // Internal modules used by the forthcoming native entry point and consumer verification.
11//! ```
12
13/// The decision one invocation ends in:
14///  become Git,
15///  or print and exit.
16pub mod action;
17
18/// Variables added to every real-Git child:
19///  lock PID injection and the forward-target marker.
20pub mod child_environment;
21
22/// The one failure type for rejected configuration content or files.
23pub mod config_error;
24
25/// Repository-root discovery and bounded reading of `cli-git.config.jsonc`.
26pub mod config_file;
27
28/// Lazy configuration loading for known inspection versus mutation/ambiguous commands.
29pub mod config_loading;
30
31/// Whole-document JSONC validation into typed settings.
32pub mod config_parse;
33
34/// Validation of the `policies` section and per-policy options.
35mod config_policies;
36
37/// The `rulesFile` option:
38///  a repository-relative name that stays inside the repository.
39pub mod config_rules_file;
40
41/// Typed settings and their defaults.
42pub mod config_schema;
43
44/// Key-naming typed readers over parsed JSONC values.
45mod config_values;
46
47/// JSONL event rendering for wrapper-made diagnostics.
48pub mod diagnostics;
49
50/// Worktree target classification for worktree-enforcing policies.
51pub mod effective_target;
52
53/// The per-invocation decision the thin executable performs.
54pub mod entry;
55
56/// Spellings of the wrapper-only escape hatches shared by several modules.
57pub mod escape_hatch;
58
59/// Starting real Git with unchanged arguments,
60///  streams and exit status.
61pub mod forwarding;
62
63/// Captured read-only real-Git queries over raw bytes.
64pub mod git_metadata;
65
66/// Git 2.56.0 global-argument boundaries over unchanged operating-system strings.
67pub mod global_arguments;
68
69/// Configuration of the repository one invocation selects.
70pub mod invocation_config;
71
72/// The `git cli-git` decision:
73///  help,
74///  retired commands,
75///  and direct `check`/`fix`.
76pub mod management;
77
78/// The `git cli-git` argument grammar.
79pub mod management_arguments;
80
81/// The fixed registry of shipped policies.
82pub mod policy_registry;
83
84/// PATH resolution of the real Git executable.
85pub mod real_git;
86
87/// Wrapper self-exclusion for one PATH candidate.
88pub mod real_git_candidate;
89
90/// Disposable fixtures shared by unit tests;
91///  never part of the release executable.
92#[cfg(test)]
93mod test_support;
94
95/// Repository and worktree identity as reported by real Git.
96pub mod worktree_identity;
97
98/// Git 2.56.0 `parse-options` tokenization of one command's argument region.
99pub mod command_options;
100
101/// Long-option matching:
102///  exact names,
103///  unique abbreviations and `no-` negation.
104mod command_options_long;
105
106/// Final-state and position questions over a tokenized region.
107pub mod command_options_query;
108
109/// Short-option clusters and their attached or following values.
110mod command_options_short;
111
112/// The shared decision of which bytes are an option's value.
113mod command_options_value;
114
115/// Real-Git fixtures and table oracles for command tests;
116///  never in the release build.
117#[cfg(test)]
118mod command_test_support;
119
120/// Differential harness over `git rev-parse --parseopt`;
121///  never in the release build.
122#[cfg(test)]
123mod command_test_parseopt;
124
125/// Table oracle over `--git-completion-helper-all`;
126///  never in the release build.
127#[cfg(test)]
128mod command_test_completion;
129
130/// Facts about the arguments after `git commit`.
131pub mod command_commit;
132
133/// The complete Git 2.56.0 option table of `git commit`.
134pub mod command_commit_table;
135
136/// The shared result and builder of transforms that add tokens to a command line.
137pub mod rule_argument_rewrite;
138
139/// Pure core of the index-against-`HEAD` check.
140pub mod rule_commit_index;
141
142/// The query and reading of "does this worktree hold uncommitted state?".
143pub mod rule_worktree_dirty;
144
145/// Pure decision of the commit-only transform.
146pub mod rule_commit_only;
147
148/// User-facing diagnostics of the commit-only transform.
149pub mod rule_commit_only_message;
150
151/// Pure core of the merge,
152///  cherry-pick and revert conclusion check.
153pub mod rule_commit_sequencer;
154
155/// The Git 2.56.0 option table of `git push` and its facts.
156pub mod command_push;
157
158/// The Git 2.56.0 option table of `git status`,
159///  its facts and the advice-key reading.
160pub mod command_status;
161
162/// Pure decision of the atomic-push transform.
163pub mod rule_atomic_push;
164
165/// Pure decision of the status-hints transform.
166pub mod rule_status_hints;
167
168/// The Git 2.56.0 option table of `git add` and its bulk-staging facts.
169pub mod command_add;
170
171/// The Git 2.56.0 option table of `git clean` and its deletion facts.
172pub mod command_clean;
173
174/// The Git 2.56.0 option table of `git reset` and its mode.
175pub mod command_reset;
176
177/// `git stash` subcommand dispatch and wrapper-flag positions.
178pub mod command_stash;
179
180/// The commands that can overwrite or delete uncommitted state, read as Git reads them.
181pub mod command_discard;
182
183/// The Git 2.56.0 option tables of every `git stash` subcommand.
184pub mod command_stash_table;
185
186/// Branch-creation facts of `git branch`,
187///  `git checkout` and `git switch`.
188pub mod command_branch_create;
189
190/// Which action a tokenized `git branch` region selects.
191mod command_branch_mode;
192
193/// The complete Git 2.56.0 option table of `git branch`.
194pub mod command_branch_table;
195
196/// Explicit creation and the remote-guess candidate of `git checkout` and `git switch`.
197mod command_branch_target;
198
199/// The complete Git 2.56.0 option tables of `git checkout` and `git switch`.
200pub mod command_checkout_table;
201
202/// The Git 2.56.0 option groups of `git config`.
203pub mod command_config_table;
204
205/// The form and file scope of a `git config` region.
206pub mod command_config;
207
208/// Pure decision of the require-root policy.
209pub mod rule_require_root;
210
211/// Whether a `git worktree` invocation creates or moves a worktree.
212pub mod command_worktree;
213
214/// Wrapper-only control spellings,
215///  their meanings,
216///  and removal before the subcommand.
217pub mod wrapper_controls;
218
219/// Removal of every wrapper control from one invocation,
220///  by position.
221pub mod wrapper_invocation;
222
223/// Lifecycle triggers and the trigger set of every shipped policy.
224pub mod policy_trigger;
225
226/// Policy events and their JSON Lines rendering.
227pub mod policy_events;
228
229/// A pathname as events report it:
230///  text,
231///  plus base64 `pathBytes` when it is not UTF-8.
232pub mod event_path;
233
234/// Exact repository path bytes as the operating system takes them, and as text for messages.
235pub mod path_bytes;
236
237/// Ordered policy execution for one lifecycle point.
238pub mod policy_engine;
239
240/// Slice 6: writes one corrected file into the private commit index as a blob and an index entry.
241pub mod private_index_stage;
242
243/// Slice 6: the commit path's bounded policy convergence over the private index.
244pub mod commit_convergence;
245
246/// The commit transaction in the incumbent's order, up to the settled policies.
247pub mod commit_transaction;
248
249/// The conclusion of a settled commit transaction: preparation, landing and post-landing completion.
250pub mod commit_conclusion;
251
252/// The landing loop with replay, revalidation and the starvation reservation.
253pub mod commit_landing_loop;
254
255/// The landing lock a landing attempt takes, with the recovery every acquisition runs first.
256pub mod commit_landing_lock;
257
258/// Revalidation of a replayed tree outside both landing locks.
259pub mod commit_revalidation;
260
261/// The normalization-only transaction for a correction that removed every change.
262pub mod commit_no_change;
263
264/// The finding for a staged deletion that an explicit-path commit cannot record.
265pub mod commit_staged_deletions;
266
267/// The `git commit` command: the transaction, the settled events, the post-commit gate and the backup.
268pub mod commit_command;
269
270/// The disposable, recoverable workspace of one commit transaction.
271pub mod commit_workspace;
272
273/// Rule facts from the real repository with candidates read from the private index.
274pub mod commit_facts;
275
276/// The worktree completion records of selected corrections and of hook changes.
277pub mod commit_worktree_records;
278
279/// The replay-relevant commit options.
280pub mod commit_replay_options;
281
282/// Slice 9 skeleton: the order around a landed commit and a guarded Git child; not reachable until landing is merged.
283pub mod commit_lifecycle;
284
285/// The bounded loop that repeats a pass after corrections changed candidate content.
286pub mod policy_convergence;
287
288/// The one query for repository identity,
289///  top level and the path below it.
290pub mod repository_location;
291
292/// Lazily fetched repository facts behind one interface,
293///  with the real-Git provider.
294pub mod repository_facts;
295
296/// Pure decision of the linked-worktree-only policy.
297pub mod rule_linked_worktree;
298
299/// The rejection texts of the linked-worktree-only policy.
300pub mod rule_linked_worktree_messages;
301
302/// The append-only record of every command form that can discard uncommitted state.
303pub mod discard_audit;
304
305/// The intent-guessing hint that follows a finding, an engine failure or a notice.
306pub mod event_hints;
307
308/// Pure decision of the branch-worktree-only policy and its one-query remote guess.
309pub mod rule_branch_worktree;
310
311/// Pure decision of the add-explicit policy.
312pub mod rule_add_explicit;
313
314/// The repository content the dependent-version planner reads, and its two failure kinds.
315pub mod dependent_version_content;
316
317/// Which paths the dependent-version planner reads: manifests, configuration, source.
318pub mod dependent_version_paths;
319
320/// Strict JSON reading of a manifest's name, version and dependency names.
321pub mod dependent_version_manifest;
322
323/// Patch bumps of plain release versions and `JSON.stringify` quoting.
324pub mod dependent_version_release;
325
326/// The byte-preserving rewrite of a manifest's top-level version.
327pub mod dependent_version_text;
328
329/// Publishable package names from the generated registry configuration.
330pub mod dependent_version_publishable;
331
332/// Whether source text imports a package.
333pub mod dependent_version_imports;
334
335/// The dependency walk and the plan of dependent bumps.
336pub mod dependent_version_graph;
337
338/// Every workspace manifest at both states, and which versions were raised.
339pub mod dependent_version_states;
340
341/// Which development dependencies each dependent bundles.
342pub mod dependent_version_bundled;
343
344/// The dependent-version plan with exact manifest bytes before and after.
345pub mod dependent_version_plan;
346
347/// The decision and findings of `mono/dependent-version-bump`.
348pub mod dependent_version_policy;
349
350/// The dependent-version planner's view of a prepared candidate state.
351pub mod dependent_version_lifecycle;
352
353/// Whether a direct fix may change a tracked file it did not select.
354pub mod policy_added_path;
355
356/// The `mono/dependent-version-bump` check over a lifecycle's candidate state.
357pub mod policy_dependent_version;
358
359/// An in-memory workspace that records reads; never in the release build.
360#[cfg(test)]
361mod dependent_version_test_support;
362
363/// Differential fixture reading and canonical results; never in the release build.
364#[cfg(test)]
365mod dependent_version_fixture_json;
366
367/// Canonical renderings of the native planner's results; never in the release build.
368#[cfg(test)]
369mod dependent_version_fixture_output;
370
371/// One differential case evaluated by the native planner; never in the release build.
372#[cfg(test)]
373mod dependent_version_fixture_cases;
374
375/// The native planner against the incumbent's recorded results; never in the release build.
376#[cfg(test)]
377mod dependent_version_differential_tests;
378
379/// The shipped policies as checks over rule cores and repository facts.
380pub mod policy_checks;
381
382/// What a lifecycle offers content policies,
383///  and its candidates once prepared.
384pub mod policy_content;
385
386/// The built-in final-newline policy:
387///  canonical final LF,
388///  preserved paths,
389///  findings.
390pub mod policy_final_newline;
391
392/// The optional root-context policy:
393///  no top-level `CONTEXT.md` enters the index.
394pub mod policy_root_context;
395
396/// The optional forbidden-strings policy over the linked scanner,
397///  with redacted findings.
398pub mod policy_forbidden_strings;
399
400/// One child program run with a time bound and output caps,
401///  through files instead of pipes.
402pub mod bounded_child;
403
404/// Where the `markdown/autofix` policy finds `monochromatic-lint`:
405///  absolute PATH entries only.
406pub mod markdown_linter_lookup;
407
408/// What one linter run printed:
409///  the fixed source and the findings left,
410///  or why it is unusable.
411pub mod markdown_linter_output;
412
413/// The one-rule linter configuration and the private temporary file it is written to.
414pub mod markdown_linter_config;
415
416/// The gitignore-syntax `exclude` patterns of `markdown/autofix`,
417///  matched as the linter matches them.
418pub mod markdown_exclude;
419
420/// The `markdown/autofix` policy over candidates,
421///  behind its linter interface.
422pub mod policy_markdown;
423
424/// The executable's linter for that policy:
425///  `monochromatic-lint` on PATH,
426///  bounded,
427///  once per candidate.
428pub mod markdown_linter;
429
430/// The executable's panic hook:
431///  where an internal error happened,
432///  never its message.
433pub mod panic_notice;
434
435/// Installing a direct fix's corrections into the worktree,
436///  all or none.
437pub mod direct_fix_install;
438
439/// The direct fix:
440///  converge corrections in memory,
441///  then install them.
442pub mod direct_fix;
443
444/// The fixed argument transforms of a forwarded command,
445///  in order.
446pub mod policy_transforms;
447
448/// One complete pass:
449///  built-in policies,
450///  fixed transforms,
451///  optional policies.
452pub mod policy_pass;
453
454/// The names of the commands built into Git 2.56.0.
455pub mod git_builtins;
456
457/// The work of the installed cli-git that is not ported,
458///  and the refusal notice.
459pub mod unported;
460
461/// The lifecycle of one wrapped Git command,
462///  from refusals to forwarding.
463pub mod wrapped_command;
464
465/// A scripted repository-facts provider for unit tests;
466///  never in the release build.
467#[cfg(test)]
468mod policy_test_support;
469
470/// The one failure type of the candidate layer and its closed list of causes.
471pub mod candidate_error;
472
473/// Validated Git object names and the file modes a candidate can carry.
474pub mod candidate_object;
475
476/// Pure framing of one `git cat-file --batch` reply.
477pub mod candidate_batch;
478
479/// Pure parsing of raw NUL-delimited changed-path records.
480pub mod candidate_record;
481
482/// The long-lived object reader that answers every blob read of an invocation.
483pub mod candidate_reader;
484
485/// Immutable candidate versions:
486///  identity,
487///  pathname,
488///  mode,
489///  change and object per path.
490pub mod candidate_version;
491
492/// Per-invocation listing,
493///  lazy bytes and invalidation of candidate versions.
494pub mod candidate_store;
495
496/// Pure parsing of `git ls-files --stage` records and the delta between two index states.
497pub mod candidate_stage;
498
499/// The files of a commit's tree with their modes and objects.
500pub mod candidate_tree;
501
502/// A private,
503///  timestamp-preserving copy of the real index,
504///  removed when dropped.
505pub mod candidate_private_index;
506
507/// Which candidate paths have their `text` Git attribute unset,
508///  read from the state the candidates were listed from.
509pub mod candidate_attribute;
510
511/// What `git add` would stage,
512///  and the worktree files a direct command selects.
513pub mod candidate_prediction;
514
515/// Which candidates hold content that a parent commit's tree already holds,
516///  found by exact object name.
517pub mod candidate_known_content;
518
519/// The linked forbidden-strings scanner:
520///  one load per invocation,
521///  typed redacted findings.
522pub mod scanner_adapter;
523
524/// Rules-file precedence and which candidates the scanner is given.
525pub mod scanner_selection;
526
527/// One scan pass over a candidate version's exact bytes.
528pub mod scanner_run;
529
530/// Which engine failure code each candidate and scanner failure carries.
531pub mod scanner_failure_code;
532
533/// Process isolation and rule fixtures for scanner controls;
534///  never in the release build.
535#[cfg(test)]
536mod scanner_test_support;
537
538/// Private,
539///  crash-safe file primitives shared by every durable record.
540pub mod private_storage;
541
542/// Compact JSON records read and written with the incumbent's `JSON` semantics.
543pub mod json_record;
544
545/// Random identifiers in the layout of the incumbent's `randomUUID`.
546pub mod random_id;
547
548/// Text operations with the exact semantics of JavaScript's built-ins.
549pub mod js_text;
550
551/// The PID namespace an owner record names, and the rule for owners of another one.
552pub mod pid_namespace;
553
554/// Process-birth identities in the incumbent's exact spelling.
555pub mod process_identity;
556
557/// The owner record inside every owner-lock directory.
558pub mod owner_lock_record;
559
560/// Rename-published owner locks with dead-owner retirement and an unbounded wait.
561pub mod owner_lock;
562
563/// Line-oriented debug and warning diagnostics on standard error.
564pub mod diagnostic_log;
565
566/// The fail-closed failure of reading or recovering durable transaction state.
567pub mod recovery_error;
568
569/// The owner record of one commit-transaction directory and its liveness rule.
570pub mod transaction_owner;
571
572/// The per-worktree registry of commit-transaction directories.
573pub mod transaction_registry;
574
575/// The schema-version-2 journal records of one commit transaction and their filenames.
576pub mod transaction_journal;
577
578/// The exact encoding of every journal record.
579pub mod transaction_journal_encode;
580
581/// Strict parsers of every journal record.
582pub mod transaction_journal_parse;
583
584/// UTC timestamps in the exact form of JavaScript's `toISOString`.
585pub mod iso_time;
586
587/// The filesystem identity recorded with every real `index.lock` a transaction creates.
588pub mod filesystem_identity;
589
590/// Running real Git for transaction,
591///  recovery and landing work.
592pub mod transaction_git;
593
594/// The preparation and landing leases nested wrapper invocations inherit.
595pub mod transaction_lease;
596
597/// The dispatch plan of one commit transaction, its JSON spelling and the config reads it makes.
598pub mod hook_dispatch_plan;
599
600/// The hooks directory of one transaction: its plan and one entry per preparation event.
601pub mod hook_dispatch_entries;
602
603/// The hook dispatcher entered by a transaction's hook entry name, under the hook lock.
604pub mod hook_dispatch;
605
606/// No-follow file operations recovery and landing share.
607pub mod recovery_files;
608
609/// Durable evidence a dead transaction left:
610///  attempt records,
611///  owned locks and Git's PID file.
612pub mod recovery_evidence;
613
614/// The reflog search that proves which commit an interrupted transaction landed.
615pub mod recovery_reflog;
616
617/// Deciding whether a landing landed,
618///  and installing its recorded post-index.
619pub mod recovery_completion;
620
621/// The `.keep` files protecting a landing's migrated pack.
622pub mod pack_keep;
623
624/// Test-only transaction phase markers, compiled into the release executable and armed only by an environment variable.
625pub mod transaction_phase;
626
627/// Landing target comparison, nonce reflog message and compare-and-swap.
628pub mod landing_support;
629
630/// Migration of a prepared commit's shadow objects into a kept pack of the real store.
631pub mod landing_objects;
632
633/// Post-index a landing installs, computed against the real index at landing.
634pub mod landing_index;
635
636/// The check that a landing changed no staged entry outside the paths it committed.
637pub mod landing_invariant;
638
639/// One landing attempt inside the landing critical section, and its outcome.
640pub mod landing_attempt;
641
642/// The `concurrent-commit` finding for a landing that landed nothing.
643pub mod landing_findings;
644
645/// Git commands run against a transaction's shadow repository.
646pub mod shadow_git;
647
648/// Native conclusion cleanup reproduced in the owning worktree.
649pub mod conclusion_cleanup;
650
651/// The per-worktree capture store:
652///  location,
653///  sequence and identity.
654pub mod capture_store;
655
656/// `captured.json`,
657///  landed-capture records,
658///  their recording and pruning.
659pub mod capture_records;
660
661/// Replay: the unified-diff parser of subsumption (`replay_patch`).
662pub mod replay_patch;
663
664/// Replay: the exact strict reverse check of subsumption (`replay_reverse_apply`).
665pub mod replay_reverse_apply;
666
667/// Replay: the one-sided extension of subsumption over zero-context hunks (`replay_containment`).
668pub mod replay_containment;
669
670/// Replay: raw commit objects as bytes, the unsigned rewrite and signed-rebuild inputs (`replay_object`).
671pub mod replay_object;
672
673/// Replay: capture order over the landed first-parent history and the per-path decision (`replay_capture_order`).
674pub mod replay_capture_order;
675
676/// Replay: the starvation reservation of the next landing slot (`replay_reservation`).
677pub mod replay_reservation;
678
679/// Replay: the shadow-repository Git runner that every replay step uses (`replay_shadow`).
680pub mod replay_shadow;
681
682/// Replay: shared paths of the landed history and the prepared commit, with their three entries (`replay_shared_paths`).
683pub mod replay_shared_paths;
684
685/// Replay: the text half of subsumption over index-named blobs and hunks (`replay_subsumption_text`).
686pub mod replay_subsumption_text;
687
688/// Replay: subsumption rules and the synthetic merge base (`replay_subsumption`).
689pub mod replay_subsumption;
690
691/// Replay: capture-order history and the per-path decisions from the transaction's and landed records (`replay_capture_history`).
692pub mod replay_capture_history;
693
694/// Replay: the merge tree, the first conflicting landed commit, and the replayed commit rebuild (`replay_merge`).
695pub mod replay_merge;
696
697/// Replay: the replayed index, the shadow HEAD move, and the pre-commit re-run decision of revalidation (`replay_revalidation`).
698pub mod replay_revalidation;
699
700/// Replay: one replay of a prepared commit onto a moved target, the integrator's replay result (`replay_commit`).
701pub mod replay_commit;
702/// The invocation capture:
703///  repository layout, symbolic `HEAD`, conclusion kind, ref backend and base.
704pub mod capture_invocation;
705
706/// The capture under capture order:
707///  the capture lock, the store identity, the sequence and `captured.json`.
708pub mod capture_order;
709
710/// The shadow repository `config` file and the copied repository format.
711pub mod shadow_config;
712
713/// The shadow repository links to the real shared entries.
714pub mod shadow_links;
715
716/// The shadow ref store: snapshot, private target, symbolic refs and `HEAD`.
717pub mod shadow_refs;
718
719/// The shadow conclusion copies at preparation.
720pub mod conclusion_copy;
721
722/// Argument transforms of native preparation: normalisation, global split, `-a` removal and private arguments.
723pub mod commit_args;
724
725/// The private commit index: copies, selection modes, pathspec files and listings.
726pub mod commit_index;
727
728/// Native `git commit` in the shadow, the prepared commit read back and `prepared.json`.
729pub mod commit_preparation;
730
731/// Creation of the shadow repository of one transaction.
732pub mod shadow_create;
733
734/// Loading many blobs through one `git cat-file --batch`.
735pub mod blob_batch;
736
737/// Bringing added paths' worktree copies to their landed bytes.
738pub mod worktree_completion;
739
740/// Owner inspection of registry entries and the oldest-first order.
741pub mod recovery_inspect;
742
743/// Recovery of one dead-owner transaction.
744pub mod recovery_landing;
745
746/// Disposal of a landed transaction: shadow removal, directory removal, then landed-capture pruning.
747pub mod landed_disposal;
748
749/// The post-commit run after a landing: author environment, hook lock, and the hook runner with inherited streams.
750pub mod post_commit_hook;
751
752/// Post-landing completion of one landed commit: worktree copies, disposal, maintenance, then `post-commit`.
753pub mod post_landing;
754
755/// Recovery across every transaction directory of one worktree.
756pub mod recovery_scan;
757
758/// Startup recovery of interrupted commit transactions.
759pub mod commit_recovery;
760
761/// Startup recovery as a step of a wrapped or direct command.
762pub mod transaction_gate;
763
764/// Process start times for lock owners,
765///  read from `/proc`,
766///  `ps` or the Windows process table.
767pub mod process_start;
768
769/// The Git version check run once before work that depends on Git's behavior.
770pub mod git_version;
771
772/// Processes holding a lock file open,
773///  found by device and inode.
774pub mod index_lock_holders;
775
776/// Parsers of `lsof -F pcDi` records and Restart Manager lines,
777///  matched by device and inode.
778pub mod index_lock_holder_parsers;
779
780/// Evidence about a foreign `index.lock` and the verdict it supports.
781pub mod index_lock_evidence;
782
783/// The Git command a forwarded invocation runs,
784///  after ordinary alias expansion.
785pub mod forwarded_command;
786
787/// Index-writer classification and the commands that coordinate with a landing.
788pub mod index_writer_commands;
789
790/// Waiting for a foreign index.lock under the classification rules and Git's backoff schedule.
791pub mod index_lock_wait;
792
793/// The host side effects of the index-lock wait:
794///  /proc reads,
795///  sleeps,
796///  randomness and standard error.
797pub mod index_lock_wait_host;
798
799/// The landing location a forwarded index writer coordinates with:
800///  the real index and the registry.
801pub mod landing_location;
802
803/// Coordination of a forwarded index writer:
804///  the landing lock,
805///  the wait for a foreign lock and the lease.
806pub mod index_writer_coordination;
807
808/// Running a coordinated forwarded index writer:
809///  the landing lock held while real Git runs as a child.
810pub mod index_writer_forward;
811
812/// The real index.lock a landing creates,
813///  identifies and releases only while it is the same file.
814pub mod real_index_lock;
815/// Automatic maintenance decision: config record parsing and the enable and detach rules.
816pub mod maintenance_decision;
817
818/// Running automatic maintenance after a landing: the config read, then `git maintenance run --auto`.
819pub mod maintenance_run;
820
821/// Catching SIGINT, SIGTERM, SIGHUP and SIGQUIT while a Git child runs, and relaying only process-sent signals.
822pub mod signal_relay;
823
824/// Exact removal of retired hk hook registrations from one explicit Git configuration scope.
825pub mod maintenance_hk_config;
826
827/// The per-branch push coordination file name: a reversible, flat, case-safe key.
828pub mod auto_push_branch_key;
829
830/// The per-branch `last-pushed` record: validation, tolerant reads and atomic publication.
831pub mod auto_push_record;
832
833/// Waiting for a lock a live process holds: a slow-wait notice naming the holder and a configurable backstop.
834pub mod live_lock;
835
836/// Read-only Git queries of the auto-push, each with a deadline and separate output streams.
837pub mod bounded_query;
838
839/// The auto-push's real `git push` with a deadline, its low-speed abort and the lock wait limit derived from it.
840pub mod bounded_push;
841
842/// Single-flight push coordination per branch: owner lock, record joins and the push itself.
843pub mod auto_push_single_flight;
844
845/// Publishing a landed commit that a moved remote branch rejected: the merge is made from objects alone and pushed.
846pub mod auto_push_reconcile;
847
848/// The paths of a dirty worktree and of a fast-forward, and their overlap.
849pub mod auto_push_dirty_paths;
850
851/// Post-commit auto-push of a landed commit: the push argv, the surfaced output and the failure reporting.
852pub mod auto_push;
853
854/// The post-commit gate over a landed commit: its events, its blocking and the backup it allows.
855pub mod post_commit;
856
857/// Authoritative manual-push updates discovered by a private dry-run push and confirmed with ls-remote.
858pub mod manual_push_probe;
859
860/// Published-set and range computation for manual-push scans: which pushed commits a remote does not have.
861pub mod manual_push_range;
862
863/// An explicit push that lost a race: run as a child, merge in what landed on the remote and publish the merge.
864pub mod push_stacking;
865
866/// The manual-push candidate scope of one push: the commits and trees the destination lacks.
867pub mod manual_push_lifecycle;
868/// The one failure type of the linked-worktree ignored-state copy and its diagnostics.
869pub mod worktree_copy_error;
870
871/// Which linked worktrees a worktree-creating Git command registered, before and after it ran.
872pub mod worktree_copy_registry;
873
874/// The ignored source paths a linked-worktree copy selects, and the path validation every selection passes.
875pub mod worktree_copy_selection;
876
877/// The deterministic parent-first manifest of a copy, and the mode application to a staged copy.
878pub mod worktree_copy_manifest;
879
880/// Exact comparison of manifest entries against the filesystem, and the source stability check after staging.
881pub mod worktree_copy_compare;
882
883/// The private, validated stage of one source's ignored state beside a destination worktree.
884pub mod worktree_copy_stage;
885
886/// The exclusive creation of one destination entry from the stage, and the identity captured after it.
887#[cfg(unix)]
888pub mod worktree_copy_install_entry;
889
890/// Installation of a validated stage into a new worktree, with preflight, batches and rollback on failure.
891#[cfg(unix)]
892pub mod worktree_copy_install;
893
894/// Removal of the paths a failed installation created, only where their identity and content still prove them cli-git's own.
895#[cfg(unix)]
896pub mod worktree_copy_rollback;
897
898/// The durable journal of one copy: exact encoding, strict validation, private storage and removal.
899#[cfg(unix)]
900pub mod worktree_copy_journal;
901
902/// The durable claim on a stage container's name, and the removal of stages an interrupted copy left behind.
903#[cfg(unix)]
904pub mod worktree_copy_stage_claim;
905
906/// The append-only install log of one stage: per-batch intents and creations, with resumption.
907#[cfg(unix)]
908pub mod worktree_copy_install_log;
909
910/// One journaled installation to an end, resumption from the log, and synchronization of a created worktree.
911#[cfg(unix)]
912pub mod worktree_copy_transaction;
913
914/// The settlement lock that serializes copy installation and recovery, its owner record, and inherited leases.
915#[cfg(unix)]
916pub mod worktree_copy_lock;
917
918/// Recovery of interrupted copies: registration checks, discards with notices, resumption, and the pending check.
919#[cfg(unix)]
920pub mod worktree_copy_recovery;
921
922/// The linked-worktree ignored-state copy around one forwarded Git invocation: the integrator's entry point.
923#[cfg(unix)]
924pub mod worktree_copy;
925
926/// Which forwarded invocations the copy applies to, and the child run that carries its settlement lease.
927pub mod worktree_copy_forward;