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
@@ -864,9 +864,10 @@ if ($wildo) {
864
} elsif (@ARGV != 1) {
865
print STDERR "$0 --wildo [filename|HEAD]\n";
866
exit 1;
867
- } elsif ($ARGV[0] eq "HEAD") {
867
+ } elsif ($ARGV[0] =~ /^HEAD/) {
868
open($fd, "-|",
869
- qw(git --git-dir=Meta/.git cat-file -p HEAD:whats-cooking.txt));
869
+ qw(git --git-dir=Meta/.git cat-file -p),
870
+ "$ARGV[0]:whats-cooking.txt");
871
} else {
872
open($fd, "<", $ARGV[0]);
873
}