Unified · Split
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | use std::io; |
| 2 | 2 | |
| 3 | −use anyhow::{bail, Context}; | |
| 3 | +use anyhow::bail; | |
| 4 | 4 | use gix::prelude::FindExt; |
| 5 | 5 | |
| 6 | 6 | use crate::OutputFormat; |
| @@ -31,11 +31,8 @@ pub fn query( · 24 unmodified lines | ||
| 31 | 31 | bail!("JSON output isn't implemented yet"); |
| 32 | 32 | } |
| 33 | 33 | |
| 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)))?; | |
| 39 | 36 | |
| 40 | 37 | let prefix = repo.prefix().expect("worktree - we have an index by now")?; |
| 41 | 38 | |