Skip to content

Commit 161c6c0

Browse files
committed
adapt to changes in gix-filter
1 parent 5aa73a7 commit 161c6c0

File tree

5 files changed

+10
-15
lines changed

5 files changed

+10
-15
lines changed

gix-archive/tests/archive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,6 @@ mod from_tree {
303303
}
304304

305305
fn noop_pipeline() -> gix_filter::Pipeline {
306-
gix_filter::Pipeline::new(&Default::default(), Default::default())
306+
gix_filter::Pipeline::new(Default::default())
307307
}
308308
}

gix-worktree-stream/tests/stream.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -260,17 +260,14 @@ mod from_tree {
260260
}
261261

262262
fn mutating_pipeline(driver: bool) -> gix_filter::Pipeline {
263-
gix_filter::Pipeline::new(
264-
&Default::default(),
265-
gix_filter::pipeline::Options {
266-
drivers: if driver { vec![driver_with_process()] } else { vec![] },
267-
eol_config: gix_filter::eol::Configuration {
268-
auto_crlf: gix_filter::eol::AutoCrlf::Enabled,
269-
..Default::default()
270-
},
263+
gix_filter::Pipeline::new(gix_filter::pipeline::Options {
264+
drivers: if driver { vec![driver_with_process()] } else { vec![] },
265+
eol_config: gix_filter::eol::Configuration {
266+
auto_crlf: gix_filter::eol::AutoCrlf::Enabled,
271267
..Default::default()
272268
},
273-
)
269+
..Default::default()
270+
})
274271
}
275272

276273
pub(crate) fn driver_with_process() -> gix_filter::Driver {

gix/src/config/cache/access.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,7 @@ impl Cache {
196196
)?;
197197
let capabilities = self.fs_capabilities()?;
198198
let filters = {
199-
let collection = Default::default();
200-
let mut filters = gix_filter::Pipeline::new(&collection, crate::filter::Pipeline::options(repo)?);
199+
let mut filters = gix_filter::Pipeline::new(crate::filter::Pipeline::options(repo)?);
201200
if let Ok(mut head) = repo.head() {
202201
let ctx = filters.driver_context_mut();
203202
ctx.ref_name = head.referent_name().map(|name| name.as_bstr().to_owned());

gix/src/filter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl<'repo> Pipeline<'repo> {
111111
/// Create a new instance by extracting all necessary information and configuration from a `repo` along with `cache` for accessing
112112
/// attributes. The `index` is used for some filters which may access it under very specific circumstances.
113113
pub fn new(repo: &'repo Repository, cache: gix_worktree::Stack) -> Result<Self, pipeline::options::Error> {
114-
let pipeline = gix_filter::Pipeline::new(cache.attributes_collection(), Self::options(repo)?);
114+
let pipeline = gix_filter::Pipeline::new(Self::options(repo)?);
115115
Ok(Pipeline {
116116
inner: pipeline,
117117
cache,

gix/src/repository/worktree.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ impl crate::Repository {
7979
let mut cache = self
8080
.attributes_only(&index, gix_worktree::stack::state::attributes::Source::IdMapping)?
8181
.detach();
82-
let pipeline =
83-
gix_filter::Pipeline::new(cache.attributes_collection(), crate::filter::Pipeline::options(self)?);
82+
let pipeline = gix_filter::Pipeline::new(crate::filter::Pipeline::options(self)?);
8483
let objects = self.objects.clone().into_arc().expect("TBD error handling");
8584
let stream = gix_worktree_stream::from_tree(
8685
id,

0 commit comments

Comments
 (0)