X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=templates%2Fhooks--pre-commit;h=b25dce6bbfa5e52108459b9a89b16def6963aec0;hb=fae09a8084c9b51632726523b477a78dd28d7d7e;hp=a19279b3e41653b519b8c3b266bc7845f3648c4b;hpb=2515f935b9c1a0afa1b555f173a37d6ad7878fff;p=git.git diff --git a/templates/hooks--pre-commit b/templates/hooks--pre-commit index a19279b3e..b25dce6bb 100644 --- a/templates/hooks--pre-commit +++ b/templates/hooks--pre-commit @@ -13,7 +13,7 @@ if git-rev-parse --verify HEAD 2>/dev/null then - git-diff-index -p -M --cached HEAD + git-diff-index -p -M --cached HEAD -- else # NEEDSWORK: we should produce a diff with an empty tree here # if we want to do the same verification for the initial import. @@ -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", $_); } }