Skip to content

Commit

Permalink
supply libgit2 with flag to respect env variables (#2299)
Browse files Browse the repository at this point in the history
closes #2298
  • Loading branch information
extrawurst authored Jul 25, 2024
1 parent 7fec560 commit ce923e6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Fixes
* respect env vars like `GIT_CONFIG_GLOBAL` ([#2298](https://github.com/extrawurst/gitui/issues/2298))

## [0.26.3] - 2024-06-02

### Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion asyncgit/src/sync/repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl From<&str> for RepoPath {
pub fn repo(repo_path: &RepoPath) -> Result<Repository> {
let repo = Repository::open_ext(
repo_path.gitpath(),
RepositoryOpenFlags::empty(),
RepositoryOpenFlags::FROM_ENV,
Vec::<&Path>::new(),
)?;

Expand Down
2 changes: 1 addition & 1 deletion asyncgit/src/sync/submodules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub fn submodule_parent_info(

if let Ok(parent) = Repository::open_ext(
parent_path,
RepositoryOpenFlags::empty(),
RepositoryOpenFlags::FROM_ENV,
Vec::<&Path>::new(),
) {
let parent_wd = work_dir(&parent)?.to_path_buf();
Expand Down
2 changes: 1 addition & 1 deletion asyncgit/src/sync/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct Head {
pub fn repo_open_error(repo_path: &RepoPath) -> Option<String> {
Repository::open_ext(
repo_path.gitpath(),
RepositoryOpenFlags::empty(),
RepositoryOpenFlags::FROM_ENV,
Vec::<&Path>::new(),
)
.map_or_else(|e| Some(e.to_string()), |_| None)
Expand Down

0 comments on commit ce923e6

Please sign in to comment.