Rollup merge of #130336 - onur-ozkan:simple-improvement, r=albertlarsan68

simplify `Build::update_existing_submodule`

`Build::update_existing_submodule` is already doing the same thing..
This commit is contained in:
Jubilee 2024-09-15 23:51:25 -07:00 committed by GitHub
commit 9025fe9e64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -552,11 +552,7 @@ impl Build {
// Look for `submodule.$name.path = $path`
// Sample output: `submodule.src/rust-installer.path src/tools/rust-installer`
let submodule = line.split_once(' ').unwrap().1;
let path = Path::new(submodule);
// Don't update the submodule unless it's already been cloned.
if GitInfo::new(false, path).is_managed_git_subrepository() {
self.config.update_submodule(submodule);
}
self.update_existing_submodule(submodule);
}
}