@matheusbsbs / matheus-bagliano / commits / c60b528225
Fork 0

Make default pre-commit hook less noisy

This hook thought to have found a conflict marker any time it saw a 7-character combination of any of the characters '<>=' at the beginning of a line, whereas it should only look for the *same* character to appear repeatedly. Also, restrict it to match exactly 7 times, to avoid matching the underlining with '='-characters often used in documentation. Signed-off-by: Jean-Luc Herren <jlh@gmx.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jean-Luc Herren committed Jan 14, 2008 at 22:47 UTC c60b528225d2827fd43d4fe4b082e0188df7a280
1 file changed +1 -1
templates/hooks--pre-commit
+1 -1
@@ -61,7 +61,7 @@ perl -e '
61 if (/^\s* \t/) {
62 bad_line("indent SP followed by a TAB", $_);
63 }
64 - if (/^(?:[<>=]){7}/) {
64 + if (/^([<>])\1{6} |^={7}$/) {
65 bad_line("unresolved merge conflict", $_);
66 }
67 }