diff options
| author | bors <bors@rust-lang.org> | 2025-02-17 18:17:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-02-17 18:17:27 +0000 |
| commit | 4d91de4e48198da2e33413efdcd9cd2cc0c46688 (patch) | |
| tree | 42a5f1d2824e32a8a1804e03d7b68f274d875823 /src/build_helper | |
| parent | 461de7492e5354419cf27fe94b6aa235b4121927 (diff) | |
| parent | 86193fa8a04bcbdeee9917c2a2d1e2ea7054c0a6 (diff) | |
| download | rust-1.85.0.tar.gz rust-1.85.0.zip | |
Auto merge of #137181 - cuviper:stable-next, r=cuviper 1.85.0
Prepare Rust 1.85.0 stable release This includes a relnotes sync and a few last-minute backports: - change `literal_string_with_formatting_args` lint category to nursery #136982 - Update the reference for reverted `extended_varargs_abi_support` #136934 - fix musl's CVE-2025-26519 #137127 r? cuviper
Diffstat (limited to 'src/build_helper')
| -rw-r--r-- | src/build_helper/src/git.rs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/build_helper/src/git.rs b/src/build_helper/src/git.rs index 2aad5650fa8..1e28d552fe6 100644 --- a/src/build_helper/src/git.rs +++ b/src/build_helper/src/git.rs @@ -1,8 +1,6 @@ use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; -use crate::ci::CiEnv; - pub struct GitConfig<'a> { pub git_repository: &'a str, pub nightly_branch: &'a str, @@ -116,8 +114,8 @@ fn git_upstream_merge_base( /// Searches for the nearest merge commit in the repository that also exists upstream. /// -/// It looks for the most recent commit made by the merge bot by matching the author's email -/// address with the merge bot's email. +/// If it fails to find the upstream remote, it then looks for the most recent commit made +/// by the merge bot by matching the author's email address with the merge bot's email. pub fn get_closest_merge_commit( git_dir: Option<&Path>, config: &GitConfig<'_>, @@ -129,15 +127,7 @@ pub fn get_closest_merge_commit( git.current_dir(git_dir); } - let merge_base = { - if CiEnv::is_ci() { - git_upstream_merge_base(config, git_dir).unwrap() - } else { - // For non-CI environments, ignore rust-lang/rust upstream as it usually gets - // outdated very quickly. - "HEAD".to_string() - } - }; + let merge_base = git_upstream_merge_base(config, git_dir).unwrap_or_else(|_| "HEAD".into()); git.args([ "rev-list", |
