From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Keeping Subject: Re: [PATCH 0/4] Re: [PATCH 3/4] t: rev-parse-parents: avoid yoda conditions Date: Wed, 4 Sep 2013 18:13:57 +0100 Message-ID: <20130904171356.GD2582@serenity.lan> References: <1378103439-3225-4-git-send-email-felipe.contreras@gmail.com> <20130903071256.GD3608@sigill.intra.peff.net> <20130903075107.GA25540@goldbirke> <20130903080358.GA30158@sigill.intra.peff.net> <20130903111006.GJ29840@goldbirke> <20130903150855.GK29840@goldbirke> <20130903170419.GA29921@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jonathan Nieder , SZEDER =?iso-8859-1?Q?G=E1bor?= , Felipe Contreras , Jeff King , git@vger.kernel.org To: Junio C Hamano X-From: git-owner@vger.kernel.org Wed Sep 04 19:14:15 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VHGel-0001QT-E7 for gcvg-git-2@plane.gmane.org; Wed, 04 Sep 2013 19:14:15 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756238Ab3IDROK (ORCPT ); Wed, 4 Sep 2013 13:14:10 -0400 Received: from jackal.aluminati.org ([72.9.247.210]:39213 "EHLO jackal.aluminati.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753473Ab3IDROJ (ORCPT ); Wed, 4 Sep 2013 13:14:09 -0400 Received: from localhost (localhost [127.0.0.1]) by jackal.aluminati.org (Postfix) with ESMTP id 4FD26CDA5BC; Wed, 4 Sep 2013 18:14:08 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at serval.aluminati.org X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-9999 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=ham Received: from jackal.aluminati.org ([127.0.0.1]) by localhost (jackal.aluminati.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lD4ymajRMsqG; Wed, 4 Sep 2013 18:14:07 +0100 (BST) Received: from serenity.lan (tg1.aluminati.org [10.0.16.53]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by jackal.aluminati.org (Postfix) with ESMTPSA id 46C3BCDA5B5; Wed, 4 Sep 2013 18:13:58 +0100 (BST) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Wed, Sep 04, 2013 at 09:47:12AM -0700, Junio C Hamano wrote: > Jonathan Nieder writes: > > > test_cmp_rev follows the same order of arguments a "diff -u" and > > produces the same output as plain "git diff". It's perfectly readable > > and normal. > > This is way off tangent, but I am somewhat sympathetic to Felipe's > "compare actual with expect", with reservations. This isn't an argument either way, but note that JUnit (and NUnit and PHPUnit) all have assertEquals methods that take the arguments in the order "expect, actual". I've always assumed that Git's test framework was imitating that, although I have no idea why that particular order is chosen and is so common.