Meta/cook: elide a topic that is too large

Junio C Hamano committed Mar 28, 2012 at 15:22 UTC dedb8aa7d476ea7b83732a724b6a80c0ab2657e0
1 file changed +6
cook
+6
@@ -241,6 +241,12 @@ sub get_commit {
241 }
242 push @desc, $commit{$_}->{'log'};
243 }
244 +
245 + if (80 < @desc) {
246 + @desc = @desc[0..4];
247 + push @desc, "- ...";
248 + }
249 +
250 my $list = join("\n", map { " " . $_ } @desc);
251 my $relation = describe_relation($topic{$branch});
252 $topic{$branch}{'desc'} = $head . $list;