Also mention the author and repository in the messages

This commit is contained in:
Pierre Pronchery 2014-09-03 23:17:30 +02:00
parent 6d0bbbc4ac
commit 1edaf8e1f2

View File

@ -72,6 +72,8 @@ _hook_update()
refname="$1" refname="$1"
oldrev="$2" oldrev="$2"
newrev="$3" newrev="$3"
author="$GL_USER"
repository="$GL_REPO"
branch= branch=
type=$($GIT cat-file -t "$newrev") type=$($GIT cat-file -t "$newrev")
@ -99,12 +101,12 @@ _hook_update()
done done
if [ -n "$branch" ]; then if [ -n "$branch" ]; then
if [ $commit_cnt -eq 1 -a -n "$message" ]; then if [ $commit_cnt -eq 1 -a -n "$message" ]; then
echo "[$branch] $message ($files_cnt file(s) altered)" echo "$repository: $author [$branch] $message ($files_cnt file(s) alterations)"
else else
echo "[$branch] $commit_cnt $type(s) pushed ($files_cnt file(s) altered)" echo "$repository: $author [$branch] $commit_cnt $type(s) pushed ($files_cnt file(s) alterations)"
fi fi
else else
echo "$refname: $commit_cnt $type(s) pushed ($files_cnt file(s) alterations)" echo "$repository: $author [$refname] $commit_cnt $type(s) pushed ($files_cnt file(s) alterations)"
fi fi
return 0 return 0
} }