Commit | Line | Data |
---|---|---|
dae31c50 AH |
1 | #!/bin/sh |
2 | # | |
3 | # This commit-msg hook tries to guess whether the current commit addresses | |
4 | # an existing bug based on a number of keywords in the commit message and | |
3ea159d2 | 5 | # reminds the committer of backporting it. |
dae31c50 | 6 | |
3ea159d2 AL |
7 | grep -v '^#' "$1" | |
8 | grep -Eiq 'CVE|vulnerability|fix|panic|bug|Reported-by|Dragonfly-bug' | |
9 | if [ $? -eq 0 ]; then | |
dae31c50 | 10 | echo '' |
3ea159d2 AL |
11 | echo 'NOTE: This commit seems to fix an existing issue;' \ |
12 | 'please consider backporting it to the current stable release.' | |
dae31c50 AH |
13 | echo '' |
14 | fi | |
3ea159d2 AL |
15 | |
16 | exit 0 |