aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorGiuseppe Di Natale <[email protected]>2017-10-26 10:23:58 -0700
committerBrian Behlendorf <[email protected]>2017-10-26 10:23:58 -0700
commit69b229bd60135838d606f5da41831d409d11de2d (patch)
tree795aebc17638052d6bb85818b2cd3f5b9190ca25 /scripts
parent8dcaf243d77b21c49092a4ffd3a641ac3407217c (diff)
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 <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Chris Dunlop <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #6780
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/commitcheck.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/commitcheck.sh b/scripts/commitcheck.sh
index 1f78dc8a8..927f5e737 100755
--- a/scripts/commitcheck.sh
+++ b/scripts/commitcheck.sh
@@ -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