Skip to content

Commit ce923e6

Browse files
authored
supply libgit2 with flag to respect env variables (#2299)
closes #2298
1 parent 7fec560 commit ce923e6

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
### Fixes
11+
* respect env vars like `GIT_CONFIG_GLOBAL` ([#2298](https://github.com/extrawurst/gitui/issues/2298))
12+
1013
## [0.26.3] - 2024-06-02
1114

1215
### Breaking Changes

asyncgit/src/sync/repository.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl From<&str> for RepoPath {
5151
pub fn repo(repo_path: &RepoPath) -> Result<Repository> {
5252
let repo = Repository::open_ext(
5353
repo_path.gitpath(),
54-
RepositoryOpenFlags::empty(),
54+
RepositoryOpenFlags::FROM_ENV,
5555
Vec::<&Path>::new(),
5656
)?;
5757

asyncgit/src/sync/submodules.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ pub fn submodule_parent_info(
123123

124124
if let Ok(parent) = Repository::open_ext(
125125
parent_path,
126-
RepositoryOpenFlags::empty(),
126+
RepositoryOpenFlags::FROM_ENV,
127127
Vec::<&Path>::new(),
128128
) {
129129
let parent_wd = work_dir(&parent)?.to_path_buf();

asyncgit/src/sync/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub struct Head {
2828
pub fn repo_open_error(repo_path: &RepoPath) -> Option<String> {
2929
Repository::open_ext(
3030
repo_path.gitpath(),
31-
RepositoryOpenFlags::empty(),
31+
RepositoryOpenFlags::FROM_ENV,
3232
Vec::<&Path>::new(),
3333
)
3434
.map_or_else(|e| Some(e.to_string()), |_| None)

0 commit comments

Comments
 (0)