Remove argument from the submodules method
The argument was not necessary, since it was only ever passed one value that exists in the config itself.
This commit is contained in:
parent
2c6222b3f2
commit
922fdd8462
2 changed files with 8 additions and 5 deletions
|
|
@ -2404,8 +2404,11 @@ impl Config {
|
|||
.unwrap_or_else(|| SplitDebuginfo::default_for_platform(target))
|
||||
}
|
||||
|
||||
pub fn submodules(&self, rust_info: &GitInfo) -> bool {
|
||||
self.submodules.unwrap_or(rust_info.is_managed_git_subrepository())
|
||||
/// Returns whether or not submodules should be managed by bootstrap.
|
||||
pub fn submodules(&self) -> bool {
|
||||
// If not specified in config, the default is to only manage
|
||||
// submodules if we're currently inside a git repository.
|
||||
self.submodules.unwrap_or(self.rust_info.is_managed_git_subrepository())
|
||||
}
|
||||
|
||||
pub fn codegen_backends(&self, target: TargetSelection) -> &[String] {
|
||||
|
|
|
|||
|
|
@ -475,7 +475,7 @@ impl Build {
|
|||
///
|
||||
/// `relative_path` should be relative to the root of the git repository, not an absolute path.
|
||||
pub(crate) fn update_submodule(&self, relative_path: &Path) {
|
||||
if !self.config.submodules(self.rust_info()) {
|
||||
if !self.config.submodules() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -585,7 +585,7 @@ impl Build {
|
|||
fn update_existing_submodules(&self) {
|
||||
// Avoid running git when there isn't a git checkout, or the user has
|
||||
// explicitly disabled submodules in `config.toml`.
|
||||
if !self.config.submodules(self.rust_info()) {
|
||||
if !self.config.submodules() {
|
||||
return;
|
||||
}
|
||||
let output = helpers::git(Some(&self.src))
|
||||
|
|
@ -609,7 +609,7 @@ impl Build {
|
|||
/// Updates the given submodule only if it's initialized already; nothing happens otherwise.
|
||||
pub fn update_existing_submodule(&self, submodule: &Path) {
|
||||
// Avoid running git when there isn't a git checkout.
|
||||
if !self.config.submodules(self.rust_info()) {
|
||||
if !self.config.submodules() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue