Skip to content

Commit e3beb8b

Browse files
committed
adjust to changes in gix
1 parent 4c5280c commit e3beb8b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

gitoxide-core/src/repository/exclude.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::io;
22

3-
use anyhow::{bail, Context};
3+
use anyhow::bail;
44
use gix::prelude::FindExt;
55

66
use crate::OutputFormat;
@@ -31,11 +31,8 @@ pub fn query(
3131
bail!("JSON output isn't implemented yet");
3232
}
3333

34-
let worktree = repo
35-
.worktree()
36-
.with_context(|| "Cannot check excludes without a current worktree")?;
37-
let index = worktree.index()?;
38-
let mut cache = worktree.excludes(&index, Some(gix::ignore::Search::from_overrides(overrides)))?;
34+
let index = repo.index()?;
35+
let mut cache = repo.excludes(&index, Some(gix::ignore::Search::from_overrides(overrides)))?;
3936

4037
let prefix = repo.prefix().expect("worktree - we have an index by now")?;
4138

0 commit comments

Comments
 (0)