]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/cook: omit topics not even in pu
authorJunio C Hamano <gitster@pobox.com>
Tue, 4 Jan 2011 21:29:31 +0000 (13:29 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 4 Jan 2011 21:29:31 +0000 (13:29 -0800)
cook

diff --git a/cook b/cook
index 2cb1343afc4b4ce871eb3252805774710b345ae5..da7b8b15983606a96d514dda4519ff595d9844ac 100755 (executable)
--- 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'};