Template
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
This commit is contained in:
@@ -24,7 +24,7 @@ while IFS= read -r -d '' f; do
|
|||||||
esac
|
esac
|
||||||
[ -f "$REPO_ROOT/$f" ] || continue
|
[ -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
|
echo "FAIL conflict markers staged in $f" >&2; FAIL=1
|
||||||
fi
|
fi
|
||||||
case "$f" in
|
case "$f" in
|
||||||
|
|||||||
Reference in New Issue
Block a user