Subject: Re: [PATCH 2/6] t7408: merge short tests, factor out testing method

From: Junio C Hamano <[email-masked]>
Date: Fri, 05 Aug 2016 16:09:15 -0700

Stefan Beller <[email-masked]> writes:

>>> -test_expect_success 'that reference gets used with add' '
>>> -     (
>>> -             cd super/sub &&
>>> -             echo "0 objects, 0 kilobytes" > expected &&
>>> -             git count-objects > current &&
>>> -             diff expected current
>
> This is where the "diff" and "current" above came from.

I KNOW that, but I thought this effort is a continuation of the
modernise-and-make-it-maintainable effort started at 1/6.

> To stop that from happening again I want to have a clean slate,
> i.e. all clones are deleted shortly after using, so it is obvious what
> to use for testing.

OK.  So A, B and super (and super/sub) are the ones that survive
throughout the test, and individual test (including the "let's try
cloning the super into super-clone" at the end of existing tests)
would follow create-use-remove pattern?  Perhaps that can be left
as a comment before the last existing test, e.g. "A, B and super are
permanent, and from here on, if you create a clone of them for
testing, remove your clone once you are done", to inform the test
writers of this convention.

Thanks.