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/// Where short-lived private files live:
553/// the per-user scratch directory and the repository scratch directory,
554/// never the system temporary directory.
555pub mod scratch_location;
556
557/// Compact JSON records read and written with the incumbent's `JSON` semantics.
558pub mod json_record;
559
560/// Random identifiers in the layout of the incumbent's `randomUUID`.
561pub mod random_id;
562
563/// Text operations with the exact semantics of JavaScript's built-ins.
564pub mod js_text;
565
566/// The PID namespace an owner record names, and the rule for owners of another one.
567pub mod pid_namespace;
568
569/// Process-birth identities in the incumbent's exact spelling.
570pub mod process_identity;
571
572/// The owner record inside every owner-lock directory.
573pub mod owner_lock_record;
574
575/// Rename-published owner locks with dead-owner retirement and an unbounded wait.
576pub mod owner_lock;
577
578/// Line-oriented debug and warning diagnostics on standard error.
579pub mod diagnostic_log;
580
581/// The fail-closed failure of reading or recovering durable transaction state.
582pub mod recovery_error;
583
584/// The owner record of one commit-transaction directory and its liveness rule.
585pub mod transaction_owner;
586
587/// The per-worktree registry of commit-transaction directories.
588pub mod transaction_registry;
589
590/// The length and hash of an index snapshot that a landing record keeps.
591pub mod content_digest;
592
593/// The schema-version-2 journal records of one commit transaction and their filenames.
594pub mod transaction_journal;
595
596/// The exact encoding of every journal record.
597pub mod transaction_journal_encode;
598
599/// Strict parsers of every journal record.
600pub mod transaction_journal_parse;
601
602/// UTC timestamps in the exact form of JavaScript's `toISOString`.
603pub mod iso_time;
604
605/// The filesystem identity recorded with every real `index.lock` a transaction creates.
606pub mod filesystem_identity;
607
608/// The Linux filesystem UUID of a path read from the mount table and the udev database instead of `findmnt`.
609#[cfg(target_os = "linux")]
610pub mod filesystem_identity_mount;
611
612/// The Linux `f_fsid` of a path asked of the kernel in-process instead of by starting `stat`.
613#[cfg(target_os = "linux")]
614pub mod filesystem_identity_fsid;
615
616/// Running real Git for transaction,
617/// recovery and landing work.
618pub mod transaction_git;
619
620/// The preparation and landing leases nested wrapper invocations inherit.
621pub mod transaction_lease;
622
623/// The dispatch plan of one commit transaction, its JSON spelling and the config reads it makes.
624pub mod hook_dispatch_plan;
625
626/// The hooks directory of one transaction: its plan and one entry per preparation event.
627pub mod hook_dispatch_entries;
628
629/// The hook dispatcher entered by a transaction's hook entry name, under the hook lock.
630pub mod hook_dispatch;
631
632/// The non-blocking warning for a configured `core.hooksPath`, decided from the configuration snapshot alone.
633pub mod traditional_hook_warning;
634
635/// `git cli-git doctor`: the traditional hooks a repository holds, which are unsupported.
636pub mod doctor;
637
638/// The Git LFS upload before a push, as a configuration hook the wrapper puts in effect for its own pushes.
639pub mod lfs_pre_push;
640
641/// Every real-Git start of the wrapper carries `core.hooksPath` pointing at a directory that never exists.
642pub mod hooks_off;
643
644/// No-follow file operations recovery and landing share.
645pub mod recovery_files;
646
647/// Durable evidence a dead transaction left:
648/// attempt records,
649/// owned locks and Git's PID file.
650pub mod recovery_evidence;
651
652/// The reflog search that proves which commit an interrupted transaction landed.
653pub mod recovery_reflog;
654
655/// Deciding whether a landing landed,
656/// and installing its recorded post-index.
657pub mod recovery_completion;
658
659/// The check that an index snapshot still holds the bytes the landing wrote.
660pub mod recovery_snapshot;
661
662/// The steps that finish a retained transaction by hand.
663pub mod recovery_manual_steps;
664
665/// The failure of a journal record that cannot be read, with its path and ways out named.
666pub mod recovery_record_failure;
667
668/// The refusal to discard a transaction whose branch moved but whose records say otherwise.
669pub mod recovery_contradiction;
670
671/// The `.keep` files protecting a landing's migrated pack.
672pub mod pack_keep;
673
674/// Test-only transaction phase markers, compiled into the release executable and armed only by an environment variable.
675pub mod transaction_phase;
676
677/// Landing target comparison, nonce reflog message and compare-and-swap.
678pub mod landing_support;
679
680/// Migration of a prepared commit's shadow objects into a kept pack of the real store.
681pub mod landing_objects;
682
683/// Post-index a landing installs, computed against the real index at landing.
684pub mod landing_index;
685
686/// The check that a landing changed no staged entry outside the paths it committed.
687pub mod landing_invariant;
688
689/// One landing attempt inside the landing critical section, and its outcome.
690pub mod landing_attempt;
691
692/// The `concurrent-commit` finding for a landing that landed nothing.
693pub mod landing_findings;
694
695/// Git commands run against a transaction's shadow repository.
696pub mod shadow_git;
697
698/// Native conclusion cleanup reproduced in the owning worktree.
699pub mod conclusion_cleanup;
700
701/// The per-worktree capture store:
702/// location,
703/// sequence and identity.
704pub mod capture_store;
705
706/// `captured.json`,
707/// landed-capture records,
708/// their recording and pruning.
709pub mod capture_records;
710
711/// Replay: the unified-diff parser of subsumption (`replay_patch`).
712pub mod replay_patch;
713
714/// Replay: the exact strict reverse check of subsumption (`replay_reverse_apply`).
715pub mod replay_reverse_apply;
716
717/// Replay: the one-sided extension of subsumption over zero-context hunks (`replay_containment`).
718pub mod replay_containment;
719
720/// Replay: raw commit objects as bytes, the unsigned rewrite and signed-rebuild inputs (`replay_object`).
721pub mod replay_object;
722
723/// Replay: capture order over the landed first-parent history and the per-path decision (`replay_capture_order`).
724pub mod replay_capture_order;
725
726/// Replay: the starvation reservation of the next landing slot (`replay_reservation`).
727pub mod replay_reservation;
728
729/// Replay: the shadow-repository Git runner that every replay step uses (`replay_shadow`).
730pub mod replay_shadow;
731
732/// Replay: shared paths of the landed history and the prepared commit, with their three entries (`replay_shared_paths`).
733pub mod replay_shared_paths;
734
735/// Replay: the text half of subsumption over index-named blobs and hunks (`replay_subsumption_text`).
736pub mod replay_subsumption_text;
737
738/// Replay: subsumption rules and the synthetic merge base (`replay_subsumption`).
739pub mod replay_subsumption;
740
741/// Replay: capture-order history and the per-path decisions from the transaction's and landed records (`replay_capture_history`).
742pub mod replay_capture_history;
743
744/// Replay: the merge tree, the first conflicting landed commit, and the replayed commit rebuild (`replay_merge`).
745pub mod replay_merge;
746
747/// Replay: the replayed index, the shadow HEAD move, and the pre-commit re-run decision of revalidation (`replay_revalidation`).
748pub mod replay_revalidation;
749
750/// Replay: one replay of a prepared commit onto a moved target, the integrator's replay result (`replay_commit`).
751pub mod replay_commit;
752/// The empty tree's object name under each known object format.
753pub mod empty_tree;
754
755/// Files-backend ref reads that answer without a Git process or decline.
756pub mod ref_files;
757
758/// Proof, without a Git process, that a sequencer marker names nothing on the files ref storage.
759pub mod sequencer_marker;
760
761/// The invocation capture:
762/// repository layout, symbolic `HEAD`, conclusion kind, ref backend and base.
763pub mod capture_invocation;
764
765/// The capture under capture order:
766/// the capture lock, the store identity, the sequence and `captured.json`.
767pub mod capture_order;
768
769/// The shadow repository `config` file and the copied repository format.
770pub mod shadow_config;
771
772/// The shadow repository links to the real shared entries.
773pub mod shadow_links;
774
775/// The shadow ref store: snapshot, private target, symbolic refs and `HEAD`.
776pub mod shadow_refs;
777
778/// The shadow conclusion copies at preparation.
779pub mod conclusion_copy;
780
781/// Argument transforms of native preparation: normalisation, global split, `-a` removal and private arguments.
782pub mod commit_args;
783
784/// The private commit index: copies, selection modes, pathspec files and listings.
785pub mod commit_index;
786
787/// Native `git commit` in the shadow, the prepared commit read back and `prepared.json`.
788pub mod commit_preparation;
789
790/// Creation of the shadow repository of one transaction.
791pub mod shadow_create;
792
793/// Loading many blobs through one `git cat-file --batch`.
794pub mod blob_batch;
795
796/// Bringing added paths' worktree copies to their landed bytes.
797pub mod worktree_completion;
798
799/// Owner inspection of registry entries and the oldest-first order.
800pub mod recovery_inspect;
801
802/// Recovery of one dead-owner transaction.
803pub mod recovery_landing;
804
805/// Disposal of a landed transaction: shadow removal, directory removal, then landed-capture pruning.
806pub mod landed_disposal;
807
808/// The post-commit run after a landing: author environment, hook lock, and the hook runner with inherited streams.
809pub mod post_commit_hook;
810
811/// Post-landing completion of one landed commit: worktree copies, disposal, maintenance, then `post-commit`.
812pub mod post_landing;
813
814/// Recovery across every transaction directory of one worktree.
815pub mod recovery_scan;
816
817/// Startup recovery of interrupted commit transactions.
818pub mod commit_recovery;
819
820/// Startup recovery as a step of a wrapped or direct command.
821pub mod transaction_gate;
822
823/// Process start times for lock owners,
824/// read from `/proc`,
825/// `ps` or the Windows process table.
826pub mod process_start;
827
828/// The Git version check run once before work that depends on Git's behavior.
829pub mod git_version;
830
831/// The private per-user cache of the version text, keyed by the Git executable's identity.
832pub mod git_version_cache;
833
834/// Processes holding a lock file open,
835/// found by device and inode.
836pub mod index_lock_holders;
837
838/// Parsers of `lsof -F pcDi` records and Restart Manager lines,
839/// matched by device and inode.
840pub mod index_lock_holder_parsers;
841
842/// Evidence about a foreign `index.lock` and the verdict it supports.
843pub mod index_lock_evidence;
844
845/// The Git command a forwarded invocation runs,
846/// after ordinary alias expansion.
847pub mod forwarded_command;
848
849/// Index-writer classification and the commands that coordinate with a landing.
850pub mod index_writer_commands;
851
852/// Waiting for a foreign index.lock under the classification rules and Git's backoff schedule.
853pub mod index_lock_wait;
854
855/// The host side effects of the index-lock wait:
856/// /proc reads,
857/// sleeps,
858/// randomness and standard error.
859pub mod index_lock_wait_host;
860
861/// The landing location a forwarded index writer coordinates with:
862/// the real index and the registry.
863pub mod landing_location;
864
865/// Coordination of a forwarded index writer:
866/// the landing lock,
867/// the wait for a foreign lock and the lease.
868pub mod index_writer_coordination;
869
870/// Running a coordinated forwarded index writer:
871/// the landing lock held while real Git runs as a child.
872pub mod index_writer_forward;
873
874/// The `git merge` command lines the wrapper completes in isolation, and those it leaves to native Git.
875pub mod merge_options;
876
877/// The durable intent record of an isolated merge.
878pub mod merge_isolation_journal;
879
880/// The raw differences of an isolated merge and the worktree state of each changed path.
881pub mod merge_isolation_changes;
882
883/// Recovery of an isolated merge whose process died.
884pub mod merge_isolation_recovery;
885
886/// The commit message of an isolated merge.
887pub mod merge_isolation_message;
888
889/// The refusal findings of an isolated merge.
890pub mod merge_isolation_report;
891
892/// A true merge completed in isolation while the index holds staged changes.
893pub mod merge_isolation;
894
895/// The real index.lock a landing creates,
896/// identifies and releases only while it is the same file.
897pub mod real_index_lock;
898/// Automatic maintenance decision: config record parsing and the enable and detach rules.
899pub mod maintenance_decision;
900
901/// Running automatic maintenance after a landing: the config read, then `git maintenance run --auto`.
902pub mod maintenance_run;
903
904/// Catching SIGINT, SIGTERM, SIGHUP and SIGQUIT while a Git child runs, and relaying only process-sent signals.
905pub mod signal_relay;
906
907/// Exact removal of retired hk hook registrations from one explicit Git configuration scope.
908pub mod maintenance_hk_config;
909
910/// The per-branch push coordination file name: a reversible, flat, case-safe key.
911pub mod auto_push_branch_key;
912
913/// The per-branch `last-pushed` record: validation, tolerant reads and atomic publication.
914pub mod auto_push_record;
915
916/// Waiting for a lock a live process holds: a slow-wait notice naming the holder and a configurable backstop.
917pub mod live_lock;
918
919/// The shared clock of every wait notice: the grace, the repeat interval and a queued commit's place in line.
920pub mod wait_progress;
921
922/// A watcher for waits that block on a child process: notices at the cadence and the child stopped at the bound.
923pub mod child_watch;
924
925/// Read-only Git queries of the auto-push, each with a deadline and separate output streams.
926pub mod bounded_query;
927
928/// The auto-push's real `git push` with a deadline, its low-speed abort and the lock wait limit derived from it.
929pub mod bounded_push;
930
931/// The processes below one process, read before it is stopped and signalled only while they are still the ones found.
932pub mod process_tree;
933
934/// Single-flight push coordination per branch: owner lock, record joins and the push itself.
935pub mod auto_push_single_flight;
936
937/// Publishing a landed commit that a moved remote branch rejected: the merge is made from objects alone and pushed.
938pub mod auto_push_reconcile;
939
940/// The paths of a dirty worktree and of a fast-forward, and their overlap.
941pub mod auto_push_dirty_paths;
942
943/// Post-commit auto-push of a landed commit: the push argv, the surfaced output and the failure reporting.
944pub mod auto_push;
945
946/// The post-commit gate over a landed commit: its events, its blocking and the backup it allows.
947pub mod post_commit;
948
949/// Authoritative manual-push updates discovered by a private dry-run push and confirmed with ls-remote.
950pub mod manual_push_probe;
951
952/// Published-set and range computation for manual-push scans: which pushed commits a remote does not have.
953pub mod manual_push_range;
954
955/// An explicit push that lost a race: run as a child, merge in what landed on the remote and publish the merge.
956pub mod push_stacking;
957
958/// Starting a child again when the operating system refuses it for lack of processes, within a bounded wait.
959pub mod start_retry;
960
961/// The manual-push candidate scope of one push: the commits and trees the destination lacks.
962pub mod manual_push_lifecycle;
963/// The one failure type of the linked-worktree ignored-state copy and its diagnostics.
964pub mod worktree_copy_error;
965
966/// Which linked worktrees a worktree-creating Git command registered, before and after it ran.
967pub mod worktree_copy_registry;
968
969/// The ignored source paths a linked-worktree copy selects, and the path validation every selection passes.
970pub mod worktree_copy_selection;
971
972/// The deterministic parent-first manifest of a copy, and the mode application to a staged copy.
973pub mod worktree_copy_manifest;
974
975/// Exact comparison of manifest entries against the filesystem, and the source stability check after staging.
976pub mod worktree_copy_compare;
977
978/// The private, validated stage of one source's ignored state beside a destination worktree.
979pub mod worktree_copy_stage;
980
981/// The exclusive creation of one destination entry from the stage, and the identity captured after it.
982#[cfg(unix)]
983pub mod worktree_copy_install_entry;
984
985/// Installation of a validated stage into a new worktree, with preflight, batches and rollback on failure.
986#[cfg(unix)]
987pub mod worktree_copy_install;
988
989/// Removal of the paths a failed installation created, only where their identity and content still prove them cli-git's own.
990#[cfg(unix)]
991pub mod worktree_copy_rollback;
992
993/// The durable journal of one copy: exact encoding, strict validation, private storage and removal.
994#[cfg(unix)]
995pub mod worktree_copy_journal;
996
997/// The durable claim on a stage container's name, and the removal of stages an interrupted copy left behind.
998#[cfg(unix)]
999pub mod worktree_copy_stage_claim;
1000
1001/// The append-only install log of one stage: per-batch intents and creations, with resumption.
1002#[cfg(unix)]
1003pub mod worktree_copy_install_log;
1004
1005/// One journaled installation to an end, resumption from the log, and synchronization of a created worktree.
1006#[cfg(unix)]
1007pub mod worktree_copy_transaction;
1008
1009/// The settlement lock that serializes copy installation and recovery, its owner record, and inherited leases.
1010#[cfg(unix)]
1011pub mod worktree_copy_lock;
1012
1013/// Recovery of interrupted copies: registration checks, discards with notices, resumption, and the pending check.
1014#[cfg(unix)]
1015pub mod worktree_copy_recovery;
1016
1017/// The linked-worktree ignored-state copy around one forwarded Git invocation: the integrator's entry point.
1018#[cfg(unix)]
1019pub mod worktree_copy;
1020
1021/// Which forwarded invocations the copy applies to, and the child run that carries its settlement lease.
1022pub mod worktree_copy_forward;