Skip to content

Commit 4f7ac2e

Browse files
committed
Update GRADUATED script so that I do not have to list old maintenance branches
1 parent f76e493 commit 4f7ac2e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

GRADUATED

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#!/bin/sh
22

33
# 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+
)
58

69
_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
710
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
@@ -41,7 +44,8 @@ do
4144
echo "# Graduated to both $m and master"
4245
while read branch
4346
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"
4549
done <"$tmp.both" |
4650
sort -r -n |
4751
sed -e 's/^[0-9]* //' \
@@ -84,11 +88,11 @@ comm -13 "$tmp.maint" "$tmp.master" |
8488

8589
if test -s "$tmp.unmergeable"
8690
then
87-
echo "# Graduated to master; unmergeable to maint"
91+
echo ": # Graduated to master; unmergeable to maint"
8892
sort -n "$tmp.unmergeable" |
8993
while read timestamp merge topic
9094
do
91-
git show -s --pretty="format:# %h %cd" $merge
95+
git show -s --pretty="format:: # %h %cd" $merge
9296
echo "git branch -d $topic"
9397
done
9498
echo
@@ -102,7 +106,7 @@ comm -13 "$tmp.maint" "$tmp.master" |
102106
git show -s --pretty="format:%h %cd" $merge
103107
git log --pretty=oneline --abbrev-commit maint..$topic
104108
} |
105-
sed -e 's/^/# /'
109+
sed -e 's/^/: # /'
106110
echo "git checkout maint && git merge $topic"
107111
echo
108112
done

0 commit comments

Comments
 (0)