What's cooking (2012/01 #03)
[git/jnareb-git.git] / WI
blob66334d186fe474190b77eceff6964fd9f0c08dff
1 #!/bin/sh
2 # Prepare "What's in git.git"
4 maint_at=$(git rev-parse --verify refs/heads/maint)
5 master_at=$(git rev-parse --verify refs/heads/master)
6 maint_was=$(git rev-parse --verify refs/hold/sa/maint)
7 master_was=$(git rev-parse --verify refs/hold/sa/master)
9 log () {
10 git shortlog -w76,2,4 --no-merges "$@"
13 one () {
14 git show -s --pretty="format:%h (%s)" "$1"
17 eval $(LC_ALL=C date +"monthname=%b month=%m year=%Y date=%d dow=%a")
19 lead="whats/in/$year/$month"
20 issue=$(
21 cd Meta &&
22 git ls-tree -r --name-only HEAD "$lead" | tail -n 1
24 if test -n "$issue"
25 then
26 issue=$( expr "$issue" : '.*/0*\([1-9][0-9]*\)\.txt$' )
27 issue=$(( $issue + 1 ))
28 else
29 issue=1
31 issue=$( printf "%02d" $issue )
33 mkdir -p "Meta/$lead"
34 exec >"Meta/$lead/$issue.txt"
36 cat <<EOF
37 To: git@vger.kernel.org
38 Subject: What's in git.git ($monthname $year, #$issue; $dow, $date)
39 X-maint-at: $maint_at
40 X-master-at: $master_at
41 X-maint-was: $maint_was
42 X-master-was: $master_was
44 What's in git.git ($monthname $year, #$issue; $dow, $date)
46 maint $(one maint)
47 master $(one master)
48 ------------------------------------------------------------------------
50 BLURB HERE
51 EOF
53 tagged=`git rev-parse --not --verify hold/sa/maint`
54 list=`git rev-list $tagged refs/heads/maint 2>/dev/null`
56 if test -n "$list"
57 then
58 echo
59 echo "* The 'maint' branch has these fixes since the last announcement."
60 echo
61 log $tagged heads/maint
62 a='
63 in addition to the above.'
64 else
65 a=.
68 tagged=`git rev-parse --not --verify hold/sa/master`
69 list=`git rev-list $tagged refs/heads/master 2>/dev/null`
70 if test -n "$list"
71 then
72 echo
73 echo "* The 'master' branch has these since the last announcement$a"
74 echo
75 log $tagged heads/master ^heads/maint