[Libreoffice-commits] dev-tools.git: git-hooks/contrib

Miklos Vajna vmiklos at suse.cz
Fri Mar 22 04:39:42 PDT 2013


 git-hooks/contrib/libvisio.git/hooks/update |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 21f2873914ed25f6efa55c687dded9a73683846a
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Fri Mar 22 12:39:10 2013 +0100

    git-hooks: sync libvisio with core
    
    Change-Id: I844bf0378c7bd659938d3324034eb8233a0d28ed

diff --git a/git-hooks/contrib/libvisio.git/hooks/update b/git-hooks/contrib/libvisio.git/hooks/update
index 336996a..2966fb8 100755
--- a/git-hooks/contrib/libvisio.git/hooks/update
+++ b/git-hooks/contrib/libvisio.git/hooks/update
@@ -14,6 +14,7 @@ if [ "$(id -u -n )" != "logerrit" ] ; then
        echo "*** The reference for this repo is gerrit. do not push directly to fdo" >&2
        exit 1
 fi
+from="$(git show -s --pretty=format:'%an <%ae>' $3^{})"
 
 project=$(cat $GIT_DIR/description)
 recipients="libreoffice-commits at lists.freedesktop.org"
@@ -54,8 +55,9 @@ date_format="%F %R %z"
 num_path_components=2
 
 # Set subject
+repo=$(basename $(cd $GIT_DIR ; pwd))
 if expr "$2" : '0*$' >/dev/null ; then
-	subject="Changes to '${1##refs/heads/}'"
+	subject="$repo: Changes to '${1##refs/heads/}'"
 else
 	base=$(git-merge-base "$2" "$3")
 	subject=$(git-diff-tree -r --name-only "$base" "$3" |
@@ -68,7 +70,6 @@ else
 	if [ "$branch" != "master" ] ; then
 		subject="Branch '$branch' - $subject"
 	fi
-	repo=$(basename $GIT_DIR)
 	subject="$repo: $subject"
 fi
 
@@ -135,5 +136,5 @@ else
 		done
 fi |
 mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/libreoffice/contrib/libvisio.git" \
-     -a "List-Post: <mailto:libreoffice at lists.freedesktop.org>" $recipients
+     -a "List-Post: <mailto:libreoffice at lists.freedesktop.org>" -a "From: $from" $recipients
 exit 0


More information about the Libreoffice-commits mailing list