Skip to content

Commit

Permalink
simplify Build::update_existing_submodule
Browse files Browse the repository at this point in the history
`Build::update_existing_submodule` is already doing the same thing..

Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Sep 14, 2024
1 parent d0985bb commit d9e560c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,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);
}
}

Expand Down

0 comments on commit d9e560c

Please sign in to comment.