From c92957d38a6486dbcb7ac0668e4b24b02f94ccbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Wed, 8 Jan 2025 15:26:14 +0100 Subject: [PATCH] Print an explicit message if the base repo head commit is up-to-date --- josh-sync/src/sync.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/josh-sync/src/sync.rs b/josh-sync/src/sync.rs index da21a4c9..1c1757a4 100644 --- a/josh-sync/src/sync.rs +++ b/josh-sync/src/sync.rs @@ -45,6 +45,11 @@ impl GitSync { let josh_url = format!("http://localhost:{JOSH_PORT}/{UPSTREAM_REPO}.git@{commit}{JOSH_FILTER}.git"); + let previous_base_commit = sh.read_file("rust-version")?.trim().to_string(); + if previous_base_commit == commit { + return Err(anyhow::anyhow!("No changes since last pull")); + } + // Update rust-version file. As a separate commit, since making it part of // the merge has confused the heck out of josh in the past. // We pass `--no-verify` to avoid running git hooks.