From 204453c39689e8ee0ac170fb4cc1d6c84879d2e7 Mon Sep 17 00:00:00 2001 From: Tom Stoffer Date: Sun, 15 Mar 2026 08:21:21 +1300 Subject: [PATCH] Enhance hourly-git-sync script to skip empty commits when no changes are detected. This optimization prevents unnecessary commits and improves efficiency in the sync process. --- lib/setup/hourly-git-sync.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/setup/hourly-git-sync.sh b/lib/setup/hourly-git-sync.sh index 798c671..ba27545 100644 --- a/lib/setup/hourly-git-sync.sh +++ b/lib/setup/hourly-git-sync.sh @@ -81,6 +81,11 @@ NODE maybe_restore_if_runtime_only "cron/jobs.json" maybe_restore_if_runtime_only "crons.json" +# Skip alphaclaw git-sync if there are no changes; avoid empty commits. +if git diff --quiet && git diff --cached --quiet 2>/dev/null; then + exit 0 +fi + resolve_alphaclaw_cmd() { if command -v alphaclaw >/dev/null 2>&1; then command -v alphaclaw