Skip to content

Commit 8375cf4

Browse files
committed
assure user and system configuration for .gitignore/exclude files is picked up
1 parent acef084 commit 8375cf4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/cargo/sources/path.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,7 @@ impl<'gctx> PathSource<'gctx> {
263263
/// Returns [`Some(gix::Repository)`](gix::Repository) if there is a sibling `Cargo.toml` and `.git`
264264
/// directory; otherwise, the caller should fall back on full file list.
265265
fn discover_gix_repo(&self, root: &Path) -> CargoResult<Option<gix::Repository>> {
266-
let mut mapping = gix::sec::trust::Mapping::default();
267-
mapping.full = gix::open::Options::isolated();
268-
mapping.reduced = gix::open::Options::isolated();
269-
let repo = match gix::ThreadSafeRepository::discover_opts(root, Default::default(), mapping)
270-
{
266+
let repo = match gix::ThreadSafeRepository::discover(root) {
271267
Ok(repo) => repo.to_thread_local(),
272268
Err(e) => {
273269
tracing::debug!(
@@ -597,7 +593,7 @@ impl<'gctx> PathSource<'gctx> {
597593
// This could be a submodule, or a sub-repository. In any case, we prefer to walk
598594
// it with git-support to leverage ignored files and to avoid pulling in entire
599595
// .git repositories.
600-
match gix::open_opts(&file_path, gix::open::Options::isolated()) {
596+
match gix::open(&file_path) {
601597
Ok(sub_repo) => {
602598
files.extend(self.list_files_gix(pkg, &sub_repo, filter)?);
603599
}

0 commit comments

Comments
 (0)