From 220dd28b02c45f663a71147c6ac18c91d4b02464 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Tue, 27 Jul 2021 22:12:33 +0200 Subject: Meta: Ignore everything after the git cut line in a lint-commit.sh hook I have set up a commit.verbose variable in my git config, which shows the patch diff on bottom of the commit message. Unfortunately the character limit was also applied to the diff, which meant that I got a false-positive lint error almost every time. --- Meta/lint-commit.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Meta/lint-commit.sh') diff --git a/Meta/lint-commit.sh b/Meta/lint-commit.sh index 083be28b8e..6242b67299 100755 --- a/Meta/lint-commit.sh +++ b/Meta/lint-commit.sh @@ -17,6 +17,11 @@ fi line_number=0 while read -r line; do + # break on git cut line, used by git commit --verbose + if [[ "$line" == "# ------------------------ >8 ------------------------" ]]; then + break + fi + # ignore comment lines [[ "$line" =~ ^#.* ]] && continue -- cgit v1.2.3