Code

git-svn: don't attempt to spawn pager if we don't want one
authorEric Wong <normalperson@yhbt.net>
Sat, 22 Sep 2007 01:48:45 +0000 (18:48 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Sep 2007 00:07:10 +0000 (17:07 -0700)
Even though config_pager() unset the $pager variable, we were
blindly calling exec() on it through run_pager().

Noticed-by: Chris Moore <christopher.ian.moore@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-svn.perl

index f8181609f942b22dc95992740326e8b5788feba5..c015ea8580e8e19dc27a0f66af38995335df8c82 100755 (executable)
@@ -3576,7 +3576,7 @@ sub config_pager {
 }
 
 sub run_pager {
-       return unless -t *STDOUT;
+       return unless -t *STDOUT && defined $pager;
        pipe my $rfd, my $wfd or return;
        defined(my $pid = fork) or ::fatal "Can't fork: $!\n";
        if (!$pid) {