File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -2404,8 +2404,11 @@ impl Config {
2404
2404
.unwrap_or_else(|| SplitDebuginfo::default_for_platform(target))
2405
2405
}
2406
2406
2407
- pub fn submodules(&self, rust_info: &GitInfo) -> bool {
2408
- self.submodules.unwrap_or(rust_info.is_managed_git_subrepository())
2407
+ /// Returns whether or not submodules should be managed by bootstrap.
2408
+ pub fn submodules(&self) -> bool {
2409
+ // If not specified in config, the default is to only manage
2410
+ // submodules if we're currently inside a git repository.
2411
+ self.submodules.unwrap_or(self.rust_info.is_managed_git_subrepository())
2409
2412
}
2410
2413
2411
2414
pub fn codegen_backends(&self, target: TargetSelection) -> &[String] {
Original file line number Diff line number Diff line change @@ -475,7 +475,7 @@ impl Build {
475
475
///
476
476
/// `relative_path` should be relative to the root of the git repository, not an absolute path.
477
477
pub(crate) fn update_submodule(&self, relative_path: &Path) {
478
- if !self.config.submodules(self.rust_info() ) {
478
+ if !self.config.submodules() {
479
479
return;
480
480
}
481
481
@@ -585,7 +585,7 @@ impl Build {
585
585
fn update_existing_submodules(&self) {
586
586
// Avoid running git when there isn't a git checkout, or the user has
587
587
// explicitly disabled submodules in `config.toml`.
588
- if !self.config.submodules(self.rust_info() ) {
588
+ if !self.config.submodules() {
589
589
return;
590
590
}
591
591
let output = helpers::git(Some(&self.src))
@@ -609,7 +609,7 @@ impl Build {
609
609
/// Updates the given submodule only if it's initialized already; nothing happens otherwise.
610
610
pub fn update_existing_submodule(&self, submodule: &Path) {
611
611
// Avoid running git when there isn't a git checkout.
612
- if !self.config.submodules(self.rust_info() ) {
612
+ if !self.config.submodules() {
613
613
return;
614
614
}
615
615
You can’t perform that action at this time.
0 commit comments