ticketfrei3/git-hooks/commit-msg

14 lines
311 B
Plaintext
Raw Normal View History

2020-07-05 21:46:55 +00:00
#!/bin/sh
#
# Copyright (C) 2020 by Thomas Lindner <tom@dl6tom.de>
#
# SPDX-License-Identifier: 0BSD
#
# client-side git-hook - checks commit message style
head -n 1 "$1" | egrep -x '\[[^]]+\] [[:upper:]].*[^.]' > /dev/null
if [ $? -ne 0 ]; then
echo "commit message doesn't match style" >&2
exit 1
fi