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