Re: git status in clean working dir
- From
Jeff King <peff@peff.net>
- Date
- Jul 22, 2008, 06:46 UTC
- Message-ID
- <20080722064603.GA25221@sigill.intra.peff.net>
- In-Reply-To
- <20080722061807.GA6714@glandium.org>
On Tue, Jul 22, 2008 at 08:18:07AM +0200, Mike Hommey wrote:
Show 16 quoted lines
> > We already do that (see pager.c:53). The original poster still had a > > problem, but I don't know if it was for actual usage or simply a toy > > > > $ git status > > $ echo $? > > $ echo "why don't exit codes work in status?" | mail git@vger > > > > question. > > As you said in another branch of the thread, this part would be solved by > having parent/child being reverted. > > Now, for the case where diff-files can have a pager if the user shoots > himself in the foot, if the output is not a terminal and pager.c already > does the right thing, I don't see where diff-files having a pager will > be a problem.
Ah, OK. I misunderstood your original post. Yes, there are two ways paging can screw you: munging the data in a pipeline and munging the exit code. We already deal with former, so it is really just the latter that is posing a problem in this thread.
I am tempted by the "order switching" I mentioned, but that would entail the git process waiting to clean the pager, during which time it may be consuming memory. But maybe that isn't worth worrying about.
-Peff