@leroysheep / CrazyWebTemps / commits / 3f99478321

Meta/cook: hack to allow "Meta/cook -w HEAD~$n" to work

Junio C Hamano committed Jan 25, 2013 at 14:40 UTC 3f9947832148597fb5b17146917fb538b6db5c49
1 file changed +3 -2
cook
+3 -2
index f0ccda0808..a6cee64a3d 100755 --- a/cook +++ b/cook @@ -864,9 +864,10 @@ if ($wildo) { } elsif (@ARGV != 1) { print STDERR "$0 --wildo [filename|HEAD]\n"; exit 1; - } elsif ($ARGV[0] eq "HEAD") { + } elsif ($ARGV[0] =~ /^HEAD/) { open($fd, "-|", - qw(git --git-dir=Meta/.git cat-file -p HEAD:whats-cooking.txt)); + qw(git --git-dir=Meta/.git cat-file -p), + "$ARGV[0]:whats-cooking.txt"); } else { open($fd, "<", $ARGV[0]); }