mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 09:21:57 -05: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
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue