Skip to content

Commit

Permalink
rename github_repository to git_repository
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Nov 6, 2023
1 parent 4a08735 commit 580fa0c
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/suggest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub fn suggest(builder: &Builder<'_>, run: bool) {
let git_config = builder.config.git_config();
let suggestions = builder
.tool_cmd(Tool::SuggestTests)
.env("SUGGEST_TESTS_GITHUB_REPOSITORY", git_config.github_repository)
.env("SUGGEST_TESTS_GIT_REPOSITORY", git_config.git_repository)
.env("SUGGEST_TESTS_NIGHTLY_BRANCH", git_config.nightly_branch)
.output()
.expect("failed to run `suggest-tests` tool");
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1874,7 +1874,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
}

let git_config = builder.config.git_config();
cmd.arg("--github-repository").arg(git_config.github_repository);
cmd.arg("--git-repository").arg(git_config.git_repository);
cmd.arg("--nightly-branch").arg(git_config.nightly_branch);

builder.ci_env.force_coloring_in_ci(&mut cmd);
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ pub struct Stage0Config {
pub artifacts_server: String,
pub artifacts_with_llvm_assertions_server: String,
pub git_merge_commit_email: String,
pub github_repository: String,
pub git_repository: String,
pub nightly_branch: String,
}
#[derive(Default, Deserialize, Clone)]
Expand Down Expand Up @@ -2009,7 +2009,7 @@ impl Config {

pub fn git_config(&self) -> GitConfig<'_> {
GitConfig {
github_repository: &self.stage0_metadata.config.github_repository,
git_repository: &self.stage0_metadata.config.git_repository,
nightly_branch: &self.stage0_metadata.config.nightly_branch,
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/stage0.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"artifacts_server": "https://ci-artifacts.rust-lang.org/rustc-builds",
"artifacts_with_llvm_assertions_server": "https://ci-artifacts.rust-lang.org/rustc-builds-alt",
"git_merge_commit_email": "[email protected]",
"github_repository": "rust-lang/rust",
"git_repository": "rust-lang/rust",
"nightly_branch": "master"
},
"__comments": [
Expand Down
6 changes: 3 additions & 3 deletions src/tools/build_helper/src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::process::Stdio;
use std::{path::Path, process::Command};

pub struct GitConfig<'a> {
pub github_repository: &'a str,
pub git_repository: &'a str,
pub nightly_branch: &'a str,
}

Expand Down Expand Up @@ -45,8 +45,8 @@ pub fn get_rust_lang_rust_remote(

let rust_lang_remote = stdout
.lines()
.find(|remote| remote.contains(config.github_repository))
.ok_or_else(|| format!("{} remote not found", config.github_repository))?;
.find(|remote| remote.contains(config.git_repository))
.ok_or_else(|| format!("{} remote not found", config.git_repository))?;

let remote_name =
rust_lang_remote.split('.').nth(1).ok_or_else(|| "remote name not found".to_owned())?;
Expand Down
4 changes: 2 additions & 2 deletions src/tools/compiletest/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ pub struct Config {
pub nocapture: bool,

// Needed both to construct build_helper::git::GitConfig
pub github_repository: String,
pub git_repository: String,
pub nightly_branch: String,
}

Expand Down Expand Up @@ -449,7 +449,7 @@ impl Config {

pub fn git_config(&self) -> GitConfig<'_> {
GitConfig {
github_repository: &self.github_repository,
git_repository: &self.git_repository,
nightly_branch: &self.nightly_branch,
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/header/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl ConfigBuilder {
self.host.as_deref().unwrap_or("x86_64-unknown-linux-gnu"),
"--target",
self.target.as_deref().unwrap_or("x86_64-unknown-linux-gnu"),
"--github-repository=",
"--git-repository=",
"--nightly-branch=",
];
let mut args: Vec<String> = args.iter().map(ToString::to_string).collect();
Expand Down
4 changes: 2 additions & 2 deletions src/tools/compiletest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
.reqopt("", "channel", "current Rust channel", "CHANNEL")
.optflag("", "git-hash", "run tests which rely on commit version being compiled into the binaries")
.optopt("", "edition", "default Rust edition", "EDITION")
.reqopt("", "github-repository", "name of the GitHub repository", "ORG/REPO")
.reqopt("", "git-repository", "name of the git repository", "ORG/REPO")
.reqopt("", "nightly-branch", "name of the git branch for nightly", "BRANCH");

let (argv0, args_) = args.split_first().unwrap();
Expand Down Expand Up @@ -310,7 +310,7 @@ pub fn parse_config(args: Vec<String>) -> Config {

nocapture: matches.opt_present("nocapture"),

github_repository: matches.opt_str("github-repository").unwrap(),
git_repository: matches.opt_str("git-repository").unwrap(),
nightly_branch: matches.opt_str("nightly-branch").unwrap(),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/suggest-tests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use suggest_tests::get_suggestions;
fn main() -> ExitCode {
let modified_files = get_git_modified_files(
&GitConfig {
github_repository: &env("SUGGEST_TESTS_GITHUB_REPOSITORY"),
git_repository: &env("SUGGEST_TESTS_GIT_REPOSITORY"),
nightly_branch: &env("SUGGEST_TESTS_NIGHTLY_BRANCH"),
},
None,
Expand Down

0 comments on commit 580fa0c

Please sign in to comment.