Expand description
Bounded, removal-aware control state used to classify retained filesystem facts.
A control file is producer input, not something the index discovers by walking the filesystem. The table stores the exact bytes a producer verified and the matcher derived from them. That keeps cold discovery, refresh, observation, and snapshot load on one semantic path and makes deleting the last control file an ordinary state transition rather than a special rebuild.
Which of git’s ignore inputs count. Exactly one: each directory’s
CONTROL_FILE_NAME inside the scanned root, governing its own directory and
everything below it, with deeper files taking precedence. Nothing else git consults is
read. .git/info/exclude and core.excludesFile are ignored, so a .DS_Store excluded
only globally lands in the unignored partition. A nested repository is not a boundary:
its .gitignore files join the outer ones as if the tree were one repository. And
unlike git, which never looks inside an ignored directory, the walk reads a
.gitignore there too; the ignored partition is still right, because git’s rule that
an excluded parent cannot be re-included is applied when matching, but the file’s
bytes are retained against the table bound. Matching is case-sensitive regardless of
core.ignorecase.
Which file is a directory’s control. Whatever a lookup of <dir>/.gitignore
resolves to, because that is the path git opens. On a case-sensitive directory that is
only an entry named exactly .gitignore; on a case-insensitive one (APFS and NTFS by
default, an ext4 casefold directory) it is the one entry the filesystem folds to that
name, so a .GITIGNORE governs there as it does for git, and nowhere else. The rules
are recorded under the canonical path <dir>/.gitignore whatever spelling holds them:
every control operation, table key, refusal, and change names that path, as
git check-ignore -v does, so is_control_file accepts only that path. A walk pays
for this only on a listed name spelled .gitignore in another ASCII case, which it
resolves with one lookup of the canonical path; the exact name is read by its own path
as before, and every other name costs a length comparison. A name some filesystem
folds to .gitignore through a non-ASCII character is not looked up.
Structs§
- Control
Identity - Stable, non-sensitive identity of one retained control source.
- Control
Limits - The two bounds on the control state one index retains, each liftable on its own.
- Control
Matcher - A path-bound view over the controls that may govern it.
- Control
Observation - The control files an observing index applied and refused.
- Control
Table - Exact
.gitignoresources and parsed matchers, keyed by governing directory. - Refused
Control - One control file whose rules an index refused, relative to the index root.
Enums§
- Control
Admission - What a control table did with one verified control source.
- Control
Coverage - Whether an index’s ignore classification applies every control file in its scope.
- Control
Refusal Reason - Which of the
ControlLimitsrefused a control source instead of applying its rules.
Constants§
- CONTROL_
FILE_ NAME - Name of the fixed control file understood by the first engine version.
- DEFAULT_
CONTROL_ BUDGET - Default retained control-table charge for one index, in bytes.
- DEFAULT_
CONTROL_ LINE_ LIMIT - Default longest line a control source may hold, in bytes.
Functions§
- is_
control_ file - Whether a relative path names the fixed control file: the canonical path every control operation, and the table, name a directory’s rules by.