Fix #4135: if theres include = [...], then dont prepopulate filelist via git

This commit is contained in:
Felix S. Klock II 2017-06-16 17:54:44 +02:00
parent 1c5885240c
commit 6eaa964d3e

View file

@ -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)