Skip to content

Commit 43c37f4

Browse files
committed
Check if there is anything to pull
1 parent 79fda33 commit 43c37f4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/rustc-pull.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: rustc-pull
1+
name: rustc-pullx
22

33
on:
44
workflow_dispatch:

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)