20 describe
=$
(git describe
"master")
21 base
=$
(expr "$describe" : '\(.*\)-\([0-9]*\)-g[0-9a-f]*$') ||
24 git rev-parse
--verify "$base^0" >/dev
/null
2>/dev
/null ||
{
25 echo >&2 "Eh? where is your base?"
37 leftover
="$leftover$1$LF"
41 dothis
="$1$LF$LF$dothis"
45 topic
="$1" tip
="$2" date="$3"
46 case " $topics" in *" $topic "*) return ;; esac
47 topics
="$topic$topic "
49 mergeable
=no ready
=no label
=
51 master_count
=$
(git rev-list
"$base..$tip" |
wc -l)
52 maint_count
=$
(git rev-list
"maint..$tip" |
wc -l)
54 test $master_count = $maint_count && mergeable
=yes
56 if current
=$
(git rev-parse
--verify -q "$topic^0") &&
57 test "$current" = "$tip"
61 elif test -z "$current"
67 case "$mergeable,$ready" in
69 defer
"# $topic: not mergeable ($master_count vs $maint_count)"
72 topic_count
=$
(git rev-list
"$base..$current" |
wc -l)
73 defer
"# $topic: not ready ($master_count vs $topic_count)"
76 insn
="$label # $master_count ($date)"
77 insn
="$insn$LF$(git log --oneline "maint..
$tip" | sed -e "s
/^
/# /")"
83 git log
--first-parent --min-parents=2 --max-parents=2 \
84 --format='%ci %H %P %s' "$base..master" |
{
85 while read date time zone commit parent tip subject
87 topic
=$
(expr "$subject" : "Merge branch '\(.*\)'$") ||
{
88 echo >&2 "Cannot parse $commit ($subject)"
91 one_topic
"$topic" "$tip" "$date"