script/traffic_replay: print packets data to stderr
[ambi/samba-autobuild/.git] / script / commit_mark.sh
index 38328c48271aefb799d259b97765109f100d6b46..e9e0f122b81ec91a504845677963fc4b6c1b7f0f 100755 (executable)
@@ -1,9 +1,21 @@
 #!/bin/sh
 # add a autobuild message to the HEAD commit
 
+branch=$(git branch --contains HEAD | grep '^\* ' | sed -e 's/^\* //')
+
+if grep -q "^Autobuild\-User($branch): " "$1"; then
+    echo "Already marked as tested for $branch"
+    exit 0
+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-Date: $(date) on $(hostname)
+
+Autobuild-User($branch): $fullname <$mailaddr>
+Autobuild-Date($branch): $(date) on $(hostname)
 EOF
 exit 0