diff options
Diffstat (limited to 'src/git_config/git_config.rs')
-rw-r--r-- | src/git_config/git_config.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/git_config/git_config.rs b/src/git_config/git_config.rs index 96209603..d95a6b1a 100644 --- a/src/git_config/git_config.rs +++ b/src/git_config/git_config.rs @@ -42,10 +42,14 @@ impl GitConfig { } #[cfg(test)] - pub fn from_path(path: &Path) -> Self { + pub fn from_path(path: &Path, honor_env_var: bool) -> Self { Self { config: git2::Config::open(path).unwrap(), - config_from_env_var: parse_config_from_env_var(), + config_from_env_var: if honor_env_var { + parse_config_from_env_var() + } else { + HashMap::new() + }, repo: None, enabled: true, } |