diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-03-02 12:44:11 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-02 12:44:11 -0800 |
commit | 52ebb06f1466a235c643acffdea9c9e484cfdec0 (patch) | |
tree | b7bfae26f5719b8447ef176f4df4437d1e3fc4a9 /git-svn.perl | |
parent | Merge branch 'ml/encode-header-refactor' (diff) | |
parent | tests: Fix race condition in t7006-pager (diff) | |
download | tgif-52ebb06f1466a235c643acffdea9c9e484cfdec0.tar.xz |
Merge branch 'jn/maint-fix-pager'
* 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 49dd649bc5..b7c03b641c 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -5465,7 +5465,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; } @@ -5473,7 +5478,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) { |