X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=script%2Fcommit_mark.sh;h=e9e0f122b81ec91a504845677963fc4b6c1b7f0f;hb=575b093dac3c509b1bfaab0b4ad29b9b4214e487;hp=bb1e9428a04c56f5644d75d2300426c6a4db5bea;hpb=5d5ae099d16d1902e4a85adec5b1e6a9085b6118;p=obnox%2Fsamba%2Fsamba-obnox.git diff --git a/script/commit_mark.sh b/script/commit_mark.sh index bb1e9428a04..e9e0f122b81 100755 --- a/script/commit_mark.sh +++ b/script/commit_mark.sh @@ -1,14 +1,21 @@ #!/bin/sh # add a autobuild message to the HEAD commit -if grep -q '^Autobuild.User' "$1"; then - echo "Already marked as tested" +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 <> "$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