summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLibravatar Jean-Luc Herren <jlh@gmx.ch>2008-01-14 22:47:42 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-01-14 13:52:27 -0800
commitc60b528225d2827fd43d4fe4b082e0188df7a280 (patch)
tree333411a865b614104a562c23295e9363d4907170 /templates
parentcvsimport: remove last use of repo-config from git standard tools (diff)
downloadtgif-c60b528225d2827fd43d4fe4b082e0188df7a280.tar.xz
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>
Diffstat (limited to 'templates')
-rw-r--r--templates/hooks--pre-commit2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/hooks--pre-commit b/templates/hooks--pre-commit
index 7092bae263..b25dce6bbf 100644
--- a/templates/hooks--pre-commit
+++ b/templates/hooks--pre-commit
@@ -61,7 +61,7 @@ perl -e '
if (/^\s* \t/) {
bad_line("indent SP followed by a TAB", $_);
}
- if (/^(?:[<>=]){7}/) {
+ if (/^([<>])\1{6} |^={7}$/) {
bad_line("unresolved merge conflict", $_);
}
}