Skip to content

Commit

Permalink
Respect env variables when running gix
Browse files Browse the repository at this point in the history
  • Loading branch information
cruessler committed Oct 21, 2024
1 parent bcdce6e commit 0bebe52
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/plumbing/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ pub fn main() -> Result<()> {
};
mapping.full.modify(to_match_settings);
mapping.reduced.modify(to_match_settings);
let mut repo = gix::ThreadSafeRepository::discover_opts(repository, Default::default(), mapping)
.map(gix::Repository::from)?;
let mut repo = gix::ThreadSafeRepository::discover_with_environment_overrides_opts(
repository,
Default::default(),
mapping,
)
.map(gix::Repository::from)?;
if !config.is_empty() {
repo.config_snapshot_mut()
.append_config(config.iter(), gix::config::Source::Cli)
Expand Down

0 comments on commit 0bebe52

Please sign in to comment.