From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benoit Sigoure Subject: Re: [PATCH] Fix and improve t7004 Date: Fri, 16 Nov 2007 22:31:15 +0100 Message-ID: References: <7vlk8yx9rp.fsf@gitster.siamese.dyndns.org> <1195244917-25659-1-git-send-email-mh@glandium.org> <20071116211148.GA28966@glandium.org> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-49-45626714" Content-Transfer-Encoding: 7bit Cc: git@vger.kernel.org, Junio C Hamano To: Mike Hommey X-From: git-owner@vger.kernel.org Fri Nov 16 22:32:31 2007 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 1It8n8-00038l-06 for gcvg-git-2@gmane.org; Fri, 16 Nov 2007 22:31:58 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760286AbXKPVbh (ORCPT ); Fri, 16 Nov 2007 16:31:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759732AbXKPVbg (ORCPT ); Fri, 16 Nov 2007 16:31:36 -0500 Received: from 2.139.39-62.rev.gaoland.net ([62.39.139.2]:49817 "EHLO kualalumpur.lrde.epita.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758997AbXKPVbe (ORCPT ); Fri, 16 Nov 2007 16:31:34 -0500 Received: from quanta.tsunanet.net ([82.229.223.213]) by kualalumpur.lrde.epita.fr with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63) (envelope-from ) id 1It8mh-0007tK-U4; Fri, 16 Nov 2007 22:31:32 +0100 In-Reply-To: <20071116211148.GA28966@glandium.org> X-Pgp-Agent: GPGMail 1.1.2 (Tiger) X-Mailer: Apple Mail (2.752.3) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-49-45626714 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Nov 16, 2007, at 10:11 PM, Mike Hommey wrote: > On Fri, Nov 16, 2007 at 10:04:57PM +0100, Benoit Sigoure wrote: >> On Nov 16, 2007, at 9:28 PM, Mike Hommey wrote: >>> test_expect_success \ >>> 'message in editor has initial comment' ' >>> GIT_EDITOR=cat git tag -a initial-comment > actual || true && >>> - test $(sed -n "/^\(#\|\$\)/p" actual | wc -l) -gt 0 >>> + ( read empty ; >>> + [ "$empty" ] && exit 1 ; >> >> What is this meant to do? Did you mean [ -n "$empty" ] ? > > Replacing with [ -n "$empty" ] would not work properly, except if you > replace the following ; with &&. Does that really make a readability > difference ? I don't get it. As far as I understand, you're trying to check whether $empty is indeed empty, right? So how is `[ "$empty" ]' meant to work? [ -n "$empty" ] && exit 1 will exit 1 if empty isn't empty. -- Benoit Sigoure aka Tsuna EPITA Research and Development Laboratory --Apple-Mail-49-45626714 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHPgwjwwE67wC8PUkRAkExAJ4kUwf8Wntv3u0xl7/vOVibpxXzjACeMK1f OdLBVUU3jq4CaBTLAoTBPz8= =OpZQ -----END PGP SIGNATURE----- --Apple-Mail-49-45626714--