Meta/cook: omit topics not even in pu

Junio C Hamano committed Jan 4, 2011 at 13:29 UTC c9fdf262098b961dbcace2fc46f5c0c5c3afc993
1 file changed +14 -1
cook
+14 -1
@@ -521,6 +521,16 @@ sub update_issue {
521 return $incremental;
522 }
523
524 +sub topic_in_pu {
525 + my ($topic_desc) = @_;
526 + for my $line (split(/\n/, $topic_desc)) {
527 + if ($line =~ /^ [+-] /) {
528 + return 1;
529 + }
530 + }
531 + return 0;
532 +}
533 +
534 sub merge_cooking {
535 my ($cooking, $current) = @_;
536 my $td = $cooking->{'topic_description'};
@@ -543,7 +553,10 @@ sub merge_cooking {
553
554 for my $topic (sort keys %{$current}) {
555 if (!exists $td->{$topic}) {
546 - push @new_topic, $topic;
556 + # Ignore new topics without anything merged
557 + if (topic_in_pu($current->{$topic}{'desc'})) {
558 + push @new_topic, $topic;
559 + }
560 next;
561 }
562 my $n = $current->{$topic}{'desc'};