Skip to content

Commit f7bf72a

Browse files
authored
Unrolled build for rust-lang#140191
Rollup merge of rust-lang#140191 - Kobzol:remove-git-repository-from-git-config, r=jieyouxu Remove git repository from git config It is no longer needed after rust-lang#138591. We could even remove the `nightly_branch` field, but it still has one usage. r? ``@jieyouxu``
2 parents 3c877f6 + 91da45a commit f7bf72a

File tree

12 files changed

+0
-16
lines changed

12 files changed

+0
-16
lines changed

src/bootstrap/src/core/build_steps/suggest.rs

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ pub fn suggest(builder: &Builder<'_>, run: bool) {
1313
let git_config = builder.config.git_config();
1414
let suggestions = builder
1515
.tool_cmd(Tool::SuggestTests)
16-
.env("SUGGEST_TESTS_GIT_REPOSITORY", git_config.git_repository)
1716
.env("SUGGEST_TESTS_NIGHTLY_BRANCH", git_config.nightly_branch)
1817
.env("SUGGEST_TESTS_MERGE_COMMIT_EMAIL", git_config.git_merge_commit_email)
1918
.run_capture_stdout(builder)

src/bootstrap/src/core/build_steps/test.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2064,7 +2064,6 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
20642064
}
20652065

20662066
let git_config = builder.config.git_config();
2067-
cmd.arg("--git-repository").arg(git_config.git_repository);
20682067
cmd.arg("--nightly-branch").arg(git_config.nightly_branch);
20692068
cmd.arg("--git-merge-commit-email").arg(git_config.git_merge_commit_email);
20702069
cmd.force_coloring_in_ci();

src/bootstrap/src/core/config/config.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2963,7 +2963,6 @@ impl Config {
29632963

29642964
pub fn git_config(&self) -> GitConfig<'_> {
29652965
GitConfig {
2966-
git_repository: &self.stage0_metadata.config.git_repository,
29672966
nightly_branch: &self.stage0_metadata.config.nightly_branch,
29682967
git_merge_commit_email: &self.stage0_metadata.config.git_merge_commit_email,
29692968
}

src/bootstrap/src/utils/tests/git.rs

-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ impl GitCtx {
135135

136136
fn git_config(&self) -> GitConfig<'_> {
137137
GitConfig {
138-
git_repository: &self.git_repo,
139138
nightly_branch: &self.nightly_branch,
140139
git_merge_commit_email: &self.merge_bot_email,
141140
}

src/build_helper/src/git.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use crate::ci::CiEnv;
55

66
#[derive(Debug)]
77
pub struct GitConfig<'a> {
8-
pub git_repository: &'a str,
98
pub nightly_branch: &'a str,
109
pub git_merge_commit_email: &'a str,
1110
}

src/build_helper/src/stage0_parser.rs

-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ pub struct Stage0Config {
2020
pub artifacts_server: String,
2121
pub artifacts_with_llvm_assertions_server: String,
2222
pub git_merge_commit_email: String,
23-
pub git_repository: String,
2423
pub nightly_branch: String,
2524
}
2625

@@ -49,7 +48,6 @@ pub fn parse_stage0_file() -> Stage0 {
4948
stage0.config.artifacts_with_llvm_assertions_server = value.to_owned()
5049
}
5150
"git_merge_commit_email" => stage0.config.git_merge_commit_email = value.to_owned(),
52-
"git_repository" => stage0.config.git_repository = value.to_owned(),
5351
"nightly_branch" => stage0.config.nightly_branch = value.to_owned(),
5452

5553
"compiler_date" => stage0.compiler.date = value.to_owned(),

src/stage0

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ dist_server=https://static.rust-lang.org
22
artifacts_server=https://ci-artifacts.rust-lang.org/rustc-builds
33
artifacts_with_llvm_assertions_server=https://ci-artifacts.rust-lang.org/rustc-builds-alt
44
5-
git_repository=rust-lang/rust
65
nightly_branch=master
76

87
# The configuration above this comment is editable, and can be changed

src/tools/bump-stage0/src/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ impl Tool {
6161
artifacts_server,
6262
artifacts_with_llvm_assertions_server,
6363
git_merge_commit_email,
64-
git_repository,
6564
nightly_branch,
6665
} = &self.config;
6766

@@ -72,7 +71,6 @@ impl Tool {
7271
artifacts_with_llvm_assertions_server
7372
));
7473
file_content.push_str(&format!("git_merge_commit_email={}\n", git_merge_commit_email));
75-
file_content.push_str(&format!("git_repository={}\n", git_repository));
7674
file_content.push_str(&format!("nightly_branch={}\n", nightly_branch));
7775

7876
file_content.push_str("\n");

src/tools/compiletest/src/common.rs

-2
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ pub struct Config {
399399
pub nocapture: bool,
400400

401401
// Needed both to construct build_helper::git::GitConfig
402-
pub git_repository: String,
403402
pub nightly_branch: String,
404403
pub git_merge_commit_email: String,
405404

@@ -514,7 +513,6 @@ impl Config {
514513

515514
pub fn git_config(&self) -> GitConfig<'_> {
516515
GitConfig {
517-
git_repository: &self.git_repository,
518516
nightly_branch: &self.nightly_branch,
519517
git_merge_commit_email: &self.git_merge_commit_email,
520518
}

src/tools/compiletest/src/header/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ impl ConfigBuilder {
175175
self.host.as_deref().unwrap_or("x86_64-unknown-linux-gnu"),
176176
"--target",
177177
self.target.as_deref().unwrap_or("x86_64-unknown-linux-gnu"),
178-
"--git-repository=",
179178
"--nightly-branch=",
180179
"--git-merge-commit-email=",
181180
"--minicore-path=",

src/tools/compiletest/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ pub fn parse_config(args: Vec<String>) -> Config {
188188
"run tests which rely on commit version being compiled into the binaries",
189189
)
190190
.optopt("", "edition", "default Rust edition", "EDITION")
191-
.reqopt("", "git-repository", "name of the git repository", "ORG/REPO")
192191
.reqopt("", "nightly-branch", "name of the git branch for nightly", "BRANCH")
193192
.reqopt(
194193
"",
@@ -440,7 +439,6 @@ pub fn parse_config(args: Vec<String>) -> Config {
440439

441440
nocapture: matches.opt_present("no-capture"),
442441

443-
git_repository: matches.opt_str("git-repository").unwrap(),
444442
nightly_branch: matches.opt_str("nightly-branch").unwrap(),
445443
git_merge_commit_email: matches.opt_str("git-merge-commit-email").unwrap(),
446444

src/tools/suggest-tests/src/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use suggest_tests::get_suggestions;
66
fn main() -> ExitCode {
77
let modified_files = get_git_modified_files(
88
&GitConfig {
9-
git_repository: &env("SUGGEST_TESTS_GIT_REPOSITORY"),
109
nightly_branch: &env("SUGGEST_TESTS_NIGHTLY_BRANCH"),
1110
git_merge_commit_email: &env("SUGGEST_TESTS_MERGE_COMMIT_EMAIL"),
1211
},

0 commit comments

Comments
 (0)