tool(autocommit): fix sometimes tries to commit when no change
shwarp
Thu, 20 Aug 2026 21:51:50 -0400
1 files changed,
5 insertions(+),
1 deletions(-)
jump to
M
tools/autocommit
→
tools/autocommit
@@ -26,7 +26,11 @@ # Keep duplicate updates out
sleep 1s git add "$FILE" - git commit -m "$COMMIT_MESSAGE" + + # Bail if nothing to commit + git diff --cached --quiet && continue + + git commit -qm "$COMMIT_MESSAGE" echo "[$(date -Is)] File changed: $DIRECTORY/$FILE" done