git-hooks/README                             |    2 +-
 git-hooks/contrib/dev-tools.git/hooks/update |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit ef0cbd2cc785d5a2d5927ce50a180ac2bb080115
Author: Miklos Vajna <vmik...@suse.cz>
Date:   Fri Feb 15 10:54:16 2013 +0100

    git-hooks: update dev-tools hook
    
    Sync From and Subject headers with core.git.
    
    Change-Id: I3a541e941244d517e48a72066c3b3d98e559b71a
    Reviewed-on: https://gerrit.libreoffice.org/2164
    Reviewed-by: Michael Meeks <michael.me...@suse.com>
    Tested-by: Michael Meeks <michael.me...@suse.com>

diff --git a/git-hooks/README b/git-hooks/README
index 1b01a42..a0d8478 100644
--- a/git-hooks/README
+++ b/git-hooks/README
@@ -3,6 +3,6 @@ fdo server after each push. They are responsible for sending 
out mails to the
 -commits list, and also prevent directly pushing changes to fdo, when the
 read-write repo is hosted on gerrit.
 
-If you review a change on gerrit, affecting a hook in this directly, please do
+If you review a change on gerrit, affecting a hook in this directory, please do
 it only in case you update the real hook on the fdo server as well. The
 'install' script should make this easy for you. Thanks!
diff --git a/git-hooks/contrib/dev-tools.git/hooks/update 
b/git-hooks/contrib/dev-tools.git/hooks/update
index 944c06b..58463dd 100755
--- a/git-hooks/contrib/dev-tools.git/hooks/update
+++ b/git-hooks/contrib/dev-tools.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-comm...@lists.freedesktop.org"
@@ -68,7 +69,7 @@ else
        if [ "$branch" != "master" ] ; then
                subject="Branch '$branch' - $subject"
        fi
-       repo=$(basename $GIT_DIR)
+       repo=$(basename $(cd $GIT_DIR ; pwd))
        subject="$repo: $subject"
 fi
 
@@ -134,6 +135,6 @@ else
                        fi
                done
 fi |
-mail -s "$subject" -a "X-Git-Repository: 
git://anongit.freedesktop.org/git/libreoffice/libcdr.git" \
-     -a "List-Post: <mailto:libreoffice@lists.freedesktop.org>" $recipients
+mail -s "$subject" -a "X-Git-Repository: 
git://anongit.freedesktop.org/git/libreoffice/contrib/dev-tools.git" \
+     -a "List-Post: <mailto:libreoffice@lists.freedesktop.org>" -a "From: 
$from" $recipients
 exit 0
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to