Kaydet (Commit) 8c5e8785 authored tarafından Miklos Vajna's avatar Miklos Vajna

git hooks: reject suspicious fdo references

Change-Id: If2302adb662bd2b0d32bacdf9cdc3c0278b86de8
üst 5d388443
......@@ -45,6 +45,13 @@ if [ "`head -n 1 $1 | wc -c`" -gt 79 ] ; then
abort "$1" "The first line is too long, please try to fit into 79 characters."
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
fi
# ...and that it does not continue on the second line
if [ "`wc -l < $1`" -gt 1 -a -n "`head -n 2 $1 | tail -n 1 | sed 's/^#.*//'`" ] ; then
abort "$1" "The second line is not empty - maybe the first line continues there?"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment