| 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 |
| 5 | # reminds the committer of MFC'ing it. |
| 6 | |
| 7 | lines=`grep -Ei 'CVE|vulnerability|fix|panic|bug|Reported-by|Dragonfly-bug' "$1" | grep -v '^#'` |
| 8 | |
| 9 | if [ "$lines" != "" ]; then |
| 10 | echo '' |
| 11 | echo -n 'NOTE: ' |
| 12 | echo >&2 This commit seems to fix an existing issue, please \ |
| 13 | consider MFC\'ing it to the current stable release. |
| 14 | echo '' |
| 15 | fi |