summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-03-02 12:44:11 -0800
committerJunio C Hamano <gitster@pobox.com>2010-03-02 12:44:11 -0800
commit52ebb06f1466a235c643acffdea9c9e484cfdec0 (patch)
treeb7bfae26f5719b8447ef176f4df4437d1e3fc4a9 /git-svn.perl
parent77b30bcecd84225a21a8639c272fde88180f36d9 (diff)
parent8c33b4cf67f47ee46fe0984751fd40c4cf7cf392 (diff)
downloadgit-52ebb06f1466a235c643acffdea9c9e484cfdec0.tar.gz
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-xgit-svn.perl9
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) {