summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2012-08-21 14:33:32 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2012-08-21 14:33:32 (GMT)
commitd314e9415e8278731719a3f7a7d6746439eca59e (patch)
treeaef301a0eb4db3bf686f46529998a09aa5cd24a9
parent20eef607d1b90a87b821f8b9d26971f5473a9868 (diff)
downloadtip-bot-d314e9415e8278731719a3f7a7d6746439eca59e.zip
tip-bot-d314e9415e8278731719a3f7a7d6746439eca59e.tar.gz
tip-bot-d314e9415e8278731719a3f7a7d6746439eca59e.tar.bz2
tip-bot-d314e9415e8278731719a3f7a7d6746439eca59e.tar.xz
When sending a failsafe message, include the "git shortlog" of the commits
-rwxr-xr-xrobot.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/robot.sh b/robot.sh
index a73e763..2398a97 100755
--- a/robot.sh
+++ b/robot.sh
@@ -61,7 +61,7 @@ max_mails=100
if [ $count -gt $max_mails ]; then
# Failsafe!
git reset --hard $OLD_HEAD
- cat - "$tmpdir"/revlist.$$ > "$tmpdir"/failsafe.$$ <<EOF
+ cat > "$tmpdir"/failsafe.$$ <<EOF
From: tip-bot alert <$SENDER>
To: H. Peter Anvin <hpa@zytor.com>
Subject: tip-bot failsafe: $count emails
@@ -69,6 +69,10 @@ Subject: tip-bot failsafe: $count emails
Trying to send $count emails, reverting to $OLD_HEAD
EOF
+ git shortlog --no-walk `cat "$tmpdir"/revlist.$$` \
+ >> "$tmpdir"/failsafe.$$
+ echo '' >> "$tmpdir"/failsafe.$$
+ cat "$tmpdir"/revlist.$$ >> "$tmpdir"/failsafe.$$
sendmail -i -t < "$tmpdir"/failsafe.$$
rm -f "$tmpdir"/failsafe.$$
exit 1