Skip to content

Commit 2063b86

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 73876f4 commit 2063b86

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/t4212-log-corrupt.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ TEST_PASSES_SANITIZE_LEAK=true
88
test_expect_success 'setup' '
99
test_commit foo &&
1010
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+
1314
git hash-object --literally -w -t commit broken_email.commit >broken_email.hash &&
1415
git update-ref refs/heads/broken_email $(cat broken_email.hash)
1516
'

0 commit comments

Comments
 (0)