summaryrefslogtreecommitdiff
path: root/.git-hooks/commit-msg
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-02-13 13:39:48 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-02-13 13:42:34 +0100
commit2c1e951240c9fb6f16159d22396d344449587920 (patch)
treec8206dfa344c4f966dfff769ea34d773e7199c01 /.git-hooks/commit-msg
parent9d9e4b9f7de815984ca67e58bb8cea745c0b4568 (diff)
git-hooks: recognize multiple bug ids
Change-Id: I6ef51a8ec3215f331d2671074be17f68aa6cd1ce
Diffstat (limited to '.git-hooks/commit-msg')
-rwxr-xr-x.git-hooks/commit-msg11
1 files changed, 8 insertions, 3 deletions
diff --git a/.git-hooks/commit-msg b/.git-hooks/commit-msg
index 37ddd1cf87e6..fb08d10be330 100755
--- a/.git-hooks/commit-msg
+++ b/.git-hooks/commit-msg
@@ -47,9 +47,12 @@ fi
fdo_regex='fdo#[0-9]+'
if egrep -q "$fdo_regex" $1; then
- if [ "`head -n 1 $1 |egrep -o "$fdo_regex" |sed 's/fdo#//'`" -gt 88775 ]; then
- abort "$1" "The first line contains a suspicious fdo# rereference, did you mean tdf#?"
- fi
+ for bugid in `head -n 1 $1 |egrep -o "$fdo_regex" |sed 's/fdo#//'`
+ do
+ if [ "`echo $bugid |sed 's/fdo#//'`" -gt 88775 ]; then
+ abort "$1" "The first line contains a suspicious fdo# rereference: 'fdo#$bugid', did you mean tdf#?"
+ fi
+ done
fi
# ...and that it does not continue on the second line
@@ -186,3 +189,5 @@ add_ChangeId
exit 0
+
+# vi:set shiftwidth=4 expandtab: