autobuild: perfer to use git mail address in autobuild comment
authorBjörn JACKE <bj@SerNet.DE>
Wed, 10 Nov 2010 23:12:07 +0000 (10:12 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 10 Nov 2010 23:56:37 +0000 (23:56 +0000)
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov 10 23:56:37 UTC 2010 on sn-devel-104

script/commit_mark.sh

index 93a345bc7b90b099b499173651ee7c889f91a24a..8495808cc64b6eee459642afedf55111aea5a9f6 100755 (executable)
@@ -7,9 +7,13 @@ if grep -q '^Autobuild.User' "$1"; then
 fi
 
 fullname=$(getent passwd $USER | cut -d: -f5| cut -d',' -f1)
+mailaddr=$(git config user.email)
+if test -z "$mailaddr" ; then
+       mailaddr="$USER@samba.org"
+fi
 cat <<EOF >> "$1"
 
-Autobuild-User: $fullname <$USER@samba.org>
+Autobuild-User: $fullname <$mailaddr>
 Autobuild-Date: $(date) on $(hostname)
 EOF
 exit 0