From cdc22c72f63256f85b617e1dc2b62dc7fce9ba7a Mon Sep 17 00:00:00 2001 From: Matt Bishop Date: Fri, 3 Oct 2025 15:22:20 -0400 Subject: [PATCH] Skip merge commits with hook --- .git-hooks/pre-commit | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit index 51a0cb41b1..13ff873c63 100755 --- a/.git-hooks/pre-commit +++ b/.git-hooks/pre-commit @@ -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