Meta/cook: use the committer date of the tip commit

Earlier I used to use author date, but committer date is a better measure of the age of the topic considering that topics in pu can be and are sometimes amended.

Junio C Hamano committed May 11, 2011 at 13:08 UTC 36ac3d9f0c0a770673883c2b70f73fb8aa042bc5
1 file changed +10 -5
cook
+10 -5
@@ -110,7 +110,7 @@ sub get_commit {
110 my $fh;
111 open($fh, '-|',
112 qw(git for-each-ref),
113 - "--format=%(refname:short) %(authordate:iso8601)",
113 + "--format=%(refname:short) %(committerdate:iso8601)",
114 "refs/heads/??/*")
115 or die "$!: open for-each-ref";
116 my @topic;
@@ -612,14 +612,19 @@ sub wildo {
612 if (defined $topic) {
613 wildo_queue(\%what, "Undecided", $topic);
614 }
615 - # tip-date, next-date, topic, count
616 - $topic = [$2, $too_recent, $1, $3];
615 + # tip-date, next-date, topic, count, pu-count
616 + $topic = [$2, $too_recent, $1, $3, 0];
617 + next;
618 }
619 if (defined $topic &&
620 ($topic->[1] eq $too_recent) &&
621 + ($topic->[4] == 0) &&
622 (/^ \(merged to 'next' on ([-0-9]+)/)) {
623 $topic->[1] = $1;
624 }
625 + if (defined $topic && /^ - /) {
626 + $topic->[4]++;
627 + }
628 next if (/^ /);
629 if (defined $topic &&
630 /Will (?:\S+ )?merge /i) {
@@ -633,10 +638,10 @@ sub wildo {
638 for $topic (sort { (($a->[1] cmp $b->[1]) ||
639 ($a->[0] cmp $b->[0])) }
640 @{$what{$what}}) {
636 - my ($tip, $next, $name, $count) = @$topic;
641 + my ($tip, $next, $name, $count, $pu) = @$topic;
642 my ($sign);
643 $tip =~ s/^\d{4}-//;
639 - if ($next eq $too_recent) {
644 + if (($next eq $too_recent) || (0 < $pu)) {
645 $sign = "-";
646 $next = " " x 6;
647 } else {