diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-03-04 22:27:04 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-04 22:27:04 -0800 |
commit | 6914c661c3652e22fc2971bfefd36fddad56233a (patch) | |
tree | 7ea31eb6ed4e6a2fb0882f49db0c46cd19671e77 /git-svn.perl | |
parent | Merge branch 'tr/maint-cherry-pick-list' into maint (diff) | |
parent | tests: Fix race condition in t7006-pager (diff) | |
download | tgif-6914c661c3652e22fc2971bfefd36fddad56233a.tar.xz |
Merge branch 'jn/maint-fix-pager' into maint
* jn/maint-fix-pager:
tests: Fix race condition in t7006-pager
t7006-pager: if stdout is not a terminal, make a new one
tests: Add tests for automatic use of pager
am: Fix launching of pager
git svn: Fix launching of pager
git.1: Clarify the behavior of the --paginate option
Make 'git var GIT_PAGER' always print the configured pager
Fix 'git var' usage synopsis
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-x | git-svn.perl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/git-svn.perl b/git-svn.perl index 265852f459..473a0b9d55 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -5459,7 +5459,12 @@ sub git_svn_log_cmd { # adapted from pager.c sub config_pager { - chomp(my $pager = command_oneline(qw(var GIT_PAGER))); + if (! -t *STDOUT) { + $ENV{GIT_PAGER_IN_USE} = 'false'; + $pager = undef; + return; + } + chomp($pager = command_oneline(qw(var GIT_PAGER))); if ($pager eq 'cat') { $pager = undef; } @@ -5467,7 +5472,7 @@ sub config_pager { } sub run_pager { - return unless -t *STDOUT && defined $pager; + return unless defined $pager; pipe my ($rfd, $wfd) or return; defined(my $pid = fork) or ::fatal "Can't fork: $!"; if (!$pid) { |