pub fn prefix_variables(
global_prefix: &[OsString],
environment: &[(OsString, OsString)],
) -> Vec<(OsString, OsString)>Expand description
What:
The variables that carry the global options of a push into a child that reads Git’s configuration.
Why:
-c name=value becomes GIT_CONFIG_KEY_n/GIT_CONFIG_VALUE_n after any pairs the environment already holds
(a -c without = is the boolean true), --git-dir, --work-tree and --namespace become GIT_DIR,
GIT_WORK_TREE and GIT_NAMESPACE; -C is the working directory and is applied by the caller.
No shell is involved, and an -c http.extraHeader=... or -c lfs.url=... reaches git-lfs as it reached the
Git that used to run the hook.
In TS you’d write (pseudocode):
function prefixVariables(globalPrefix: string[], environment): [string, string][];