aboutsummaryrefslogtreecommitdiff
path: root/pager.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-12-15 23:06:13 -0800
committerJunio C Hamano <gitster@pobox.com>2008-12-15 23:06:13 -0800
commit90c3302173c5a02189f5fe9091c0d07f7b7ebe89 (patch)
tree3488c30e5932a751c344083bfd289c0c48de2ba9 /pager.c
parent8befc50c49e8a271fd3cd7fb34258fe88d1dfcad (diff)
parent87c8a56e4f71cc7e22c16caa4adc2ae17f6aa93d (diff)
downloadgit-90c3302173c5a02189f5fe9091c0d07f7b7ebe89.tar.gz
git-90c3302173c5a02189f5fe9091c0d07f7b7ebe89.tar.xz
Merge branch 'maint'
* maint: fast-import: close pack before unlinking it pager: do not dup2 stderr if it is already redirected git-show: do not segfault when showing a bad tag
Diffstat (limited to 'pager.c')
-rw-r--r--pager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pager.c b/pager.c
index aa0966c9c..f19ddbc87 100644
--- a/pager.c
+++ b/pager.c
@@ -70,7 +70,8 @@ void setup_pager(void)
/* original process continues, but writes to the pipe */
dup2(pager_process.in, 1);
- dup2(pager_process.in, 2);
+ if (isatty(2))
+ dup2(pager_process.in, 2);
close(pager_process.in);
/* this makes sure that the parent terminates after the pager */