summaryrefslogtreecommitdiff
path: root/Meta/lint-commit.sh
diff options
context:
space:
mode:
authorKarol Kosek <krkk@krkk.ct8.pl>2021-07-27 22:12:33 +0200
committerLinus Groh <mail@linusgroh.de>2021-07-27 22:35:49 +0100
commit220dd28b02c45f663a71147c6ac18c91d4b02464 (patch)
treea11b66ac293217ac610d914c80937c240c4fa500 /Meta/lint-commit.sh
parent2f8eb4f068777e19cb059edd0d6aeedda18c0d2b (diff)
downloadserenity-220dd28b02c45f663a71147c6ac18c91d4b02464.zip
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.
Diffstat (limited to 'Meta/lint-commit.sh')
-rwxr-xr-xMeta/lint-commit.sh5
1 files changed, 5 insertions, 0 deletions
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