Skip to content

Commit 7e2a690

Browse files
committed
Print an explicit message if the base repo head commit is up-to-date
1 parent 5a11197 commit 7e2a690

File tree

1 file changed

+5
-0
lines changed
  • src/doc/rustc-dev-guide/josh-sync/src

1 file changed

+5
-0
lines changed

src/doc/rustc-dev-guide/josh-sync/src/sync.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ impl GitSync {
4545
let josh_url =
4646
format!("http://localhost:{JOSH_PORT}/{UPSTREAM_REPO}.git@{commit}{JOSH_FILTER}.git");
4747

48+
let previous_base_commit = sh.read_file("rust-version")?.trim().to_string();
49+
if previous_base_commit == commit {
50+
return Err(anyhow::anyhow!("No changes since last pull"));
51+
}
52+
4853
// Update rust-version file. As a separate commit, since making it part of
4954
// the merge has confused the heck out of josh in the past.
5055
// We pass `--no-verify` to avoid running git hooks.

0 commit comments

Comments
 (0)