[Libreoffice-commits] core.git: .git-hooks/commit-msg

Miklos Vajna vmiklos at collabora.co.uk
Fri Feb 13 04:43:13 PST 2015


 .git-hooks/commit-msg |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 2c1e951240c9fb6f16159d22396d344449587920
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Feb 13 13:39:48 2015 +0100

    git-hooks: recognize multiple bug ids
    
    Change-Id: I6ef51a8ec3215f331d2671074be17f68aa6cd1ce

diff --git a/.git-hooks/commit-msg b/.git-hooks/commit-msg
index 37ddd1c..fb08d10 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:


More information about the Libreoffice-commits mailing list