Skip to content

Commit 0c32d99

Browse files
fix: use more general language in repo-root finding
1 parent 289ecee commit 0c32d99

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

moz-webgpu-cts/src/main.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ fn run(cli: Cli) -> ExitCode {
139139
subcommand,
140140
} = cli;
141141

142-
let checkout = match checkout.map(Ok).unwrap_or_else(search_for_moz_central_ckt) {
142+
let checkout = match checkout.map(Ok).unwrap_or_else(search_for_repo_root) {
143143
Ok(ckt_path) => ckt_path,
144144
Err(AlreadyReportedToCommandline) => return ExitCode::FAILURE,
145145
};
@@ -1501,19 +1501,19 @@ fn read_files_at(
15011501
.chain(file_read_iter.into_iter().flatten())
15021502
}
15031503

1504-
/// Search for a `mozilla-central` checkout either via Mercurial or Git, iterating from the CWD to
1504+
/// Search for source code repository root either via Mercurial or Git, iterating from the CWD to
15051505
/// its parent directories.
15061506
///
15071507
/// This function reports to `log` automatically, so no meaningful [`Err`] value is returned.
1508-
fn search_for_moz_central_ckt() -> Result<PathBuf, AlreadyReportedToCommandline> {
1508+
fn search_for_repo_root() -> Result<PathBuf, AlreadyReportedToCommandline> {
15091509
use lets_find_up::{find_up_with, FindUpKind, FindUpOptions};
15101510

15111511
let find_up_opts = || FindUpOptions {
15121512
cwd: Path::new("."),
15131513
kind: FindUpKind::Dir,
15141514
};
15151515
let find_up = |repo_tech_name, root_dir_name| {
1516-
log::debug!("searching for {repo_tech_name} checkout of `mozilla-central`…");
1516+
log::debug!("searching for {repo_tech_name} repository root…");
15171517
let err = || {
15181518
miette!(
15191519
"failed to find a {} repository ({:?}) in {}",
@@ -1540,13 +1540,13 @@ fn search_for_moz_central_ckt() -> Result<PathBuf, AlreadyReportedToCommandline>
15401540
Err(e2) => {
15411541
log::warn!("{e:?}");
15421542
log::warn!("{e2:?}");
1543-
log::error!("failed to find a Gecko repository root");
1543+
log::error!("failed to automatically find a repository root");
15441544
Err(AlreadyReportedToCommandline)
15451545
}
15461546
})?;
15471547

15481548
log::info!(
1549-
"detected Gecko repository root at {}",
1549+
"detected repository root at {}",
15501550
gecko_source_root.display()
15511551
);
15521552

0 commit comments

Comments
 (0)