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>
This commit is contained in:

committed by
Junio C Hamano

parent
73876f4861
commit
2063b86b81
@ -8,8 +8,9 @@ TEST_PASSES_SANITIZE_LEAK=true
|
||||
test_expect_success 'setup' '
|
||||
test_commit foo &&
|
||||
|
||||
git cat-file commit HEAD |
|
||||
sed "/^author /s/>/>-<>/" >broken_email.commit &&
|
||||
git cat-file commit HEAD >ok.commit &&
|
||||
sed "/^author /s/>/>-<>/" <ok.commit >broken_email.commit &&
|
||||
|
||||
git hash-object --literally -w -t commit broken_email.commit >broken_email.hash &&
|
||||
git update-ref refs/heads/broken_email $(cat broken_email.hash)
|
||||
'
|
||||
|
Reference in New Issue
Block a user