Expand description
The git settings that name a program, taken from the environment for a host agent in a folder a container agent can write.
In such a folder (mcp_folder_rule) the folder’s own .git/config is not the person’s: a container agent
can write it, and a plain git status by the host agent runs what it names. Git reads configuration from the
environment (GIT_CONFIG_COUNT, GIT_CONFIG_KEY_<n>, GIT_CONFIG_VALUE_<n>) after every file, so the
settings below are given there, by the same entries as core.hooksPath (publish_guard), with a value that
runs nothing of the folder’s. For the settings a person chooses for themselves (their ssh command, their
signing programs, their editors) the value is the one git gives from the person’s system and global
configuration alone, and the neutral value is used only when neither sets one: the folder’s value is never
used. Every other agent’s git is left as it is.
What is set, checked against git 2.52 (a value is read the last one wins, except core.gitProxy, where the
first wins, so that one is set by its own variable):
core.sshCommand(ssh),core.editorandsequence.editor(true),gpg.programandgpg.openpgp.program(gpg),gpg.ssh.program(ssh-keygen),gpg.x509.program(gpgsm),gpg.ssh.defaultKeyCommand(true): the person’s own value, else the one in brackets;core.fsmonitorfalse,core.pagercat,pager.<command>falsefor every git command (a pager the folder names for one command, such aspager.log, takes precedence overcore.pager),core.askPassempty (no program asked, no fallback toSSH_ASKPASS);protocol.ext.allownever: the folder’s remote cannot name a command (ext::) to run;credential.helperempty, first of the entries, which clears every helper the files named, so the helpers the environment lists after it (the GitHub broker’s, undercredential.<url>.helper) are the only ones; acredential.helperthe environment itself lists is left;GIT_PROXY_COMMANDempty (no proxy command), unless the environment already has a value.
Constants§
- META_
KEY_ PTYSHELL_ GIT_ PROGRAM_ SETTINGS - The meta key of a shell pane of such an agent that says its git is given
entries_over.
Functions§
- apply_
for_ spawn - The spawn environment of an agent whose pane has
block_meta: given the settings when it is a host agent in a folder the rule holds for, and left as it is otherwise. - entries_
over - The variables that give git the settings above, on top of the entries
getalready sees;ownispersons_values. - persons_
values - The person’s own value (lower-cased name to value) for each of [
PERSONS] that their system or global git configuration sets, read outside any repository: what git gives with no folder’s configuration. Kept for a short while, so a start of several agents asks git once.