1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-18 06:38:43 +01:00

[ticket/9824] Accept commit messages with less than perfect headings.

Some commit messages exist only temporarily, because they are given
on commits that are intended to be squashed. Accept such commit
messages with a warning.

PHPBB3-9824
This commit is contained in:
Oleg Pudeyev 2011-03-01 20:56:57 -05:00
parent d7a38fd7ef
commit e552287128

View File

@ -118,7 +118,19 @@ do
case $expect in
"header")
err=$ERR_HEADER;
echo "$line" | grep -Eq "^\[(ticket/[0-9]+|feature/$branch_regex|task/$branch_regex)\] [A-Z].+$"
echo "$line" | grep -Eq "^\[(ticket/[0-9]+|feature/$branch_regex|task/$branch_regex)\] .+$"
result=$?
if ! echo "$line" | grep -Eq "^\[(ticket/[0-9]+|feature/$branch_regex|task/$branch_regex)\] [A-Z].+$"
then
# Don't be too strict.
# Commits may be temporary, intended to be squashed later.
# Just issue a warning here.
echo "Warning: heading should be a sentence beginning with a capital letter." 1>&2
echo "You entered:" 1>&2
echo "$line" 1>&2
fi
# restore exit code
(exit $result)
;;
"empty")
err=$ERR_EMPTY;