commitcheck: Multiple OpenZFS ports in commit

Allow commitcheck.sh to handle multiple OpenZFS ports in
a single commit. This is useful in the cases when a change
upstream has bug fixes and it makes sense to port them with
the original patch.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Chris Dunlop <chris@onthe.net.au>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes #6780
This commit is contained in:
Giuseppe Di Natale
2017-10-26 10:23:58 -07:00
committed by Brian Behlendorf
parent 8dcaf243d7
commit 69b229bd60
2 changed files with 51 additions and 15 deletions
+9 -4
View File
@@ -51,9 +51,14 @@ function check_tagged_line_with_url()
return 1
fi
if ! test_url "$foundline"; then
return 1
fi
OLDIFS=$IFS
IFS=$'\n'
for url in $(echo -e "$foundline"); do
if ! test_url "$url"; then
return 1
fi
done
IFS=$OLDIFS
return 0
}
@@ -99,7 +104,7 @@ function openzfs_port_commit()
error=0
# subject starts with OpenZFS dddd
subject=$(git log -n 1 --pretty=%s "$REF" | egrep -m 1 '^OpenZFS [[:digit:]]+ - ')
subject=$(git log -n 1 --pretty=%s "$REF" | egrep -m 1 '^OpenZFS [[:digit:]]+(, [[:digit:]]+)* - ')
if [ -z "$subject" ]; then
echo "error: OpenZFS patch ports must have a subject line that starts with \"OpenZFS dddd - \""
error=1