Re: [PATCH 10/10] tests: change "cat && chmod +x" to use "test_hook"
On Wed, Mar 2, 2022 at 8:22 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 6 quoted lines
> Refactor various test code to use the "test_hook" helper. This change:
>
> - Fixes the long-standing issues with those tests using "#!/bin/sh"
> instead of "#!$SHELL_PATH". Using "#!/bin/sh" here happened to work
> because this code was so simply that it e.g. worked on Solaris
> /bin/sh.
Show 9 quoted lines
> - Removes the "mkdir .git/hooks" invocation, as explained in a
> preceding commit we'll rely on the default templates to create that
> directory for us.
>
> For the test in "t5402-post-merge-hook.sh" it's easier and more
> correct to unroll the for-loop into a test_expect_success, so let's do
> that.
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>