]> git.ipfire.org Git - thirdparty/git.git/commitdiff
hook tests: fix redirection logic error in 96e7225b310
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 29 Oct 2022 02:59:45 +0000 (04:59 +0200)
committerTaylor Blau <me@ttaylorr.com>
Mon, 31 Oct 2022 04:16:37 +0000 (00:16 -0400)
The tests added in 96e7225b310 (hook: add 'run' subcommand,
2021-12-22) were redirecting to "actual" both in the body of the hook
itself and in the testing code below.

The net result was that the "2>>actual" redirection later in the test
wasn't doing anything. Let's have those redirection do what it looks
like they're doing.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
t/t1800-hook.sh

index 43fcb7c0bfc85e3d29455ec37cfbf437e00238a9..2ef3579fa7c23db5055c41e68438d39871bcf6e9 100755 (executable)
@@ -95,7 +95,7 @@ test_expect_success 'git hook run -- out-of-repo runs excluded' '
 test_expect_success 'git -c core.hooksPath=<PATH> hook run' '
        mkdir my-hooks &&
        write_script my-hooks/test-hook <<-\EOF &&
-       echo Hook ran $1 >>actual
+       echo Hook ran $1
        EOF
 
        cat >expect <<-\EOF &&