diff --git a/helix-vcs/src/git.rs b/helix-vcs/src/git.rs index 080f9b633b3e4..979f8726e3638 100644 --- a/helix-vcs/src/git.rs +++ b/helix-vcs/src/git.rs @@ -29,7 +29,7 @@ pub fn get_diff_base(file: &Path) -> Result> { // TODO cache repository lookup let repo_dir = file.parent().context("file has no parent directory")?; - let repo = open_repo(repo_dir, None) + let repo = open_repo(repo_dir) .context("failed to open git repo")? .to_thread_local(); let head = repo.head_commit()?; @@ -57,7 +57,7 @@ pub fn get_current_head_name(file: &Path) -> Result>>> { debug_assert!(!file.exists() || file.is_file()); debug_assert!(file.is_absolute()); let repo_dir = file.parent().context("file has no parent directory")?; - let repo = open_repo(repo_dir, None) + let repo = open_repo(repo_dir) .context("failed to open git repo")? .to_thread_local(); let head_ref = repo.head_ref()?; @@ -72,10 +72,10 @@ pub fn get_current_head_name(file: &Path) -> Result>>> { } pub fn for_each_changed_file(cwd: &Path, f: impl Fn(Result) -> bool) -> Result<()> { - status(&open_repo(cwd, None)?.to_thread_local(), f) + status(&open_repo(cwd)?.to_thread_local(), f) } -fn open_repo(path: &Path, ceiling_dir: Option<&Path>) -> Result { +fn open_repo(path: &Path) -> Result { // custom open options let mut git_open_opts_map = gix::sec::trust::Mapping::::default(); @@ -104,9 +104,6 @@ fn open_repo(path: &Path, ceiling_dir: Option<&Path>) -> Result