From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Haggerty Subject: Re: [PATCH 09/18] t3404: Test the commit count in commit messages generated by "rebase -i" Date: Thu, 14 Jan 2010 09:59:46 +0100 Message-ID: <4B4EDD02.70603@alum.mit.edu> References: <4B4ECB76.3030009@viscovery.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: git@vger.kernel.org, gitster@pobox.com, Johannes.Schindelin@gmx.de To: Johannes Sixt X-From: git-owner@vger.kernel.org Thu Jan 14 10:00:27 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.50) id 1NVLZ4-0005Ck-Gn for gcvg-git-2@lo.gmane.org; Thu, 14 Jan 2010 10:00:27 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756577Ab0ANJAW (ORCPT ); Thu, 14 Jan 2010 04:00:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756575Ab0ANJAW (ORCPT ); Thu, 14 Jan 2010 04:00:22 -0500 Received: from einhorn.in-berlin.de ([192.109.42.8]:60074 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756375Ab0ANJAV (ORCPT ); Thu, 14 Jan 2010 04:00:21 -0500 X-Envelope-From: mhagger@alum.mit.edu Received: from [192.168.100.152] (ssh.berlin.jpk.com [212.222.128.135]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id o0E8xkvn015882 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 14 Jan 2010 09:59:46 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090817 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 In-Reply-To: <4B4ECB76.3030009@viscovery.net> X-Enigmail-Version: 0.95.0 X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Johannes Sixt wrote: > Michael Haggerty schrieb: >> + test -z "$EXPECT_HEADER_COUNT" || >> + test "$EXPECT_HEADER_COUNT" = $(sed -n '1s/^# This is a combination of \(.*\) commits\./\1/p' < "$1") || >> + exit > > Is an empty $EXPECT_HEADER_COUNT an error? I suppose it isn't; therefore, > you must put the second 'test' and the 'exit' in a brace group. True, an empty $EXPECT_HEADER_COUNT is not an error. But I think the form (A || B || C) is correct anyway, because if $EXPECT_HEADER_COUNT is empty, then A is successful, and neither B nor C are executed, and execution falls through to the later tests. > You should also put the $(sed) in double-quotes. Yes, thanks. I'll include it in the next version. Michael