From 8375cf40eec17c47daa5f3ce6276f3decf097c95 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 21 Mar 2024 07:05:46 +0100 Subject: [PATCH] assure user and system configuration for .gitignore/exclude files is picked up --- src/cargo/sources/path.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/cargo/sources/path.rs b/src/cargo/sources/path.rs index 1b3008ce9..de80dd7a6 100644 --- a/src/cargo/sources/path.rs +++ b/src/cargo/sources/path.rs @@ -263,11 +263,7 @@ impl<'gctx> PathSource<'gctx> { /// Returns [`Some(gix::Repository)`](gix::Repository) if there is a sibling `Cargo.toml` and `.git` /// directory; otherwise, the caller should fall back on full file list. fn discover_gix_repo(&self, root: &Path) -> CargoResult> { - let mut mapping = gix::sec::trust::Mapping::default(); - mapping.full = gix::open::Options::isolated(); - mapping.reduced = gix::open::Options::isolated(); - let repo = match gix::ThreadSafeRepository::discover_opts(root, Default::default(), mapping) - { + let repo = match gix::ThreadSafeRepository::discover(root) { Ok(repo) => repo.to_thread_local(), Err(e) => { tracing::debug!( @@ -597,7 +593,7 @@ impl<'gctx> PathSource<'gctx> { // This could be a submodule, or a sub-repository. In any case, we prefer to walk // it with git-support to leverage ignored files and to avoid pulling in entire // .git repositories. - match gix::open_opts(&file_path, gix::open::Options::isolated()) { + match gix::open(&file_path) { Ok(sub_repo) => { files.extend(self.list_files_gix(pkg, &sub_repo, filter)?); }