From 42694841762b10c868fe58f005da7131ed1f3cac Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 12 Aug 2026 18:11:11 -0700 Subject: [PATCH] Meta/cook: add -s option --- cook | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/cook b/cook index e9c573516d..9bd0be803e 100755 --- a/cook +++ b/cook @@ -1192,13 +1192,30 @@ sub newer { close ($fh); } +################################################################ +# Sources + +sub source { + my $fn = 'Meta/whats-cooking.txt'; + my $fh; + my $last_topic; + + open ($fh, '<', $fn) or die "$!: open $fn"; + while (<$fh>) { + next if (/^\[(Graduated|Discarded)/../^-{20,}$/); + print if (s/^ source: //); + } + close ($fh); +} + ################################################################ # Main use Getopt::Long; -my ($wildo, $havedone, $newer); +my ($wildo, $havedone, $newer, $source); if (!GetOptions("wildo" => \$wildo, + "source" => \$source, "newer" => \$newer, "havedone" => \$havedone)) { print STDERR "$0 [--wildo|--havedone]\n"; @@ -1230,6 +1247,8 @@ if ($wildo) { wildo($fd); } elsif ($newer) { newer(); +} elsif ($source) { + source(); } elsif ($havedone) { havedone(); } elsif (@ARGV) {