From: Jeff King Date: Thu, 24 Jul 2008 16:54:55 GMT Subject: Re: git status in clean working dir Message-ID: <20080724165455.GD20816@sigill.intra.peff.net> In-Reply-To: On Wed, Jul 23, 2008 at 11:56:48PM -0700, Ask Bjørn Hansen wrote: >> (2) Then why are we even allowing to configure the plumbing to page? > > I don't have an opinion on the the appropriateness of paging various > commands, but to solve the problem of scripts getting tripped up by the > paging, couldn't the plumping check if STDOUT is a tty and only do the > paging if so? > > (In Perl "page_output(...) if $pager_configured and -t STDOUT") We already do this, so "git status >/dev/null" produces the correct exit code. But scripts don't necessarily redirect stdout. -Peff