From 20ccb03a4545aa59f8fc0caafa1cbeda331a2f54 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 13 Jul 2024 14:47:37 +0200 Subject: [PATCH] Extend check for fixups Also check for squash! and amend! (these are all anchored to the beginning of the subject), and WIP and DROPME for good measure (but only if they occur in the first line, otherwise it wouldn't let me merge this very commit :) --- scripts/check_for_fixups.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check_for_fixups.sh b/scripts/check_for_fixups.sh index 12a07e3fd..31ed8640e 100755 --- a/scripts/check_for_fixups.sh +++ b/scripts/check_for_fixups.sh @@ -13,13 +13,13 @@ fi echo "Base commit: $base_commit" # Get commits with "fixup!" in the message from base_commit to HEAD -commits=$(git log -i -E --grep "fixup\!" --format="%h %s" "$base_commit..HEAD") +commits=$(git log -i -E --grep '^fixup!' --grep '^squash!' --grep '^amend!' --grep '^[^\n]*WIP' --grep '^[^\n]*DROPME' --format="%h %s" "$base_commit..HEAD") if [ -z "$commits" ]; then echo "No fixup commits found." exit 0 else - echo "Fixup commits found:" + echo "Fixup or WIP commits found:" echo "$commits" exit 1 fi