From 1edaf8e1f25ce7f7f5846952f9862375020dfaec Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 3 Sep 2014 23:17:30 +0200 Subject: [PATCH] Also mention the author and repository in the messages --- src/deforaos-git-hook.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/deforaos-git-hook.sh b/src/deforaos-git-hook.sh index dc98736..dc1b8b6 100755 --- a/src/deforaos-git-hook.sh +++ b/src/deforaos-git-hook.sh @@ -72,6 +72,8 @@ _hook_update() refname="$1" oldrev="$2" newrev="$3" + author="$GL_USER" + repository="$GL_REPO" branch= type=$($GIT cat-file -t "$newrev") @@ -99,12 +101,12 @@ _hook_update() done if [ -n "$branch" ]; 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 - 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 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 return 0 }