summaryrefslogtreecommitdiff
path: root/pager.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-06-05 08:56:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-06-05 16:38:00 (GMT)
commite8320f350f523c3219ff8ec639663193941af57d (patch)
treefd9775cede092c35489dbf504607ed814f3e75c0 /pager.c
parent3fe4498197ced84886b4adaddf18f1109b477f8e (diff)
downloadgit-e8320f350f523c3219ff8ec639663193941af57d.zip
git-e8320f350f523c3219ff8ec639663193941af57d.tar.gz
git-e8320f350f523c3219ff8ec639663193941af57d.tar.bz2
pager: drop "wait for output to run less" hack
Commit 35ce862 (pager: Work around window resizing bug in 'less', 2007-01-24) causes git's pager sub-process to wait to receive input after forking but before exec-ing the pager. To handle this, run-command had to grow a "pre-exec callback" feature. Unfortunately, this feature does not work at all on Windows (where we do not fork), and interacts poorly with run-command's parent notification system. Its use should be discouraged. The bug in less was fixed in version 406, which was released in June 2007. It is probably safe at this point to remove our workaround. That lets us rip out the preexec_cb feature entirely. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pager.c')
-rw-r--r--pager.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/pager.c b/pager.c
index 4dcb08d..c0b4387 100644
--- a/pager.c
+++ b/pager.c
@@ -11,21 +11,6 @@
* something different on Windows.
*/
-#ifndef WIN32
-static void pager_preexec(void)
-{
- /*
- * Work around bug in "less" by not starting it until we
- * have real input
- */
- fd_set in;
-
- FD_ZERO(&in);
- FD_SET(0, &in);
- select(1, &in, NULL, &in, NULL);
-}
-#endif
-
static const char *pager_argv[] = { NULL, NULL };
static struct child_process pager_process;
@@ -93,9 +78,6 @@ void setup_pager(void)
static const char *env[] = { "LESS=FRSX", NULL };
pager_process.env = env;
}
-#ifndef WIN32
- pager_process.preexec_cb = pager_preexec;
-#endif
if (start_command(&pager_process))
return;