mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[task/git-tools] Ignore git commit message comments
Git commit message comments can be contained anywhere in the message and this change ignores where they appear. PHPBB3-9768
This commit is contained in:
parent
a9046e5608
commit
e17ffa01e6
1 changed files with 13 additions and 1 deletions
|
@ -87,6 +87,12 @@ do
|
|||
quit $err;
|
||||
fi
|
||||
|
||||
if [ "${expecting#comment}" = "$expecting" ]
|
||||
then
|
||||
# Prefix comments to the expected tokens list
|
||||
expecting="comment $expecting";
|
||||
fi
|
||||
|
||||
debug 2 "Expecting: $expecting";
|
||||
|
||||
# Loop over each of the expected line formats
|
||||
|
@ -121,6 +127,9 @@ do
|
|||
# Should not end up here
|
||||
false
|
||||
;;
|
||||
"comment")
|
||||
echo "$line" | grep -Eq "^#";
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognised token $expect" >&2;
|
||||
quit $err;
|
||||
|
@ -143,7 +152,7 @@ do
|
|||
if [ $result -eq 0 ]
|
||||
then
|
||||
# Have we switched out of description mode?
|
||||
if [ $in_description -eq 1 ] && [ "$expect" != "description" ] && [ "$expect" != "empty" ]
|
||||
if [ $in_description -eq 1 ] && [ "$expect" != "description" ] && [ "$expect" != "empty" ] && [ "$expect" != "comment" ]
|
||||
then
|
||||
# Yes, okay we need to backtrace one line and reanalyse
|
||||
in_description=0;
|
||||
|
@ -186,6 +195,9 @@ do
|
|||
tickets="$tickets $line";
|
||||
fi
|
||||
;;
|
||||
"comment")
|
||||
# Comments should expect the same thing again
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognised token $expect" >&2;
|
||||
quit 254;
|
||||
|
|
Loading…
Add table
Reference in a new issue