fix: Use git2::Repository::open_ext() instead of discover() (#3591)
This lets starship respect the $GIT_CEILING_DIRECTORIES env var.
This commit is contained in:
parent
382445dc4d
commit
81a696a914
|
@ -260,7 +260,8 @@ impl<'a> Context<'a> {
|
|||
let repository = if env::var("GIT_DIR").is_ok() {
|
||||
Repository::open_from_env()
|
||||
} else {
|
||||
Repository::discover(&self.current_dir)
|
||||
let dirs: [PathBuf; 0] = [];
|
||||
Repository::open_ext(&self.current_dir, git2::RepositoryOpenFlags::FROM_ENV, dirs)
|
||||
}?;
|
||||
Ok(Repo {
|
||||
branch: get_current_branch(&repository),
|
||||
|
|
Loading…
Reference in New Issue