Skip to content

Commit 34318fa

Browse files
committed
use latest utilities from gix-worktree
1 parent f159775 commit 34318fa

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

gix-worktree-state/src/checkout/function.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,23 @@ where
5454
let num_files = files.counter();
5555
let num_bytes = bytes.counter();
5656
let dir = dir.into();
57-
let case = if options.fs.ignore_case {
58-
gix_glob::pattern::Case::Fold
59-
} else {
60-
gix_glob::pattern::Case::Sensitive
61-
};
6257
let (chunk_size, thread_limit, num_threads) = gix_features::parallel::optimize_chunk_size_and_thread_limit(
6358
100,
6459
index.entries().len().into(),
6560
options.thread_limit,
6661
None,
6762
);
6863

69-
let state = stack::State::for_checkout(options.overwrite_existing, std::mem::take(&mut options.attributes));
70-
let attribute_files = state.id_mappings_from_index(index, paths, case);
7164
let mut ctx = chunk::Context {
7265
buf: Vec::new(),
7366
options: (&options).into(),
74-
path_cache: Stack::new(dir, state, case, Vec::with_capacity(512), attribute_files),
67+
path_cache: Stack::from_state_and_ignore_case(
68+
dir,
69+
options.fs.ignore_case,
70+
stack::State::for_checkout(options.overwrite_existing, std::mem::take(&mut options.attributes)),
71+
index,
72+
paths,
73+
),
7574
filters: options.filters,
7675
find,
7776
};

0 commit comments

Comments
 (0)