11#! /bin/sh
22# Announcement message skelton
33#
4+ tmpbase=/var/tmp/git-announce.$$
5+ trap ' rm -f $tmpbase.*' 0
46branch=${1?branch}
57previous=${2?previous}
68commit=${3-" $1 " }
4042
4143vername=$( echo " $vername " | tr " -" " ." )
4244
45+ git log --format=' %aN,' " $previous " | sort -u > " $tmpbase .prev"
46+ git log --format=' %aN,' " $previous ..$commit " | sort -u > " $tmpbase .this"
47+ comm -12 " $tmpbase .prev" " $tmpbase .this" > " $tmpbase .old"
48+ comm -13 " $tmpbase .prev" " $tmpbase .this" > " $tmpbase .new"
49+
50+ all=$( wc -l < " $tmpbase .this" )
51+ new=$( wc -l < " $tmpbase .new" )
52+ cnt=$( git rev-list --no-merges " $previous ..$commit " | wc -l)
53+
4354cat << EOF
4455To: git@vger.kernel.org
4556Cc: Linux Kernel <linux-kernel@vger.kernel.org>
5061
5162fmt -68 << EOF
5263$kind Git $relname is now available$for_testing at the usual places.
64+ It comprises of $cnt non-merge commits since $previous ,
65+ contributed by $all people, $new of which are new faces.
5366EOF
5467
5568cat << EOF
@@ -67,6 +80,33 @@ tag and the '$branch' branch that the tag points at:
6780 url = git://git.sourceforge.jp/gitroot/git-core/git.git
6881 url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
6982 url = https://github.com/gitster/git
83+ EOF
84+
85+ fmt_people () {
86+ # Yes, I don't perform well without 2 or more people.
87+ # Sue me. The heading says "are as follows" anyway ;-).
88+ sed -e ' ${
89+ s/^/and /
90+ s/,$/./
91+ }' " $1 " |
92+ fmt -66 |
93+ sed -e ' s/^/ /'
94+
95+ }
96+
97+ cat << EOF
98+
99+ New contributors who appeared first in this release are as follows.
100+ Welcome to the Git development community!
101+
102+ $( fmt_people " $tmpbase .new" )
103+
104+ Returning contributors who helped this release are as follows.
105+ Thanks for your continued support.
106+
107+ $( fmt_people " $tmpbase .old" )
108+
109+ ----------------------------------------------------------------
70110
71111EOF
72112
0 commit comments