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/// Pure decision of the branch-worktree-only policy and its one-query remote guess.
306pub mod rule_branch_worktree;
307
308/// Pure decision of the add-explicit policy.
309pub mod rule_add_explicit;
310
311/// The repository content the dependent-version planner reads, and its two failure kinds.
312pub mod dependent_version_content;
313
314/// Which paths the dependent-version planner reads: manifests, configuration, source.
315pub mod dependent_version_paths;
316
317/// Strict JSON reading of a manifest's name, version and dependency names.
318pub mod dependent_version_manifest;
319
320/// Patch bumps of plain release versions and `JSON.stringify` quoting.
321pub mod dependent_version_release;
322
323/// The byte-preserving rewrite of a manifest's top-level version.
324pub mod dependent_version_text;
325
326/// Publishable package names from the generated registry configuration.
327pub mod dependent_version_publishable;
328
329/// Whether source text imports a package.
330pub mod dependent_version_imports;
331
332/// The dependency walk and the plan of dependent bumps.
333pub mod dependent_version_graph;
334
335/// Every workspace manifest at both states, and which versions were raised.
336pub mod dependent_version_states;
337
338/// Which development dependencies each dependent bundles.
339pub mod dependent_version_bundled;
340
341/// The dependent-version plan with exact manifest bytes before and after.
342pub mod dependent_version_plan;
343
344/// The decision and findings of `mono/dependent-version-bump`.
345pub mod dependent_version_policy;
346
347/// The dependent-version planner's view of a prepared candidate state.
348pub mod dependent_version_lifecycle;
349
350/// Whether a direct fix may change a tracked file it did not select.
351pub mod policy_added_path;
352
353/// The `mono/dependent-version-bump` check over a lifecycle's candidate state.
354pub mod policy_dependent_version;
355
356/// An in-memory workspace that records reads; never in the release build.
357#[cfg(test)]
358mod dependent_version_test_support;
359
360/// Differential fixture reading and canonical results; never in the release build.
361#[cfg(test)]
362mod dependent_version_fixture_json;
363
364/// Canonical renderings of the native planner's results; never in the release build.
365#[cfg(test)]
366mod dependent_version_fixture_output;
367
368/// One differential case evaluated by the native planner; never in the release build.
369#[cfg(test)]
370mod dependent_version_fixture_cases;
371
372/// The native planner against the incumbent's recorded results; never in the release build.
373#[cfg(test)]
374mod dependent_version_differential_tests;
375
376/// The shipped policies as checks over rule cores and repository facts.
377pub mod policy_checks;
378
379/// What a lifecycle offers content policies,
380///  and its candidates once prepared.
381pub mod policy_content;
382
383/// The built-in final-newline policy:
384///  canonical final LF,
385///  preserved paths,
386///  findings.
387pub mod policy_final_newline;
388
389/// The optional root-context policy:
390///  no top-level `CONTEXT.md` enters the index.
391pub mod policy_root_context;
392
393/// The optional forbidden-strings policy over the linked scanner,
394///  with redacted findings.
395pub mod policy_forbidden_strings;
396
397/// One child program run with a time bound and output caps,
398///  through files instead of pipes.
399pub mod bounded_child;
400
401/// Where the `markdown/autofix` policy finds `monochromatic-lint`:
402///  absolute PATH entries only.
403pub mod markdown_linter_lookup;
404
405/// What one linter run printed:
406///  the fixed source and the findings left,
407///  or why it is unusable.
408pub mod markdown_linter_output;
409
410/// The one-rule linter configuration and the private temporary file it is written to.
411pub mod markdown_linter_config;
412
413/// The gitignore-syntax `exclude` patterns of `markdown/autofix`,
414///  matched as the linter matches them.
415pub mod markdown_exclude;
416
417/// The `markdown/autofix` policy over candidates,
418///  behind its linter interface.
419pub mod policy_markdown;
420
421/// The executable's linter for that policy:
422///  `monochromatic-lint` on PATH,
423///  bounded,
424///  once per candidate.
425pub mod markdown_linter;
426
427/// The executable's panic hook:
428///  where an internal error happened,
429///  never its message.
430pub mod panic_notice;
431
432/// Installing a direct fix's corrections into the worktree,
433///  all or none.
434pub mod direct_fix_install;
435
436/// The direct fix:
437///  converge corrections in memory,
438///  then install them.
439pub mod direct_fix;
440
441/// The fixed argument transforms of a forwarded command,
442///  in order.
443pub mod policy_transforms;
444
445/// One complete pass:
446///  built-in policies,
447///  fixed transforms,
448///  optional policies.
449pub mod policy_pass;
450
451/// The names of the commands built into Git 2.56.0.
452pub mod git_builtins;
453
454/// The work of the installed cli-git that is not ported,
455///  and the refusal notice.
456pub mod unported;
457
458/// The lifecycle of one wrapped Git command,
459///  from refusals to forwarding.
460pub mod wrapped_command;
461
462/// A scripted repository-facts provider for unit tests;
463///  never in the release build.
464#[cfg(test)]
465mod policy_test_support;
466
467/// The one failure type of the candidate layer and its closed list of causes.
468pub mod candidate_error;
469
470/// Validated Git object names and the file modes a candidate can carry.
471pub mod candidate_object;
472
473/// Pure framing of one `git cat-file --batch` reply.
474pub mod candidate_batch;
475
476/// Pure parsing of raw NUL-delimited changed-path records.
477pub mod candidate_record;
478
479/// The long-lived object reader that answers every blob read of an invocation.
480pub mod candidate_reader;
481
482/// Immutable candidate versions:
483///  identity,
484///  pathname,
485///  mode,
486///  change and object per path.
487pub mod candidate_version;
488
489/// Per-invocation listing,
490///  lazy bytes and invalidation of candidate versions.
491pub mod candidate_store;
492
493/// Pure parsing of `git ls-files --stage` records and the delta between two index states.
494pub mod candidate_stage;
495
496/// The files of a commit's tree with their modes and objects.
497pub mod candidate_tree;
498
499/// A private,
500///  timestamp-preserving copy of the real index,
501///  removed when dropped.
502pub mod candidate_private_index;
503
504/// What `git add` would stage,
505///  and the worktree files a direct command selects.
506pub mod candidate_prediction;
507
508/// The linked forbidden-strings scanner:
509///  one load per invocation,
510///  typed redacted findings.
511pub mod scanner_adapter;
512
513/// Rules-file precedence and which candidates the scanner is given.
514pub mod scanner_selection;
515
516/// One scan pass over a candidate version's exact bytes.
517pub mod scanner_run;
518
519/// Which engine failure code each candidate and scanner failure carries.
520pub mod scanner_failure_code;
521
522/// Process isolation and rule fixtures for scanner controls;
523///  never in the release build.
524#[cfg(test)]
525mod scanner_test_support;
526
527/// Private,
528///  crash-safe file primitives shared by every durable record.
529pub mod private_storage;
530
531/// Compact JSON records read and written with the incumbent's `JSON` semantics.
532pub mod json_record;
533
534/// Random identifiers in the layout of the incumbent's `randomUUID`.
535pub mod random_id;
536
537/// Text operations with the exact semantics of JavaScript's built-ins.
538pub mod js_text;
539
540/// The PID namespace an owner record names, and the rule for owners of another one.
541pub mod pid_namespace;
542
543/// Process-birth identities in the incumbent's exact spelling.
544pub mod process_identity;
545
546/// The owner record inside every owner-lock directory.
547pub mod owner_lock_record;
548
549/// Rename-published owner locks with dead-owner retirement and an unbounded wait.
550pub mod owner_lock;
551
552/// Line-oriented debug and warning diagnostics on standard error.
553pub mod diagnostic_log;
554
555/// The fail-closed failure of reading or recovering durable transaction state.
556pub mod recovery_error;
557
558/// The owner record of one commit-transaction directory and its liveness rule.
559pub mod transaction_owner;
560
561/// The per-worktree registry of commit-transaction directories.
562pub mod transaction_registry;
563
564/// The schema-version-2 journal records of one commit transaction and their filenames.
565pub mod transaction_journal;
566
567/// The exact encoding of every journal record.
568pub mod transaction_journal_encode;
569
570/// Strict parsers of every journal record.
571pub mod transaction_journal_parse;
572
573/// UTC timestamps in the exact form of JavaScript's `toISOString`.
574pub mod iso_time;
575
576/// The filesystem identity recorded with every real `index.lock` a transaction creates.
577pub mod filesystem_identity;
578
579/// Running real Git for transaction,
580///  recovery and landing work.
581pub mod transaction_git;
582
583/// The preparation and landing leases nested wrapper invocations inherit.
584pub mod transaction_lease;
585
586/// The dispatch plan of one commit transaction, its JSON spelling and the config reads it makes.
587pub mod hook_dispatch_plan;
588
589/// The hooks directory of one transaction: its plan and one entry per preparation event.
590pub mod hook_dispatch_entries;
591
592/// The hook dispatcher entered by a transaction's hook entry name, under the hook lock.
593pub mod hook_dispatch;
594
595/// No-follow file operations recovery and landing share.
596pub mod recovery_files;
597
598/// Durable evidence a dead transaction left:
599///  attempt records,
600///  owned locks and Git's PID file.
601pub mod recovery_evidence;
602
603/// The reflog search that proves which commit an interrupted transaction landed.
604pub mod recovery_reflog;
605
606/// Deciding whether a landing landed,
607///  and installing its recorded post-index.
608pub mod recovery_completion;
609
610/// The `.keep` files protecting a landing's migrated pack.
611pub mod pack_keep;
612
613/// Test-only transaction phase markers, compiled into the release executable and armed only by an environment variable.
614pub mod transaction_phase;
615
616/// Landing target comparison, nonce reflog message and compare-and-swap.
617pub mod landing_support;
618
619/// Migration of a prepared commit's shadow objects into a kept pack of the real store.
620pub mod landing_objects;
621
622/// Post-index a landing installs, computed against the real index at landing.
623pub mod landing_index;
624
625/// One landing attempt inside the landing critical section, and its outcome.
626pub mod landing_attempt;
627
628/// The `concurrent-commit` finding for a landing that landed nothing.
629pub mod landing_findings;
630
631/// Git commands run against a transaction's shadow repository.
632pub mod shadow_git;
633
634/// Native conclusion cleanup reproduced in the owning worktree.
635pub mod conclusion_cleanup;
636
637/// The per-worktree capture store:
638///  location,
639///  sequence and identity.
640pub mod capture_store;
641
642/// `captured.json`,
643///  landed-capture records,
644///  their recording and pruning.
645pub mod capture_records;
646
647/// Replay: the unified-diff parser of subsumption (`replay_patch`).
648pub mod replay_patch;
649
650/// Replay: the exact strict reverse check of subsumption (`replay_reverse_apply`).
651pub mod replay_reverse_apply;
652
653/// Replay: the one-sided extension of subsumption over zero-context hunks (`replay_containment`).
654pub mod replay_containment;
655
656/// Replay: raw commit objects as bytes, the unsigned rewrite and signed-rebuild inputs (`replay_object`).
657pub mod replay_object;
658
659/// Replay: capture order over the landed first-parent history and the per-path decision (`replay_capture_order`).
660pub mod replay_capture_order;
661
662/// Replay: the starvation reservation of the next landing slot (`replay_reservation`).
663pub mod replay_reservation;
664
665/// Replay: the shadow-repository Git runner that every replay step uses (`replay_shadow`).
666pub mod replay_shadow;
667
668/// Replay: shared paths of the landed history and the prepared commit, with their three entries (`replay_shared_paths`).
669pub mod replay_shared_paths;
670
671/// Replay: the text half of subsumption over index-named blobs and hunks (`replay_subsumption_text`).
672pub mod replay_subsumption_text;
673
674/// Replay: subsumption rules and the synthetic merge base (`replay_subsumption`).
675pub mod replay_subsumption;
676
677/// Replay: capture-order history and the per-path decisions from the transaction's and landed records (`replay_capture_history`).
678pub mod replay_capture_history;
679
680/// Replay: the merge tree, the first conflicting landed commit, and the replayed commit rebuild (`replay_merge`).
681pub mod replay_merge;
682
683/// Replay: the replayed index, the shadow HEAD move, and the pre-commit re-run decision of revalidation (`replay_revalidation`).
684pub mod replay_revalidation;
685
686/// Replay: one replay of a prepared commit onto a moved target, the integrator's replay result (`replay_commit`).
687pub mod replay_commit;
688/// The invocation capture:
689///  repository layout, symbolic `HEAD`, conclusion kind, ref backend and base.
690pub mod capture_invocation;
691
692/// The capture under capture order:
693///  the capture lock, the store identity, the sequence and `captured.json`.
694pub mod capture_order;
695
696/// The shadow repository `config` file and the copied repository format.
697pub mod shadow_config;
698
699/// The shadow repository links to the real shared entries.
700pub mod shadow_links;
701
702/// The shadow ref store: snapshot, private target, symbolic refs and `HEAD`.
703pub mod shadow_refs;
704
705/// The shadow conclusion copies at preparation.
706pub mod conclusion_copy;
707
708/// Argument transforms of native preparation: normalisation, global split, `-a` removal and private arguments.
709pub mod commit_args;
710
711/// The private commit index: copies, selection modes, pathspec files and listings.
712pub mod commit_index;
713
714/// Native `git commit` in the shadow, the prepared commit read back and `prepared.json`.
715pub mod commit_preparation;
716
717/// Creation of the shadow repository of one transaction.
718pub mod shadow_create;
719
720/// Loading many blobs through one `git cat-file --batch`.
721pub mod blob_batch;
722
723/// Bringing added paths' worktree copies to their landed bytes.
724pub mod worktree_completion;
725
726/// Owner inspection of registry entries and the oldest-first order.
727pub mod recovery_inspect;
728
729/// Recovery of one dead-owner transaction.
730pub mod recovery_landing;
731
732/// Disposal of a landed transaction: shadow removal, directory removal, then landed-capture pruning.
733pub mod landed_disposal;
734
735/// The post-commit run after a landing: author environment, hook lock, and the hook runner with inherited streams.
736pub mod post_commit_hook;
737
738/// Post-landing completion of one landed commit: worktree copies, disposal, maintenance, then `post-commit`.
739pub mod post_landing;
740
741/// Recovery across every transaction directory of one worktree.
742pub mod recovery_scan;
743
744/// Startup recovery of interrupted commit transactions.
745pub mod commit_recovery;
746
747/// Startup recovery as a step of a wrapped or direct command.
748pub mod transaction_gate;
749
750/// Process start times for lock owners,
751///  read from `/proc`,
752///  `ps` or the Windows process table.
753pub mod process_start;
754
755/// The Git version check run once before work that depends on Git's behavior.
756pub mod git_version;
757
758/// Processes holding a lock file open,
759///  found by device and inode.
760pub mod index_lock_holders;
761
762/// Parsers of `lsof -F pcDi` records and Restart Manager lines,
763///  matched by device and inode.
764pub mod index_lock_holder_parsers;
765
766/// Evidence about a foreign `index.lock` and the verdict it supports.
767pub mod index_lock_evidence;
768
769/// The Git command a forwarded invocation runs,
770///  after ordinary alias expansion.
771pub mod forwarded_command;
772
773/// Index-writer classification and the commands that coordinate with a landing.
774pub mod index_writer_commands;
775
776/// Waiting for a foreign index.lock under the classification rules and Git's backoff schedule.
777pub mod index_lock_wait;
778
779/// The host side effects of the index-lock wait:
780///  /proc reads,
781///  sleeps,
782///  randomness and standard error.
783pub mod index_lock_wait_host;
784
785/// The landing location a forwarded index writer coordinates with:
786///  the real index and the registry.
787pub mod landing_location;
788
789/// Coordination of a forwarded index writer:
790///  the landing lock,
791///  the wait for a foreign lock and the lease.
792pub mod index_writer_coordination;
793
794/// Running a coordinated forwarded index writer:
795///  the landing lock held while real Git runs as a child.
796pub mod index_writer_forward;
797
798/// The real index.lock a landing creates,
799///  identifies and releases only while it is the same file.
800pub mod real_index_lock;
801/// Automatic maintenance decision: config record parsing and the enable and detach rules.
802pub mod maintenance_decision;
803
804/// Running automatic maintenance after a landing: the config read, then `git maintenance run --auto`.
805pub mod maintenance_run;
806
807/// Catching SIGINT, SIGTERM, SIGHUP and SIGQUIT while a Git child runs, and relaying only process-sent signals.
808pub mod signal_relay;
809
810/// Exact removal of retired hk hook registrations from one explicit Git configuration scope.
811pub mod maintenance_hk_config;
812
813/// The per-branch push coordination file name: a reversible, flat, case-safe key.
814pub mod auto_push_branch_key;
815
816/// The per-branch `last-pushed` record: validation, tolerant reads and atomic publication.
817pub mod auto_push_record;
818
819/// Waiting for a lock a live process holds: a slow-wait notice naming the holder and a configurable backstop.
820pub mod live_lock;
821
822/// Read-only Git queries of the auto-push, each with a deadline and separate output streams.
823pub mod bounded_query;
824
825/// The auto-push's real `git push` with a deadline, its low-speed abort and the lock wait limit derived from it.
826pub mod bounded_push;
827
828/// Single-flight push coordination per branch: owner lock, record joins and the push itself.
829pub mod auto_push_single_flight;
830
831/// Publishing a landed commit that a moved remote branch rejected: the merge is made from objects alone and pushed.
832pub mod auto_push_reconcile;
833
834/// The paths of a dirty worktree and of a fast-forward, and their overlap.
835pub mod auto_push_dirty_paths;
836
837/// Post-commit auto-push of a landed commit: the push argv, the surfaced output and the failure reporting.
838pub mod auto_push;
839
840/// The post-commit gate over a landed commit: its events, its blocking and the backup it allows.
841pub mod post_commit;
842
843/// Authoritative manual-push updates discovered by a private dry-run push and confirmed with ls-remote.
844pub mod manual_push_probe;
845
846/// Published-set and range computation for manual-push scans: which pushed commits a remote does not have.
847pub mod manual_push_range;
848
849/// The manual-push candidate scope of one push: the commits and trees the destination lacks.
850pub mod manual_push_lifecycle;
851/// The one failure type of the linked-worktree ignored-state copy and its diagnostics.
852pub mod worktree_copy_error;
853
854/// Which linked worktrees a worktree-creating Git command registered, before and after it ran.
855pub mod worktree_copy_registry;
856
857/// The ignored source paths a linked-worktree copy selects, and the path validation every selection passes.
858pub mod worktree_copy_selection;
859
860/// The deterministic parent-first manifest of a copy, and the mode application to a staged copy.
861pub mod worktree_copy_manifest;
862
863/// Exact comparison of manifest entries against the filesystem, and the source stability check after staging.
864pub mod worktree_copy_compare;
865
866/// The private, validated stage of one source's ignored state beside a destination worktree.
867pub mod worktree_copy_stage;
868
869/// The exclusive creation of one destination entry from the stage, and the identity captured after it.
870#[cfg(unix)]
871pub mod worktree_copy_install_entry;
872
873/// Installation of a validated stage into a new worktree, with preflight, batches and rollback on failure.
874#[cfg(unix)]
875pub mod worktree_copy_install;
876
877/// Removal of the paths a failed installation created, only where their identity and content still prove them cli-git's own.
878#[cfg(unix)]
879pub mod worktree_copy_rollback;
880
881/// The durable journal of one copy: exact encoding, strict validation, private storage and removal.
882#[cfg(unix)]
883pub mod worktree_copy_journal;
884
885/// The durable claim on a stage container's name, and the removal of stages an interrupted copy left behind.
886#[cfg(unix)]
887pub mod worktree_copy_stage_claim;
888
889/// The append-only install log of one stage: per-batch intents and creations, with resumption.
890#[cfg(unix)]
891pub mod worktree_copy_install_log;
892
893/// One journaled installation to an end, resumption from the log, and synchronization of a created worktree.
894#[cfg(unix)]
895pub mod worktree_copy_transaction;
896
897/// The settlement lock that serializes copy installation and recovery, its owner record, and inherited leases.
898#[cfg(unix)]
899pub mod worktree_copy_lock;
900
901/// Recovery of interrupted copies: registration checks, discards with notices, resumption, and the pending check.
902#[cfg(unix)]
903pub mod worktree_copy_recovery;
904
905/// The linked-worktree ignored-state copy around one forwarded Git invocation: the integrator's entry point.
906#[cfg(unix)]
907pub mod worktree_copy;
908
909/// Which forwarded invocations the copy applies to, and the child run that carries its settlement lease.
910pub mod worktree_copy_forward;