Meta/cook: fix reading from the standard input stream

Junio C Hamano committed Jan 27, 2013 at 22:45 UTC 9d2b054c2d89829fd290f485e90975b381bc3df5
1 file changed +3 -1
cook
+3 -1
@@ -862,8 +862,10 @@ if ($wildo) {
862 if (!@ARGV) {
863 open($fd, "<", "Meta/whats-cooking.txt");
864 } elsif (@ARGV != 1) {
865 - print STDERR "$0 --wildo [filename|HEAD]\n";
865 + print STDERR "$0 --wildo [filename|HEAD|-]\n";
866 exit 1;
867 + } elsif ($ARGV[0] eq '-') {
868 + $fd = \*STDIN;
869 } elsif ($ARGV[0] =~ /^HEAD/) {
870 open($fd, "-|",
871 qw(git --git-dir=Meta/.git cat-file -p),