From 7e377455389a54f15bb07312d83074a82f568692 Mon Sep 17 00:00:00 2001 From: reachableceo Date: Thu, 3 Sep 2026 21:30:12 -0500 Subject: [PATCH] fix(hooks): repair conflict-marker check mangled by sed '&' expansion [#769] Restores the intended tightened pattern: exact git markers only (7-char = alone; <<<<<<< / >>>>>>> with optional ref). Decorative ==== banners no longer false-positive; check is fully functional again. https://projects.knownelement.com/issues/769#note-4152 --- hooks/global/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/global/pre-commit b/hooks/global/pre-commit index 15bbb0a..3d888d4 100755 --- a/hooks/global/pre-commit +++ b/hooks/global/pre-commit @@ -24,7 +24,7 @@ while IFS= read -r -d '' f; do esac [ -f "$REPO_ROOT/$f" ] || continue - if grep -nE '^(<{7}( \S+)?|=======|>{7}( \S+)?)$' "$REPO_ROOT/$f" >/dev/null 2> if grep -nE '^(<<<<<<<|=======|>>>>>>>)' "$REPO_ROOT/$f" >/dev/null 2>&1; then1; then + if grep -nE '^(<{7}( \S+)?|=======|>{7}( \S+)?)$' "$REPO_ROOT/$f" >/dev/null 2>&1; then echo "FAIL conflict markers staged in $f" >&2; FAIL=1 fi case "$f" in