#include "cache.h" #include "config.h" #include "dir.h" #include "tr2_sysenv.h" /* * Each entry represents a trace2 setting. * See Documentation/technical/api-trace2.txt */ struct tr2_sysenv_entry { const char *env_var_name; const char *git_config_name; char *value; unsigned int getenv_called : 1; }; /* * This table must match "enum tr2_sysenv_variable" in tr2_sysenv.h. * * The strings in this table are constant and must match the published * config and environment variable names as described in the documentation. * * We do not define entries for the GIT_TRACE2_PARENT_* environment * variables because they are transient and used to pass information * from parent to child git processes, rather than settings. */ /* clang-format off */ static struct tr2_sysenv_entry tr2_sysenv_settings[] = { [TR2_SYSENV_CFG_PARAM] = { "GIT_TRACE2_CONFIG_PARAMS", "trace2.configparams" }, [TR2_SYSENV_ENV_VARS] = { "GIT_TRACE2_ENV_VARS", "trace2.envvars" }, [TR2_SYSENV_DST_DEBUG] = { "GIT_TRACE2_DST_DEBUG", "trace2.destinationdebug" }, [TR2_SYSENV_NORMAL] = { "GIT_TRACE2", "trace2.normaltarget" }, [TR2_SYSENV_NORMAL_BRIEF] = {