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;
|
quit $err;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${expecting#comment}" = "$expecting" ]
|
||||||
|
then
|
||||||
|
# Prefix comments to the expected tokens list
|
||||||
|
expecting="comment $expecting";
|
||||||
|
fi
|
||||||
|
|
||||||
debug 2 "Expecting: $expecting";
|
debug 2 "Expecting: $expecting";
|
||||||
|
|
||||||
# Loop over each of the expected line formats
|
# Loop over each of the expected line formats
|
||||||
|
@ -121,6 +127,9 @@ do
|
||||||
# Should not end up here
|
# Should not end up here
|
||||||
false
|
false
|
||||||
;;
|
;;
|
||||||
|
"comment")
|
||||||
|
echo "$line" | grep -Eq "^#";
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unrecognised token $expect" >&2;
|
echo "Unrecognised token $expect" >&2;
|
||||||
quit $err;
|
quit $err;
|
||||||
|
@ -143,7 +152,7 @@ do
|
||||||
if [ $result -eq 0 ]
|
if [ $result -eq 0 ]
|
||||||
then
|
then
|
||||||
# Have we switched out of description mode?
|
# 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
|
then
|
||||||
# Yes, okay we need to backtrace one line and reanalyse
|
# Yes, okay we need to backtrace one line and reanalyse
|
||||||
in_description=0;
|
in_description=0;
|
||||||
|
@ -186,6 +195,9 @@ do
|
||||||
tickets="$tickets $line";
|
tickets="$tickets $line";
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
"comment")
|
||||||
|
# Comments should expect the same thing again
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unrecognised token $expect" >&2;
|
echo "Unrecognised token $expect" >&2;
|
||||||
quit 254;
|
quit 254;
|
||||||
|
|
Loading…
Add table
Reference in a new issue