This repository was archived by the owner on May 28, 2025. It is now read-only.
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 {
24042404 . unwrap_or_else ( || SplitDebuginfo :: default_for_platform ( target) )
24052405 }
24062406
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 ( ) )
24092412 }
24102413
24112414 pub fn codegen_backends ( & self , target : TargetSelection ) -> & [ String ] {
Original file line number Diff line number Diff line change @@ -475,7 +475,7 @@ impl Build {
475475 ///
476476 /// `relative_path` should be relative to the root of the git repository, not an absolute path.
477477 pub ( crate ) fn update_submodule ( & self , relative_path : & Path ) {
478- if !self . config . submodules ( self . rust_info ( ) ) {
478+ if !self . config . submodules ( ) {
479479 return ;
480480 }
481481
@@ -585,7 +585,7 @@ impl Build {
585585 fn update_existing_submodules ( & self ) {
586586 // Avoid running git when there isn't a git checkout, or the user has
587587 // explicitly disabled submodules in `config.toml`.
588- if !self . config . submodules ( self . rust_info ( ) ) {
588+ if !self . config . submodules ( ) {
589589 return ;
590590 }
591591 let output = helpers:: git ( Some ( & self . src ) )
@@ -609,7 +609,7 @@ impl Build {
609609 /// Updates the given submodule only if it's initialized already; nothing happens otherwise.
610610 pub fn update_existing_submodule ( & self , submodule : & Path ) {
611611 // Avoid running git when there isn't a git checkout.
612- if !self . config . submodules ( self . rust_info ( ) ) {
612+ if !self . config . submodules ( ) {
613613 return ;
614614 }
615615
You can’t perform that action at this time.
0 commit comments