From: Jeff King Date: Wed, 09 Nov 2011 00:59:27 GMT Subject: Re: git log --quiet bug? Message-ID: <20111109005927.GA25876@sigill.intra.peff.net> In-Reply-To: <7vy5vqw47x.fsf@alter.siamese.dyndns.org> On Tue, Nov 08, 2011 at 04:04:50PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > Try: > > > > test -z "$(git rev-list -1 origin..HEAD)" && > > echo nothing that needs pushing > > > > You can also use --count to get the exact number, but if you just care > > whether there is something or nothing, using "-1" lets git stop the > > graph traversal immediately. > > Doesn't some variant of "branch -v" show the ahead/behind information for > all branches? Yeah, but I thought the question was how to figure this out programatically in a script. -Peff