Update GRADUATED script so that I do not have to list old maintenance branches

Junio C Hamano committed Nov 30, 2009 at 00:53 UTC 4f7ac2e80b8b979bfa27c6bfdf4fea582675a229
1 file changed +9 -5
GRADUATED
+9 -5
@@ -1,7 +1,10 @@
1 #!/bin/sh
2
3 # Older first!
4 -old_maint='maint-1.6.0 maint-1.6.1 maint-1.6.2 maint-1.6.3 maint-1.6.4'
4 +old_maint=$(
5 + git for-each-ref --format='%(refname)' 'refs/heads/maint-*' |
6 + sed -e 's|^refs/heads/||'
7 +)
8
9 _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
10 _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
@@ -41,7 +44,8 @@ do
44 echo "# Graduated to both $m and master"
45 while read branch
46 do
44 - echo "$(git show -s --format='%ct' "$branch") $branch"
47 + d=$(git describe $branch)
48 + echo "$(git show -s --format='%ct' "$branch") $branch ;# $d"
49 done <"$tmp.both" |
50 sort -r -n |
51 sed -e 's/^[0-9]* //' \
@@ -84,11 +88,11 @@ comm -13 "$tmp.maint" "$tmp.master" |
88
89 if test -s "$tmp.unmergeable"
90 then
87 - echo "# Graduated to master; unmergeable to maint"
91 + echo ": # Graduated to master; unmergeable to maint"
92 sort -n "$tmp.unmergeable" |
93 while read timestamp merge topic
94 do
91 - git show -s --pretty="format:# %h %cd" $merge
95 + git show -s --pretty="format:: # %h %cd" $merge
96 echo "git branch -d $topic"
97 done
98 echo
@@ -102,7 +106,7 @@ comm -13 "$tmp.maint" "$tmp.master" |
106 git show -s --pretty="format:%h %cd" $merge
107 git log --pretty=oneline --abbrev-commit maint..$topic
108 } |
105 - sed -e 's/^/# /'
109 + sed -e 's/^/: # /'
110 echo "git checkout maint && git merge $topic"
111 echo
112 done