Meta/cook: show source URLs for undecided topics

Junio C Hamano committed Jul 11, 2024 at 14:26 UTC 712aff67e5c6af56d9712438696423796837c7c8
1 file changed +22 -4
cook
+22 -4
@@ -918,14 +918,24 @@ sub wildo {
918 next unless defined $topic && $in_desc;
919
920 s/^\s+//;
921 +
922 + if (/Originally merged to 'next' on ([-0-9]+)/) {
923 + $topic->[1] = $1;
924 + next;
925 + }
926 +
927 if (wildo_match($_)) {
928 wildo_queue(\%what, $_, $topic);
923 - $topic = $in_desc = undef;
929 + next;
930 }
931
926 - if (/Originally merged to 'next' on ([-0-9]+)/) {
927 - $topic->[1] = $1;
932 + if (/^source:\s+(.*)$/) {
933 + $topic->[5] ||= [];
934 + push @{$topic->[5]}, $1;
935 + $topic = $in_desc = undef;
936 + next;
937 }
938 +
939 }
940 wildo_flush_topic($in_section, \%what, $topic);
941
@@ -935,7 +945,7 @@ sub wildo {
945 for $topic (sort { (($a->[1] cmp $b->[1]) ||
946 ($a->[0] cmp $b->[0])) }
947 @{$what{$what}}) {
938 - my ($tip, $next, $name, $count, $seen) = @$topic;
948 + my ($tip, $next, $name, $count, $seen, $source) = @$topic;
949 my ($sign);
950 $tip =~ s/^\d{4}-//;
951 if (($next eq $too_recent) || (0 < $seen)) {
@@ -947,6 +957,14 @@ sub wildo {
957 }
958 $count = "#$count";
959 printf " %s %-60s %s%s %5s\n", $sign, $name, $tip, $next, $count;
960 + if ($what !~ /^Will /) {
961 + for my $s (@$source) {
962 + if ($s =~ /^<(.*)>$/) {
963 + $s = "https://lore.kernel.org/git/$1/";
964 + }
965 + printf " $s\n";
966 + }
967 + }
968 }
969 $ipbl = "\n";
970 }