From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Bremner Subject: Re: git status in clean working dir Date: Tue, 22 Jul 2008 11:10:06 -0300 Message-ID: <877ibe2eo1.wl%bremner@pivot.cs.unb.ca> References: <0ttzeirft8.wl%bremner@pivot.cs.unb.ca> <7vy73ur6pz.fsf@gitster.siamese.dyndns.org> <7vtzeir68z.fsf@gitster.siamese.dyndns.org> <20080722044157.GA20787@sigill.intra.peff.net> <20080722053921.GA4983@glandium.org> <20080722060643.GA25023@sigill.intra.peff.net> Reply-To: David Bremner Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: git To: Jeff King X-From: git-owner@vger.kernel.org Tue Jul 22 16:35:04 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1KLIx3-0005Ag-Sr for gcvg-git-2@gmane.org; Tue, 22 Jul 2008 16:34:54 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750869AbYGVOdy (ORCPT ); Tue, 22 Jul 2008 10:33:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750798AbYGVOdy (ORCPT ); Tue, 22 Jul 2008 10:33:54 -0400 Received: from pivot.cs.unb.ca ([131.202.240.57]:55368 "EHLO pivot.cs.unb.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750711AbYGVOdx (ORCPT ); Tue, 22 Jul 2008 10:33:53 -0400 X-Greylist: delayed 1424 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Jul 2008 10:33:53 EDT Received: from bremner by pivot.cs.unb.ca with local (Exim 4.69) (envelope-from ) id 1KLIZ6-0002iS-75 for git@vger.kernel.org; Tue, 22 Jul 2008 11:10:08 -0300 Received: by pivot.cs.unb.ca (tmda-sendmail, from uid 1266); Tue, 22 Jul 2008 11:10:07 -0300 Received: from bremner (helo=pivot.cs.unb.ca) by pivot.cs.unb.ca with local-esmtp (Exim 4.69) (envelope-from ) id 1KLIZ4-0002iJ-UI; Tue, 22 Jul 2008 11:10:06 -0300 In-Reply-To: <20080722060643.GA25023@sigill.intra.peff.net> User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.2 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) X-TMDA-Fingerprint: 4K6IxEGQzaT3uZ/HBUMVrIQjQ5s X-Primary-Address: bremner@unb.ca Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: >>>>> "Jeff" == Jeff King writes: Jeff> We already do that (see pager.c:53). The original poster Jeff> still had a problem, but I don't know if it was for actual Jeff> usage or simply a toy Jeff> $ git status Jeff> $ echo $? Jeff> $ echo "why don't exit codes work in status?" | mail git@vger Well, I wanted to know if git status was the right tool to detect a working directory with no changes to commit. So I tried it in the shell, and it failed. I then read the man page. For me, it would be fine to document the current behaviour (i.e. in practice "git status -a > /dev/null" would be what I would use in scripts anyway). To be honest the current behaviour was not something I would have guessed. Thanks to all for paying attention to my complaint, David