From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id BF00D1F5AE for ; Fri, 31 Jul 2020 20:30:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727772AbgGaUaG (ORCPT ); Fri, 31 Jul 2020 16:30:06 -0400 Received: from cloud.peff.net ([104.130.231.41]:44288 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726950AbgGaUaF (ORCPT ); Fri, 31 Jul 2020 16:30:05 -0400 Received: (qmail 24529 invoked by uid 109); 31 Jul 2020 20:30:05 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Fri, 31 Jul 2020 20:30:05 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 30915 invoked by uid 111); 31 Jul 2020 20:30:05 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Fri, 31 Jul 2020 16:30:05 -0400 Authentication-Results: peff.net; auth=none Date: Fri, 31 Jul 2020 16:30:04 -0400 From: Jeff King To: Junio C Hamano Cc: Alban Gruin , git@vger.kernel.org, Christian Couder , Christian Couder Subject: Re: [PATCH v1] t6300: fix issues related to %(contents:size) Message-ID: <20200731203004.GA1440843@coredump.intra.peff.net> References: <21bb2dad-5845-8cee-8f6a-1089ef7cae3b@gmail.com> <20200731174509.9199-1-alban.gruin@gmail.com> <20200731174709.GD843002@coredump.intra.peff.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Jul 31, 2020 at 01:04:10PM -0700, Junio C Hamano wrote: > > Definitely fixes the issue, though I wonder: > > > >> - echo $expect >expected > >> - test_expect_${4:-sucess} $PREREQ "basic atom: $1 contents:size" ' > >> + echo $expect >expect > >> + test_expect_${4:-success} $PREREQ "basic atom: $1 contents:size" ' > >> git for-each-ref --format="%(contents:size)" "$ref" >actual && > >> test_cmp expect actual > >> ' > > > > Should we instead switch the test_cmp to look at "expected" to be > > consistent with the rest of the tests in this file? > > If I recall correctly, "expect vs actual" were more common when I > counted across all the tests last time. Matching local convention > is fine, though. Yes, I agree that "expect" is where we should be heading overall. I think matching local convention is best here to avoid introducing new mistakes like this one, but I wouldn't be opposed to somebody switching out s/expected/expect/ in the whole file. -Peff