Re: [PATCH v2 6/6] t2019: don't create unused files
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 6, 2023, 08:44 UTC
- Message-ID
- <230406.86h6tttn21.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <20230403223338.468025-7-rybak.a.v@gmail.com>
On Tue, Apr 04 2023, Andrei Rybak wrote:
Show 23 quoted lines
> Tests in t2019-checkout-ambiguous-ref.sh redirect two invocations of > "git checkout" to files "stdout" and "stderr". Several assertions are > made using file "stderr". File "stdout", however, is unused. > > Don't redirect standard output of "git checkout" to file "stdout" in > t2019-checkout-ambiguous-ref.sh to avoid creating unnecessary files. > > Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com> > --- > t/t2019-checkout-ambiguous-ref.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/t/t2019-checkout-ambiguous-ref.sh b/t/t2019-checkout-ambiguous-ref.sh > index 2c8c926b4d..9540588664 100755 > --- a/t/t2019-checkout-ambiguous-ref.sh > +++ b/t/t2019-checkout-ambiguous-ref.sh > @@ -16,7 +16,7 @@ test_expect_success 'setup ambiguous refs' ' > ' > > test_expect_success 'checkout ambiguous ref succeeds' ' > - git checkout ambiguity >stdout 2>stderr > + git checkout ambiguity 2>stderr > '
Ditto earlier comments that we should just fix this, if I make this ">out" and "test_must_be_empty out" this succeeds, shouldn't we just use that?
> test_expect_success 'checkout produces ambiguity warning' '
As an aside, we should really just combine these two tests.
Show 8 quoted lines
> @@ -37,7 +37,7 @@ test_expect_success 'checkout reports switch to branch' ' > ' > > test_expect_success 'checkout vague ref succeeds' ' > - git checkout vagueness >stdout 2>stderr && > + git checkout vagueness 2>stderr && > test_set_prereq VAGUENESS_SUCCESS > '