Kaydet (Commit) 04b2736a authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

call the gerrit commit-msg hook if present

This a a prep-work for if and when we use gerrit
it is very important to call gerrit's commit-msg hook
and the sooner we teach our own hook to play nice with it
the less likely we will have issue during migration
üst c7790548
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
# This example catches duplicate Signed-off-by lines. # This example catches duplicate Signed-off-by lines.
base_dir=$(dirname $0)
abort() { abort() {
cp $1 $1.save cp $1 $1.save
cat >&2 <<EOF cat >&2 <<EOF
...@@ -59,4 +61,8 @@ if [ -n "`grep '^[[:space:]]\+\*.*:' $1`" -a -z "`grep '^\*' $1`" ] ; then ...@@ -59,4 +61,8 @@ if [ -n "`grep '^[[:space:]]\+\*.*:' $1`" -a -z "`grep '^\*' $1`" ] ; then
abort "$1" "Please don't use whitespace in front of '* file: Description.' entries." abort "$1" "Please don't use whitespace in front of '* file: Description.' entries."
fi fi
if [ -f "${base_dir}/gerrit-commit-msg" ] ; then
source "${base_dir}/gerrit-commit-msg"
fi
exit 0 exit 0
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