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
index a6cee64a3d..2470dd686a 100755
--- a/cook
+++ b/cook
@@ -862,8 +862,10 @@ if ($wildo) {
if (!@ARGV) {
open($fd, "<", "Meta/whats-cooking.txt");
} elsif (@ARGV != 1) {
- print STDERR "$0 --wildo [filename|HEAD]\n";
+ print STDERR "$0 --wildo [filename|HEAD|-]\n";
exit 1;
+ } elsif ($ARGV[0] eq '-') {
+ $fd = \*STDIN;
} elsif ($ARGV[0] =~ /^HEAD/) {
open($fd, "-|",
qw(git --git-dir=Meta/.git cat-file -p),