@leroysheep / LeeRoySheep / commits / c9fdf26209

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
index 2cb1343afc..da7b8b1598 100755 --- a/cook +++ b/cook @@ -521,6 +521,16 @@ sub update_issue { return $incremental; } +sub topic_in_pu { + my ($topic_desc) = @_; + for my $line (split(/\n/, $topic_desc)) { + if ($line =~ /^ [+-] /) { + return 1; + } + } + return 0; +} + sub merge_cooking { my ($cooking, $current) = @_; my $td = $cooking->{'topic_description'}; @@ -543,7 +553,10 @@ sub merge_cooking { for my $topic (sort keys %{$current}) { if (!exists $td->{$topic}) { - push @new_topic, $topic; + # Ignore new topics without anything merged + if (topic_in_pu($current->{$topic}{'desc'})) { + push @new_topic, $topic; + } next; } my $n = $current->{$topic}{'desc'};