Git obeys settings stored inside the project, and some of them name programs
that reading commands then run, or point git at files and history elsewhere.
Before the read-only grant covers a command with a git stage, the engine now
lists the settings that apply in the folder git would use
(coworker/git_settings.py):
- every project-level setting must be on a short list known to be inert;
the person's own global and system settings are trusted;
- the repository must lie inside the folders, or be a registered worktree of
one that does; a folder inside a larger repository asks;
- the git folder may hold no links or junctions, objects borrowed through
alternates must lie inside the folders, and a remote that fetches missing
objects on demand asks;
- when the person's own settings define a diff or filter program, a project
that carries any attributes asks (the standard Git LFS filter and the Git
for Windows text converter are trusted);
- initialised submodules are held to the same check; a project LFS settings
file asks;
- environment variables that make git run a program, or read attributes,
objects or the index from elsewhere, ask.
Listing settings never runs them. actionlint leaves the list: it may start
other linters.
Tests: tests/test_readonly_git_settings.py.