]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/cook: fix reading from the standard input stream
authorJunio C Hamano <gitster@pobox.com>
Mon, 28 Jan 2013 06:45:36 +0000 (22:45 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Jan 2013 06:45:36 +0000 (22:45 -0800)
cook

diff --git a/cook b/cook
index a6cee64a3d55527bf865f3f9b001ec40b2f76204..2470dd686a258eb6636a8224d1c548daaef72d1e 100755 (executable)
--- 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),