t4212: avoid putting git on left-hand side of pipe

We wouldn't expect cat-file to fail here, but it's good practice to avoid putting git on the upstream of a pipe, as we otherwise ignore its exit code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Apr 27, 2023 at 04:14 UTC 2063b86b815d9193f789e9e10dae0d513ea327fa
1 file changed +3 -2
t/t4212-log-corrupt.sh
+3 -2
@@ -8,8 +8,9 @@ TEST_PASSES_SANITIZE_LEAK=true
8 test_expect_success 'setup' '
9 test_commit foo &&
10
11 - git cat-file commit HEAD |
12 - sed "/^author /s/>/>-<>/" >broken_email.commit &&
11 + git cat-file commit HEAD >ok.commit &&
12 + sed "/^author /s/>/>-<>/" <ok.commit >broken_email.commit &&
13 +
14 git hash-object --literally -w -t commit broken_email.commit >broken_email.hash &&
15 git update-ref refs/heads/broken_email $(cat broken_email.hash)
16 '