History

adjust to changes in `gix`

Sebastian Thiel committed 3 years ago

Commit a09b63f1 parent bc284431 file · +3 −6Browse files

Unified · Split

gitoxide-core/src/repository/exclude.rs+3−6
@@ -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( · 24 unmodified lines
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