Skip merge commits with hook

This commit is contained in:
Matt Bishop
2025-10-03 15:22:20 -04:00
parent 39fc6d292d
commit cdc22c72f6

View File

@@ -1,5 +1,10 @@
#!/bin/sh
# Skip hook if this is a merge commit
if [ -f .git/MERGE_HEAD ]; then
exit 0
fi
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
[ -z "$FILES" ] && exit 0