Re: git status in clean working dir
- From
Jeff King <peff@peff.net>
- Date
- Jul 24, 2008, 16:54 UTC
- Message-ID
- <20080724165455.GD20816@sigill.intra.peff.net>
- In-Reply-To
- <D42305E3-82DA-46C1-B55F-74AD9AD48197@develooper.com>
On Wed, Jul 23, 2008 at 11:56:48PM -0700, Ask Bjørn Hansen wrote:
Show 8 quoted lines
>> (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