Skip to content

Commit a2e2b45

Browse files
committed
supply libgit with flag to respect env variables.
try fixing #2298
1 parent d378699 commit a2e2b45

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

asyncgit/src/sync/repository.rs

+1-1
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

+1-1
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

+1-1
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)