mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-28 07:46:28 +00:00
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
Block a user