From: Eric Sunshine Date: Sun, 17 Apr 2016 16:15:19 GMT Subject: Re: [PATCH v2 2/2] t1500-rev-parse: rewrite each test to run in isolation Message-ID: In-Reply-To: <20160417114253.Horde.giIo57RkUzhAe6GP-RahIrw@webmail.informatik.kit.edu> On Sun, Apr 17, 2016 at 5:42 AM, SZEDER Gábor wrote: > Quoting Michael Rappazzo : >> +test_expect_success 'GIT_DIR=../.git, core.bare = false: >> is-bare-repository' ' >> + mkdir work && >> + test_when_finished "rm -rf work" && >> + test_config -C "$(pwd)"/.git core.bare false && >> + GIT_DIR=../.git test_stdout false git -C work rev-parse >> --is-bare-repository >> +' > > Here and in the following tests as well: some shells don't cope that well > with a one-shot environmental variable set in front of a shell function. > See commit 512477b17528: > > tests: use "env" to run commands with temporary env-var settings While reviewing the patch, I stared at that code for a good while thinking that there was something about it I ought to remember but couldn't, so thanks for the reminder (and j6t's too). Considering that this patch is probably going in the wrong direction and that if, when re-rolled, it takes a systematic approach testing that the original code uses, then the "need" for test_stdout effectively disappears, so this issue should go away too (but it's good to remember, nevertheless).