diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-03-24 09:16:52 +0100 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-04-20 09:35:42 +0200 |
| commit | 3a1dd440de00eb26de3f6fe4d0005def24586dc4 (patch) | |
| tree | 86ff712995ca81167608f8cc2659b47adf1c6087 /src/bootstrap | |
| parent | c32c076f346cdc8a4adbd72ac55b64a636b08b45 (diff) | |
| download | rust-3a1dd440de00eb26de3f6fe4d0005def24586dc4.tar.gz rust-3a1dd440de00eb26de3f6fe4d0005def24586dc4.zip | |
Make `git_dir` required in several git functions
It was always called with `Some`, so no need to complicate it with `Option`.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/config/config.rs | 9 | ||||
| -rw-r--r-- | src/bootstrap/src/utils/tests/git.rs | 3 |
2 files changed, 3 insertions, 9 deletions
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index ddafddaae1c..419976c83b1 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -3316,13 +3316,8 @@ impl Config { .unwrap() .entry(paths.to_vec()) .or_insert_with(|| { - check_path_modifications( - Some(&self.src), - &self.git_config(), - paths, - CiEnv::current(), - ) - .unwrap() + check_path_modifications(&self.src, &self.git_config(), paths, CiEnv::current()) + .unwrap() }) .clone() } diff --git a/src/bootstrap/src/utils/tests/git.rs b/src/bootstrap/src/utils/tests/git.rs index f14af5f17fd..735dafb3f29 100644 --- a/src/bootstrap/src/utils/tests/git.rs +++ b/src/bootstrap/src/utils/tests/git.rs @@ -36,8 +36,7 @@ impl GitCtx { } pub fn check_modifications(&self, target_paths: &[&str], ci_env: CiEnv) -> PathFreshness { - check_path_modifications(Some(self.dir.path()), &self.git_config(), target_paths, ci_env) - .unwrap() + check_path_modifications(self.dir.path(), &self.git_config(), target_paths, ci_env).unwrap() } pub fn create_upstream_merge(&self, modified_files: &[&str]) -> String { |
