Skip to main content

environment_sets

Function environment_sets 

Source
pub fn environment_sets<'a>(
    variables: impl IntoIterator<Item = (&'a OsStr, &'a OsStr)>,
) -> bool
Expand description

What: Whether the environment sets the key: a GIT_CONFIG_KEY_<n> variable naming it, or GIT_CONFIG_PARAMETERS mentioning it. Why: Git reads these after every file, so a value there is the person’s whatever the files say; the check is on the text, so a spelling the reader would decline is still found.

In TS you’d write (pseudocode):

Object.entries(env).some(([name, value]) => (name.startsWith('GIT_CONFIG_KEY_') || name === 'GIT_CONFIG_PARAMETERS') && value.toLowerCase().includes('checkout.workers'))