On Sun, Apr 10, 2016 at 9:47 AM, Torsten Bögershausen <[email protected]> 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 </dev/null
>> + 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html