From 615d34a237d0d01d80c2204155ae8302d348815a Mon Sep 17 00:00:00 2001 From: "Alexis (Poliorcetics) Bourget" Date: Sat, 27 Apr 2024 14:41:20 +0200 Subject: [PATCH] nit: remove unused `ceiling_dir` param --- helix-vcs/src/git.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/helix-vcs/src/git.rs b/helix-vcs/src/git.rs index 080f9b633..979f8726e 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