mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00
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.
This commit is contained in:
parent
2f8eb4f068
commit
220dd28b02
1 changed files with 5 additions and 0 deletions
|
@ -17,6 +17,11 @@ fi
|
||||||
|
|
||||||
line_number=0
|
line_number=0
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
|
# break on git cut line, used by git commit --verbose
|
||||||
|
if [[ "$line" == "# ------------------------ >8 ------------------------" ]]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
# ignore comment lines
|
# ignore comment lines
|
||||||
[[ "$line" =~ ^#.* ]] && continue
|
[[ "$line" =~ ^#.* ]] && continue
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue