Subject: Re: Fix 'git log' early pager startup error case

From: Jonathan Nieder <[email-masked]>
Date: Tue, 24 Aug 2010 20:36:25 -0500

Linus Torvalds wrote:

> I dunno. I noticed this as a result of a typo, and some (un)happy timing 
> ("less" will still start up as a pager if the input is delayed a bit). I 
> think this is the right thing to do, but as mentioned, I only fixed a 
> particular small error case.

I like it.

FWIW the change this undoes is v1.4.2-rc3~25^2~1 (Builtins: control
the use of pager from the command table., 2006-07-31). [1]

 > AFAICS Matthias' patch has the added benefit of moving setup_pager to
 > before large files (i.e. packs) are mapped. This helps non-COW-fork
 > (i.e. cygwin) tremendously. Actually with Linus' setup refactoring
 > this could probably be easily moved to the wrapper,...

Mingw Git uses spawnvpe now, but Cygwin users might still suffer from
fork() troubles.  I think it should be possible to work around that by
using posix_spawn() from start_command() on such platforms (or
someting similar).

[1] http://thread.gmane.org/gmane.comp.version-control.git/24438/focus=24507