[PATCH 0/4] Re: [PATCH 3/4] t: rev-parse-parents: avoid yoda conditions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



SZEDER Gábor wrote:
> On Tue, Sep 03, 2013 at 08:39:54AM -0500, Felipe Contreras wrote:

>> There are two ways to fix an inconsistency, the other way is to fix
>> test_cmp. But that would be a change, and change is not welcome in
>> Git.
>
> It depends on the change, I suppose.  I agree, changing 3k+ lines just
> to avoid yoda conditions...  I doubt the gain worth the code churn.

Especially when the idiom being changed is not even being made better.
;-)

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.  I think Felipe is pushing buttons and testing boundaries.

But in the process came a report of a missing test_cmp_rev use, which
is useful.  Patch follows.

While at it, I rerolled the other patches from the series to clarify
their commit messages (replacing "fix <something>" with a fuller
description).

Improvements welcome, as always.  Thanks.

Felipe Contreras (3):
  rev-parse test: modernize quoting and whitespace
  rev-parse test: use test_must_fail, not "if <command>; then false; fi"
  rev-parse test: use standard test functions for setup

Jonathan Nieder (1):
  rev-parse test: use test_cmp instead of "test" builtin

 t/t6101-rev-parse-parents.sh | 110 +++++++++++++++++++++++++++++++------------
 1 file changed, 79 insertions(+), 31 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]