From: Felix S. Klock II Date: Fri, 16 Jun 2017 15:54:44 +0000 (+0200) Subject: Fix #4135: if theres `include = [...]`, then dont prepopulate filelist via git X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~8^2~31^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6eaa964d3ebf1f8d32737d1291ac1cd1749a51d5;p=cargo.git Fix #4135: if theres `include = [...]`, then dont prepopulate filelist via git --- diff --git a/src/cargo/sources/path.rs b/src/cargo/sources/path.rs index cb9c2dde0..7a21713f4 100644 --- a/src/cargo/sources/path.rs +++ b/src/cargo/sources/path.rs @@ -114,8 +114,11 @@ impl<'cfg> PathSource<'cfg> { } }; - if let Some(result) = self.discover_git_and_list_files(pkg, root, &mut filter) { - return result; + // attempt git-prepopulate only if no `include` (rust-lang/cargo#4135) + if include.is_empty() { + if let Some(result) = self.discover_git_and_list_files(pkg, root, &mut filter) { + return result; + } } self.list_files_walk(pkg, &mut filter)