1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
//! What:
//! Per-command handling:
//! the option grammar of each Git command the wrapper understands,
//! and the rules that rewrite,
//! refuse or hint at a command.
//! Why:
//! The wrapper judges commands one by one,
//! so everything that is about a single Git command lives together.
//!
//! In TS you'd write (pseudocode):
//! ```ts
//! // command/index.ts: one `export * from './file'` per module below.
//! ```
/// Git 2.56.0 `parse-options` tokenization of one command's argument region.
/// Long-option matching:
/// exact names,
/// unique abbreviations and `no-` negation.
pub
/// Final-state and position questions over a tokenized region.
/// Short-option clusters and their attached or following values.
pub
/// The shared decision of which bytes are an option's value.
pub
/// Real-Git fixtures and table oracles for command tests;
/// never in the release build.
pub
/// Per-case copies of a pristine fixture and worker threads for independent test cases;
/// never in the release build.
pub
/// Differential harness over `git rev-parse --parseopt`;
/// never in the release build.
pub
/// Table oracle over `--git-completion-helper-all`;
/// never in the release build.
pub
/// Facts about the arguments after `git commit`.
/// The complete Git 2.56.0 option table of `git commit`.
/// The shared result and builder of transforms that add tokens to a command line.
/// The query and reading of "does this worktree hold uncommitted state?".
/// The Git 2.56.0 option table of `git push` and its facts.
/// The Git 2.56.0 option table of `git status`,
/// its facts and the advice-key reading.
/// Pure decision of the atomic-push transform.
/// Pure decision of the status-hints transform.
/// The Git 2.56.0 option table of `git add` and its bulk-staging facts.
/// The Git 2.56.0 option table of `git clean` and its deletion facts.
/// The Git 2.56.0 option table of `git reset` and its mode.
/// `git stash` subcommand dispatch and wrapper-flag positions.
/// The commands that can overwrite or delete uncommitted state, read as Git reads them.
/// The Git 2.56.0 option tables of every `git stash` subcommand.
/// Branch-creation facts of `git branch`,
/// `git checkout` and `git switch`.
/// Which action a tokenized `git branch` region selects.
pub
/// The complete Git 2.56.0 option table of `git branch`.
/// Explicit creation and the remote-guess candidate of `git checkout` and `git switch`.
pub
/// The complete Git 2.56.0 option tables of `git checkout` and `git switch`.
/// The Git 2.56.0 option groups of `git config`.
/// The form and file scope of a `git config` region.
/// Pure decision of the require-root policy.
/// Whether a `git worktree` invocation changes worktree registrations (an add or a move).
/// Pure decision of the linked-worktree-only policy.
/// The rejection texts of the linked-worktree-only policy.
/// Pure decision of the branch-worktree-only policy and its one-query remote guess.
/// Pure decision of the add-explicit policy.