From 779cfa646ecdf043fe5f71c9d00ac61beb3c6c2b Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Wed, 13 Jul 2022 16:41:22 -0400
Subject: [PATCH] If nothing has changed, don't proceed.

---
 ci-tools/update-nixpkgs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ci-tools/update-nixpkgs b/ci-tools/update-nixpkgs
index 23eb7520..74badcd8 100755
--- a/ci-tools/update-nixpkgs
+++ b/ci-tools/update-nixpkgs
@@ -42,7 +42,10 @@ git checkout "${TARGET_BRANCH}" || git checkout -b "${TARGET_BRANCH}"
 nix-shell ./shell.nix --run update-nixpkgs
 
 # Show us what we did
-git diff
+if ! git diff --exit-code; then
+    echo "No changes."
+    exit 0
+fi
 
 # nix-build -A morph -o result-after
 # diff=$(nix --extra-experimental-features nix-command store diff-closures ./result-before/ ./result-after/)
-- 
GitLab