aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2019-10-28 10:11:22 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2019-10-28 10:14:05 +0100
commitee413de87d27b7661b45e7dfef6062042c8688e2 (patch)
treecfb9b9453921fae1402d6e0bff971e1e33f27d8a
parente076293ce60aeb2380277a5586edee5ee1a8b950 (diff)
downloadpw-ee413de87d27b7661b45e7dfef6062042c8688e2.tar.gz
pw: reuse change summary from request-pull output in pw-pull
Don't bother to put more work than needed since we already have the stats in the request-pull dump, so just take it from there. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rwxr-xr-xpw-pull4
1 files changed, 2 insertions, 2 deletions
diff --git a/pw-pull b/pw-pull
index a6d85db..653fa76 100755
--- a/pw-pull
+++ b/pw-pull
@@ -41,11 +41,11 @@ old=$(git log $since -n 1 --format=%ct)
new=$(git log HEAD -n 1 --format=%ct)
delta=$((($new - $old)/(60*60*24)+1))
count=$(git rev-list --no-merges --count $since...HEAD)
-what=$(git diff --stat $since...HEAD | tail -n1)
thanks=$(git log --no-merges $since...HEAD --format="%b" | awk '$1 ~ /Reported-by:|Acked-by:|Reviewed-by:|Tested-by:/' | cut -d ' ' -f2- | cut -d '<' -f1 | awk '{$1=$1};1' | grep -v '@' | sort | uniq | sort -n | sed ':a;N;$!ba;s/\n/, /g' | fold -s -w73)
-
file="pr-$tree-$today.patch"
git request-pull $since ${remote[1]} > $file
+what=$(cat $file | grep "files changed")
+
echo -e "Subject: pull-request: $tree $today\n\nHi David,\n\nThe following pull-request contains BPF updates for your *${remote[0]}* tree.\n\nWe've added $count non-merge commits during the last $delta day(s) which contain\na total of$what.\n\nThe main changes are:\n\n1) ..., from XYZ. Among others:\n\n - Blah blah sub item.\n\n2) ..., from ABC.\n\nPlease consider pulling these changes from:\n\n git://git.kernel.org/pub/scm/linux/kernel/git/bpf/$tree.git\n\nThanks a lot!\n\nAlso thanks to reporters, reviewers and testers of commits in this pull-request:\n\n$thanks\n\n----------------------------------------------------------------\n\n$(cat $file)" > $file
bug=$(grep -c gitolite $file)
if [ "$bug" -gt "0" ]; then