From: Eric Sunshine Date: Mon, 11 Apr 2016 00:23:23 GMT Subject: Re: [PATCH v2 05/21] t6030: generalize test to not rely on current implementation Message-ID: In-Reply-To: <570A596F.9080200@web.de> On Sun, Apr 10, 2016 at 9:47 AM, Torsten Bögershausen wrote: > On 10.04.16 15:18, Stephan Beyer wrote: >> diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh >> @@ -10,36 +10,34 @@ exec > + if [ -f "$_file" ]; then > I know that the old code did the same, is there a chance > to adopt to the git-style: > if test -f "$_file" ; then Hmm, isn't the preferred style? if test -f "$_file" then >> +test_expect_success '"git bisect run" simple case' ' >> + echo "#"\!"/bin/sh" > test_script.sh && >> + echo "grep Another hello > /dev/null" >> test_script.sh && >> + echo "test \$? -ne 0" >> test_script.sh && >> + chmod +x test_script.sh && >> + git bisect start && >> + git bisect good $HASH1 && >> + git bisect bad $HASH4 && >> + git bisect run ./test_script.sh > my_bisect_log.txt && >> + grep "$HASH3 is the first bad commit" my_bisect_log.txt && >> + git bisect reset >> +' > Portabily: > Since yesterday/yesterweek the usage of hard-coded > #!/bin/sh had shown to be problematic > Junio posted an update like this: > - printf "#!/bin/sh\n" >diff && > - printf "printf \"\$GIT_PREFIX\"" >>diff && > - chmod +x diff && > + write_script diff <<-\EOF && > + printf "%s" "$GIT_PREFIX" > + EOF It might be nice to have these style fixes and modernizations as a preparatory cleanup patch.