Skip to content

Commit 615d34a

Browse files
poliorceticsthe-mikedavis
authored andcommitted
nit: remove unused ceiling_dir param
1 parent f1461b4 commit 615d34a

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

helix-vcs/src/git.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub fn get_diff_base(file: &Path) -> Result<Vec<u8>> {
2929
// TODO cache repository lookup
3030

3131
let repo_dir = file.parent().context("file has no parent directory")?;
32-
let repo = open_repo(repo_dir, None)
32+
let repo = open_repo(repo_dir)
3333
.context("failed to open git repo")?
3434
.to_thread_local();
3535
let head = repo.head_commit()?;
@@ -57,7 +57,7 @@ pub fn get_current_head_name(file: &Path) -> Result<Arc<ArcSwap<Box<str>>>> {
5757
debug_assert!(!file.exists() || file.is_file());
5858
debug_assert!(file.is_absolute());
5959
let repo_dir = file.parent().context("file has no parent directory")?;
60-
let repo = open_repo(repo_dir, None)
60+
let repo = open_repo(repo_dir)
6161
.context("failed to open git repo")?
6262
.to_thread_local();
6363
let head_ref = repo.head_ref()?;
@@ -72,10 +72,10 @@ pub fn get_current_head_name(file: &Path) -> Result<Arc<ArcSwap<Box<str>>>> {
7272
}
7373

7474
pub fn for_each_changed_file(cwd: &Path, f: impl Fn(Result<FileChange>) -> bool) -> Result<()> {
75-
status(&open_repo(cwd, None)?.to_thread_local(), f)
75+
status(&open_repo(cwd)?.to_thread_local(), f)
7676
}
7777

78-
fn open_repo(path: &Path, ceiling_dir: Option<&Path>) -> Result<ThreadSafeRepository> {
78+
fn open_repo(path: &Path) -> Result<ThreadSafeRepository> {
7979
// custom open options
8080
let mut git_open_opts_map = gix::sec::trust::Mapping::<gix::open::Options>::default();
8181

@@ -104,9 +104,6 @@ fn open_repo(path: &Path, ceiling_dir: Option<&Path>) -> Result<ThreadSafeReposi
104104
});
105105

106106
let open_options = gix::discover::upwards::Options {
107-
ceiling_dirs: ceiling_dir
108-
.map(|dir| vec![dir.to_owned()])
109-
.unwrap_or_default(),
110107
dot_git_only: true,
111108
..Default::default()
112109
};

0 commit comments

Comments
 (0)